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