forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathissue-55394.stderr
30 lines (28 loc) · 954 Bytes
/
issue-55394.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'s` due to conflicting requirements
--> $DIR/issue-55394.rs:9:9
|
LL | Foo { bar }
| ^^^
|
note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the method body at 8:5...
--> $DIR/issue-55394.rs:8:5
|
LL | / fn new(bar: &mut Bar) -> Self {
LL | | Foo { bar }
LL | | }
| |_____^
note: ...so that reference does not outlive borrowed content
--> $DIR/issue-55394.rs:9:15
|
LL | Foo { bar }
| ^^^
note: but, the lifetime must be valid for the lifetime '_ as defined on the impl at 7:10...
--> $DIR/issue-55394.rs:7:10
|
LL | impl Foo<'_> {
| ^^
= note: ...so that the expression is assignable:
expected Foo<'_>
found Foo<'_>
error: aborting due to previous error
For more information about this error, try `rustc --explain E0495`.