aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/inlay_hints.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/inlay_hints.rs')
-rw-r--r--crates/ide/src/inlay_hints.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/ide/src/inlay_hints.rs b/crates/ide/src/inlay_hints.rs
index b6113bda2..ac704ae21 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -1339,4 +1339,25 @@ fn main() {
1339"#, 1339"#,
1340 ); 1340 );
1341 } 1341 }
1342
1343 #[test]
1344 fn infer_call_method_return_associated_types_with_generic() {
1345 check(
1346 r#"
1347 pub trait Default {
1348 fn default() -> Self;
1349 }
1350 pub trait Foo {
1351 type Bar: Default;
1352 }
1353
1354 pub fn quux<T: Foo>() -> T::Bar {
1355 let y = Default::default();
1356 //^ <T as Foo>::Bar
1357
1358 y
1359 }
1360 "#,
1361 );
1362 }
1342} 1363}