fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
1.0 KiB26 linesraw
1error: implementation of `Foo` is not general enough
2  --> $DIR/auto-trait-regions.rs:30:5
3   |
4LL | auto trait Foo {}
5   | ----------------- trait `Foo` defined here
6...
7LL |     assert_foo(gen);
8   |     ^^^^^^^^^^ implementation of `Foo` is not general enough
9   |
10   = note: `Foo` would have to be implemented for the type `&'0 OnlyFooIfStaticRef`, for any lifetime `'0`...
11   = note: ...but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for some specific lifetime `'1`
12
13error: implementation of `Foo` is not general enough
14  --> $DIR/auto-trait-regions.rs:48:5
15   |
16LL | auto trait Foo {}
17   | ----------------- trait `Foo` defined here
18...
19LL |     assert_foo(gen);
20   |     ^^^^^^^^^^ implementation of `Foo` is not general enough
21   |
22   = note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`...
23   = note: ...but `Foo` is actually implemented for the type `A<'_, '2>`, for some specific lifetime `'2`
24
25error: aborting due to 2 previous errors
26