]> git.lizzy.rs Git - rust.git/blob - src/test/ui/on-unimplemented/enclosing-scope.stderr
Rollup merge of #76275 - FedericoPonzi:immutable-write-impl-73836, r=dtolnay
[rust.git] / src / test / ui / on-unimplemented / enclosing-scope.stderr
1 error[E0277]: the trait bound `Foo: Trait` is not satisfied
2   --> $DIR/enclosing-scope.rs:14:11
3    |
4 LL |   fn f<T: Trait>(x: T) {}
5    |           ----- required by this bound in `f`
6 ...
7 LL |       let x = || {
8    |  _____________-
9 LL | |         f(Foo{});
10    | |           ^^^^^ the trait `Trait` is not implemented for `Foo`
11 LL | |         let y = || {
12 LL | |             f(Foo{});
13 LL | |         };
14 LL | |     };
15    | |_____- in this scope
16
17 error[E0277]: the trait bound `Foo: Trait` is not satisfied
18   --> $DIR/enclosing-scope.rs:16:15
19    |
20 LL |   fn f<T: Trait>(x: T) {}
21    |           ----- required by this bound in `f`
22 ...
23 LL |           let y = || {
24    |  _________________-
25 LL | |             f(Foo{});
26    | |               ^^^^^ the trait `Trait` is not implemented for `Foo`
27 LL | |         };
28    | |_________- in this scope
29
30 error[E0277]: the trait bound `Foo: Trait` is not satisfied
31   --> $DIR/enclosing-scope.rs:22:15
32    |
33 LL |   fn f<T: Trait>(x: T) {}
34    |           ----- required by this bound in `f`
35 LL | 
36 LL | / fn main() {
37 LL | |     let x = || {
38 LL | |         f(Foo{});
39 LL | |         let y = || {
40 ...  |
41 LL | |             f(Foo{});
42    | |               ^^^^^ the trait `Trait` is not implemented for `Foo`
43 ...  |
44 LL | |     f(Foo{});
45 LL | | }
46    | |_- in this scope
47
48 error[E0277]: the trait bound `Foo: Trait` is not satisfied
49   --> $DIR/enclosing-scope.rs:26:7
50    |
51 LL |   fn f<T: Trait>(x: T) {}
52    |           ----- required by this bound in `f`
53 LL | 
54 LL | / fn main() {
55 LL | |     let x = || {
56 LL | |         f(Foo{});
57 LL | |         let y = || {
58 ...  |
59 LL | |     f(Foo{});
60    | |       ^^^^^ the trait `Trait` is not implemented for `Foo`
61 LL | | }
62    | |_- in this scope
63
64 error: aborting due to 4 previous errors
65
66 For more information about this error, try `rustc --explain E0277`.