aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-28 14:54:00 +0000
committerGitHub <[email protected]>2020-10-28 14:54:00 +0000
commite34183218ceb840c3b20a707ed79e57bdf9f90b7 (patch)
tree8cc60eb5258a50481b5dd08eb2261be2c0d4e6cf /crates/ide
parent85cda15b62b6b3c0d633eee1458b01a8abc759e6 (diff)
parentec3638adb93ea425f825cc976bcae816f7e5c50b (diff)
Merge #6387
6387: do not use associated types placeholder for inlay hint r=flodiebold a=bnjjj close #6191 Co-authored-by: Benjamin Coenen <[email protected]>
Diffstat (limited to 'crates/ide')
-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 49d8e4ae1..adb93efd7 100644
--- a/crates/ide/src/inlay_hints.rs
+++ b/crates/ide/src/inlay_hints.rs
@@ -1235,4 +1235,25 @@ fn main() {
1235"#, 1235"#,
1236 ); 1236 );
1237 } 1237 }
1238
1239 #[test]
1240 fn infer_call_method_return_associated_types_with_generic() {
1241 check(
1242 r#"
1243 pub trait Default {
1244 fn default() -> Self;
1245 }
1246 pub trait Foo {
1247 type Bar: Default;
1248 }
1249
1250 pub fn quux<T: Foo>() -> T::Bar {
1251 let y = Default::default();
1252 //^ <T as Foo>::Bar
1253
1254 y
1255 }
1256 "#,
1257 );
1258 }
1238} 1259}