rust/src/test/ui/generator/auto-trait-regions.nll.stderr
Niko Matsakis fda3378e3f introduce negative_impls feature gate and document
They used to be covered by `optin_builtin_traits` but negative impls
are now applicable to all traits, not just auto traits.

This also adds docs in the unstable book for the current state of auto traits.
2020-03-26 06:52:55 -04:00

42 lines
1.4 KiB
Plaintext

error[E0716]: temporary value dropped while borrowed
--> $DIR/auto-trait-regions.rs:46:24
|
LL | let a = A(&mut true, &mut true, No);
| ^^^^ - temporary value is freed at the end of this statement
| |
| creates a temporary which is freed while still in use
LL | yield;
LL | assert_foo(a);
| - borrow later used here
|
= note: consider using a `let` binding to create a longer lived value
error[E0716]: temporary value dropped while borrowed
--> $DIR/auto-trait-regions.rs:46:35
|
LL | let a = A(&mut true, &mut true, No);
| ^^^^ - temporary value is freed at the end of this statement
| |
| creates a temporary which is freed while still in use
LL | yield;
LL | assert_foo(a);
| - borrow later used here
|
= note: consider using a `let` binding to create a longer lived value
error: higher-ranked subtype error
--> $DIR/auto-trait-regions.rs:31:5
|
LL | assert_foo(gen);
| ^^^^^^^^^^^^^^^
error: higher-ranked subtype error
--> $DIR/auto-trait-regions.rs:50:5
|
LL | assert_foo(gen);
| ^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0716`.