summaryrefslogtreecommitdiffstats
path: root/tests/ui/inference/issue-107090.stderr
blob: 6233b629ad6c6d50e5b85582a246b86678583a13 (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
error[E0261]: use of undeclared lifetime name `'short`
  --> $DIR/issue-107090.rs:4:9
   |
LL |     Foo<'short, 'out, T>: Convert<'a, 'b>;
   |         ^^^^^^ undeclared lifetime
   |
   = note: for more information on higher-ranked polymorphism, visit https://doc.rust-lang.org/nomicon/hrtb.html
help: consider making the bound lifetime-generic with a new `'short` lifetime
   |
LL |     for<'short> Foo<'short, 'out, T>: Convert<'a, 'b>;
   |     +++++++++++
help: consider introducing lifetime `'short` here
   |
LL | struct Foo<'short, 'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>)
   |            +++++++

error[E0261]: use of undeclared lifetime name `'out`
  --> $DIR/issue-107090.rs:4:17
   |
LL |     Foo<'short, 'out, T>: Convert<'a, 'b>;
   |                 ^^^^ undeclared lifetime
   |
help: consider making the bound lifetime-generic with a new `'out` lifetime
   |
LL |     for<'out> Foo<'short, 'out, T>: Convert<'a, 'b>;
   |     +++++++++
help: consider introducing lifetime `'out` here
   |
LL | struct Foo<'out, 'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>)
   |            +++++

error[E0261]: use of undeclared lifetime name `'b`
  --> $DIR/issue-107090.rs:11:47
   |
LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
   |      -                                        ^^ undeclared lifetime
   |      |
   |      help: consider introducing lifetime `'b` here: `'b,`

error[E0261]: use of undeclared lifetime name `'out`
  --> $DIR/issue-107090.rs:11:67
   |
LL | impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
   |      - help: consider introducing lifetime `'out` here: `'out,`   ^^^^ undeclared lifetime

error[E0261]: use of undeclared lifetime name `'out`
  --> $DIR/issue-107090.rs:14:49
   |
LL |     fn cast(&'long self) -> &'short Foo<'short, 'out, T> {
   |                                                 ^^^^ undeclared lifetime
   |
help: consider introducing lifetime `'out` here
   |
LL |     fn cast<'out>(&'long self) -> &'short Foo<'short, 'out, T> {
   |            ++++++
help: consider introducing lifetime `'out` here
   |
LL | impl<'out, 'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
   |      +++++

error[E0261]: use of undeclared lifetime name `'short`
  --> $DIR/issue-107090.rs:20:68
   |
LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
   |           -                                                        ^^^^^^ undeclared lifetime
   |           |
   |           help: consider introducing lifetime `'short` here: `'short,`

error[E0308]: mismatched types
  --> $DIR/issue-107090.rs:22:5
   |
LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
   |                       - this type parameter                                             ------- expected `&'out T` because of return type
LL |
LL |     sadness.cast()
   |     ^^^^^^^^^^^^^^ expected `&T`, found `&Foo<'_, '_, T>`
   |
   = note: expected reference `&'out T`
              found reference `&Foo<'_, '_, T>`

error: aborting due to 7 previous errors

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