Skip to content

Commit b450aff

Browse files
committed
Add test to new branches
1 parent 0559107 commit b450aff

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/compile-fail/issue-23173.rs

+15
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,26 @@
1010

1111
enum Token { LeftParen, RightParen, Plus, Minus, /* etc */ }
1212
//~^ NOTE variant `Homura` not found here
13+
struct Struct {
14+
//~^ NOTE function or associated item `method` not found for this
15+
//~| NOTE function or associated item `method` not found for this
16+
//~| NOTE associated item `Assoc` not found for this
17+
a: usize,
18+
}
1319

1420
fn use_token(token: &Token) { unimplemented!() }
1521

1622
fn main() {
1723
use_token(&Token::Homura);
1824
//~^ ERROR no variant named `Homura`
1925
//~| NOTE variant not found in `Token`
26+
Struct::method();
27+
//~^ ERROR no function or associated item named `method` found for type
28+
//~| NOTE function or associated item not found in `Struct`
29+
Struct::method;
30+
//~^ ERROR no function or associated item named `method` found for type
31+
//~| NOTE function or associated item not found in `Struct`
32+
Struct::Assoc;
33+
//~^ ERROR no associated item named `Assoc` found for type `Struct` in
34+
//~| NOTE associated item not found in `Struct`
2035
}

0 commit comments

Comments
 (0)