blob: 60ac7c09f04145ec4784f7b7a75d4509941a1940 [file] [log] [blame]
error[E0308]: method not compatible with trait
--> $DIR/regions-trait-1.rs:16:5
|
LL | fn get_ctxt(&self) -> &'a Ctxt {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected fn pointer `fn(&HasCtxt<'a>) -> &Ctxt`
found fn pointer `fn(&HasCtxt<'a>) -> &'a Ctxt`
note: the lifetime `'a` as defined on the impl at 12:6...
--> $DIR/regions-trait-1.rs:12:6
|
LL | impl<'a> GetCtxt for HasCtxt<'a> {
| ^^
note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 16:5
--> $DIR/regions-trait-1.rs:16:5
|
LL | / fn get_ctxt(&self) -> &'a Ctxt {
LL | | self.c
LL | | }
| |_____^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.