Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/traits.rs')
| -rw-r--r-- | crates/hir-ty/src/tests/traits.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/traits.rs b/crates/hir-ty/src/tests/traits.rs index 30c67d41b7..aa8b420e98 100644 --- a/crates/hir-ty/src/tests/traits.rs +++ b/crates/hir-ty/src/tests/traits.rs @@ -467,6 +467,23 @@ fn test<T: Iterable>() { } #[test] +fn associated_type_shorthand_from_self_issue_12484() { + check_types( + r#" +trait Bar { + type A; +} +trait Foo { + type A; + fn test(a: Self::A, _: impl Bar) { + a; + //^ Foo::A<Self> + } +}"#, + ); +} + +#[test] fn infer_associated_type_bound() { check_types( r#" |