This is a hack to work around miri being included in
our analysis of rustc-dev
Really, we should probably use an include set of the actual root libraries
I'm not sure how those are determined however
7888: Add a line about code action commands to the CoC section of the docs r=lnicola a=flodiebold
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
7880: Honor snippet capability when using the extract function assist r=lnicola a=Arthamys
This fixes issue #7793
Co-authored-by: san <san@alien.parts>
7870: Use chalk_ir::AdtId r=Veykril a=Veykril
It's a bit unfortunate that we got two AdtId's now(technically 3 with the alias in the chalk module but that one won't allow pattern matching), one from hir_def and one from chalk_ir(hir_ty). But the hir_ty/chalk one doesn't leave hir so it shouldn't be that bad I suppose. Though if I see this right this will happen for almost all IDs.
I imagine most of the intermediate changes to using chalk ids will turn out not too nice until the refactor is over.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
7862: Remove incorrect broken test r=jonas-schievink a=jonas-schievink
`Struct` cannot be named at all in that position, since `super` doesn't
resolve to the block scope
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
7824: feat: add type ascription r=matklad a=conradludgate
Based on this conversation: https://twitter.com/rust_analyzer/status/1366092401278922757
Built off of `add_turbo_fish`, finds the current `let` statement, checks if it has type/turbofish already and checks if the rhs function is generic.
There's one case I couldn't figure out how to implement that would be nice:
```rust
#[test]
fn add_type_ascription_function_result() {
check_assist(
add_type_ascription,
r#"
fn make<T>() -> Result<T, &'static str> {}
fn main() {
let x = make()$0;
}
"#,
r#"
fn make<T>() -> Result<T, &'static str> {}
fn main() {
let x: Result<${0:_}, &'static str> = make();
}
"#,
);
}
```
The `Function::ret_type` fn wasn't returning anything much useful so I'm not sure how to identity such scenarios just yet
Co-authored-by: Conrad Ludgate <conradludgate@gmail.com>