diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-09 08:50:18 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-09 08:50:18 +0100 |
commit | f59cd1a4a0d6c369025a7014e838d25f91d478e4 (patch) | |
tree | 2c4b9dc868a87507ed63e9dc46530cc60f38ae64 /crates/ra_ide_api/src | |
parent | 35f28c538a9b9f461bb4db1a78d02e9f02a3d296 (diff) | |
parent | 9afbf2dff43dee3227358f10162d4c77d192ce7a (diff) |
Merge #1515
1515: Trait environment r=matklad a=flodiebold
This adds the environment, i.e. the set of `where` clauses in scope, when solving trait goals. That means that e.g. in
```rust
fn foo<T: SomeTrait>(t: T) {}
```
, we are able to complete methods of `SomeTrait` on the `t`. This affects the trait APIs quite a bit (since every method that needs to be able to solve for some trait needs to get this environment somehow), so I thought I'd do it rather sooner than later ;)
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/change.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/change.rs b/crates/ra_ide_api/src/change.rs index 2a1af0a0a..efc9a92de 100644 --- a/crates/ra_ide_api/src/change.rs +++ b/crates/ra_ide_api/src/change.rs | |||
@@ -295,8 +295,7 @@ impl RootDatabase { | |||
295 | hir::db::TraitDatumQuery | 295 | hir::db::TraitDatumQuery |
296 | hir::db::StructDatumQuery | 296 | hir::db::StructDatumQuery |
297 | hir::db::ImplDatumQuery | 297 | hir::db::ImplDatumQuery |
298 | hir::db::ImplementsQuery | 298 | hir::db::SolveQuery |
299 | hir::db::NormalizeQuery | ||
300 | ]; | 299 | ]; |
301 | acc.sort_by_key(|it| std::cmp::Reverse(it.1)); | 300 | acc.sort_by_key(|it| std::cmp::Reverse(it.1)); |
302 | acc | 301 | acc |