fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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