From a4a4a1854ebb53e1cdd7a5e3b308112bbbf3c676 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 29 May 2020 19:14:04 +0200 Subject: Fix type parameter defaults They should not be applied in expression or pattern contexts, unless there are other explicitly given type args. --- crates/ra_assists/src/handlers/add_explicit_type.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/handlers/add_explicit_type.rs b/crates/ra_assists/src/handlers/add_explicit_type.rs index ab20c6649..90b06a625 100644 --- a/crates/ra_assists/src/handlers/add_explicit_type.rs +++ b/crates/ra_assists/src/handlers/add_explicit_type.rs @@ -195,7 +195,7 @@ struct Test { } fn main() { - let test<|> = Test { t: 23, k: 33 }; + let test<|> = Test { t: 23u8, k: 33 }; }"#, r#" struct Test { @@ -204,7 +204,7 @@ struct Test { } fn main() { - let test: Test = Test { t: 23, k: 33 }; + let test: Test = Test { t: 23u8, k: 33 }; }"#, ); } -- cgit v1.2.3