File: lifetime-resolution.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (47 lines) | stat: -rw-r--r-- 1,745 bytes parent folder | download | duplicates (14)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
error[E0261]: use of undeclared lifetime name `'missing`
  --> $DIR/lifetime-resolution.rs:7:28
   |
LL |     let missing: unsafe<> &'missing ();
   |                            ^^^^^^^^ undeclared lifetime
   |
   = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the type lifetime-generic with a new `'missing` lifetime
   |
LL |     let missing: unsafe<'missing, > &'missing ();
   |                         +++++++++
help: consider introducing lifetime `'missing` here
   |
LL | fn foo<'missing, 'a>() {
   |        +++++++++

error[E0401]: can't use generic parameters from outer item
  --> $DIR/lifetime-resolution.rs:11:30
   |
LL | fn foo<'a>() {
   |        -- lifetime parameter from outer item
...
LL |         let outer: unsafe<> &'a &'b ();
   |                              ^^ use of generic parameter from outer item
   |
help: consider making the type lifetime-generic with a new `'a` lifetime
   |
LL |         let outer: unsafe<'a, > &'a &'b ();
   |                           +++
help: consider introducing lifetime `'a` here
   |
LL |     fn inner<'a, 'b>() {
   |              +++

warning: the feature `unsafe_binders` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/lifetime-resolution.rs:1:12
   |
LL | #![feature(unsafe_binders)]
   |            ^^^^^^^^^^^^^^
   |
   = note: see issue #130516 <https://github.com/rust-lang/rust/issues/130516> for more information
   = note: `#[warn(incomplete_features)]` on by default

error: aborting due to 2 previous errors; 1 warning emitted

Some errors have detailed explanations: E0261, E0401.
For more information about an error, try `rustc --explain E0261`.