1 error[E0308]: method not compatible with trait
2 --> $DIR/regions-trait-1.rs:16:5
4 LL | fn get_ctxt(&self) -> &'a Ctxt {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
7 = note: expected fn pointer `fn(&HasCtxt<'a>) -> &Ctxt`
8 found fn pointer `fn(&HasCtxt<'a>) -> &'a Ctxt`
9 note: the lifetime `'a` as defined on the impl at 12:6...
10 --> $DIR/regions-trait-1.rs:12:6
12 LL | impl<'a> GetCtxt for HasCtxt<'a> {
14 note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 16:5
15 --> $DIR/regions-trait-1.rs:16:5
17 LL | / fn get_ctxt(&self) -> &'a Ctxt {
22 error: aborting due to previous error
24 For more information about this error, try `rustc --explain E0308`.