mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fix type parameter defaults
They should not be applied in expression or pattern contexts, unless there are other explicitly given type args.
This commit is contained in:
parent
02f7b5d7ab
commit
a4a4a1854e
10 changed files with 192 additions and 115 deletions
|
@ -415,7 +415,7 @@ struct Test<K, T = u8> {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let zz = Test { t: 23, k: 33 };
|
||||
let zz = Test { t: 23u8, k: 33 };
|
||||
let zz_ref = &zz;
|
||||
}"#,
|
||||
);
|
||||
|
@ -428,7 +428,7 @@ fn main() {
|
|||
label: "Test<i32>",
|
||||
},
|
||||
InlayHint {
|
||||
range: 105..111,
|
||||
range: 107..113,
|
||||
kind: TypeHint,
|
||||
label: "&Test<i32>",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue