]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/auto-trait-regions.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / generator / auto-trait-regions.stderr
1 error[E0716]: temporary value dropped while borrowed
2   --> $DIR/auto-trait-regions.rs:45:24
3    |
4 LL |         let a = A(&mut true, &mut true, No);
5    |                        ^^^^                - temporary value is freed at the end of this statement
6    |                        |
7    |                        creates a temporary which is freed while still in use
8 ...
9 LL |         assert_foo(a);
10    |                    - borrow later used here
11    |
12    = note: consider using a `let` binding to create a longer lived value
13
14 error[E0716]: temporary value dropped while borrowed
15   --> $DIR/auto-trait-regions.rs:45:35
16    |
17 LL |         let a = A(&mut true, &mut true, No);
18    |                                   ^^^^     - temporary value is freed at the end of this statement
19    |                                   |
20    |                                   creates a temporary which is freed while still in use
21 ...
22 LL |         assert_foo(a);
23    |                    - borrow later used here
24    |
25    = note: consider using a `let` binding to create a longer lived value
26
27 error: implementation of `Foo` is not general enough
28   --> $DIR/auto-trait-regions.rs:31:5
29    |
30 LL |     assert_foo(gen);
31    |     ^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
32    |
33    = note: `&'0 OnlyFooIfStaticRef` must implement `Foo`, for any lifetime `'0`...
34    = note: ...but `Foo` is actually implemented for the type `&'static OnlyFooIfStaticRef`
35
36 error: implementation of `Foo` is not general enough
37   --> $DIR/auto-trait-regions.rs:51:5
38    |
39 LL |     assert_foo(gen);
40    |     ^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
41    |
42    = note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`...
43    = note: ...but `Foo` is actually implemented for the type `A<'_, '2>`, for some specific lifetime `'2`
44
45 error: aborting due to 4 previous errors
46
47 For more information about this error, try `rustc --explain E0716`.