]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-trait-1.stderr
New upstream version 1.48.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-trait-1.stderr
CommitLineData
b7449926 1error[E0308]: method not compatible with trait
0731742a 2 --> $DIR/regions-trait-1.rs:16:5
b7449926 3 |
532ac7d7 4LL | fn get_ctxt(&self) -> &'a Ctxt {
b7449926
XL
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6 |
60c5eb7d
XL
7 = note: expected fn pointer `fn(&HasCtxt<'a>) -> &Ctxt`
8 found fn pointer `fn(&HasCtxt<'a>) -> &'a Ctxt`
e74abb32 9note: the lifetime `'a` as defined on the impl at 12:6...
0731742a 10 --> $DIR/regions-trait-1.rs:12:6
b7449926 11 |
0731742a 12LL | impl<'a> GetCtxt for HasCtxt<'a> {
b7449926 13 | ^^
0731742a
XL
14note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 16:5
15 --> $DIR/regions-trait-1.rs:16:5
b7449926 16 |
3dfed10e
XL
17LL | fn get_ctxt(&self) -> &'a Ctxt {
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
b7449926
XL
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0308`.