]>
Commit | Line | Data |
---|---|---|
f2b60f7d FG |
1 | // Test scope annotations from `parent_label` parameter |
2 | ||
3 | #![feature(rustc_attrs)] | |
4 | ||
5 | #[rustc_on_unimplemented(parent_label = "in this scope")] | |
6 | trait Trait {} | |
7 | ||
8 | struct Foo; | |
9 | ||
10 | fn f<T: Trait>(x: T) {} | |
11 | ||
12 | fn main() { | |
13 | let x = || { | |
14 | f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | |
15 | let y = || { | |
16 | f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | |
17 | }; | |
18 | }; | |
19 | ||
20 | { | |
21 | { | |
22 | f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | |
23 | } | |
24 | } | |
25 | ||
26 | f(Foo {}); //~ ERROR the trait bound `Foo: Trait` is not satisfied | |
27 | } |