2018-07-15 21:11:54 +00:00
|
|
|
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/issue-29861.rs:11:6
|
2018-07-15 21:11:54 +00:00
|
|
|
|
|
|
|
|
LL | impl<'a, T: 'a> MakeRef2 for T {
|
|
|
|
| ^^ unconstrained lifetime parameter
|
|
|
|
|
2024-02-15 17:12:05 +00:00
|
|
|
error[E0716]: temporary value dropped while borrowed
|
|
|
|
--> $DIR/issue-29861.rs:16:43
|
|
|
|
|
|
|
|
|
LL | fn foo() -> <String as MakeRef2>::Ref2 { &String::from("foo") }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ -- borrow later used here
|
|
|
|
| | |
|
|
|
|
| | temporary value is freed at the end of this statement
|
|
|
|
| creates a temporary value which is freed while still in use
|
|
|
|
|
|
|
|
|
= note: consider using a `let` binding to create a longer lived value
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2018-07-15 21:11:54 +00:00
|
|
|
|
2024-02-15 17:12:05 +00:00
|
|
|
Some errors have detailed explanations: E0207, E0716.
|
|
|
|
For more information about an error, try `rustc --explain E0207`.
|