mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Accurately classify assoc. types in paths
This commit is contained in:
parent
b3ca06e4fd
commit
41c7448e12
2 changed files with 38 additions and 18 deletions
|
@ -917,6 +917,21 @@ fn f() -> impl Iterator<Item$0 = u8> {}
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic = "unresolved reference"]
|
||||
fn unknown_assoc_ty() {
|
||||
check(
|
||||
r#"
|
||||
trait Iterator {
|
||||
type Item;
|
||||
//^^^^
|
||||
}
|
||||
|
||||
fn f() -> impl Iterator<Invalid$0 = u8> {}
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn goto_def_for_assoc_ty_in_path_multiple() {
|
||||
check(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue