Unnamed repository; edit this file 'description' to name the repository.
push `Debug` bound from `HirDatabase` down to `SourceDatabase`
The next commit would require us to `impl HirDatabase for dyn
SourceDatabase + Debug`, but that wouldn't work, as trait objects can't
specify multiple (non-auto) traits. Since we're going to change all the
users of `dyn HirDatabase` to `dyn SourceDatabase` anyway, we can push
the `Debug` bound down to the latter.
| -rw-r--r-- | crates/base-db/src/lib.rs | 2 | ||||
| -rw-r--r-- | crates/hir-ty/src/db.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/base-db/src/lib.rs b/crates/base-db/src/lib.rs index b3c7f84249..916e8c9830 100644 --- a/crates/base-db/src/lib.rs +++ b/crates/base-db/src/lib.rs @@ -265,7 +265,7 @@ pub struct SourceRootInput { } #[salsa_macros::db] -pub trait SourceDatabase: salsa::Database { +pub trait SourceDatabase: salsa::Database + std::fmt::Debug { /// Text of the file. fn file_text(&self, file_id: vfs::FileId) -> FileText; diff --git a/crates/hir-ty/src/db.rs b/crates/hir-ty/src/db.rs index 7e66e938a0..bd42772fdc 100644 --- a/crates/hir-ty/src/db.rs +++ b/crates/hir-ty/src/db.rs @@ -38,7 +38,7 @@ use crate::{ }; #[query_group::query_group] -pub trait HirDatabase: SourceDatabase + std::fmt::Debug { +pub trait HirDatabase: SourceDatabase { // region:mir // FIXME: Collapse `mir_body_for_closure` into `mir_body` |