File: higher-ranked-regions-basic.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (101 lines) | stat: -rw-r--r-- 4,608 bytes parent folder | download | duplicates (6)
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
error[E0792]: expected generic lifetime parameter, found `'a`
  --> $DIR/higher-ranked-regions-basic.rs:15:55
   |
LL |     type Opq<'a> = impl Sized + 'a;
   |              -- this generic parameter must be used with a generic lifetime parameter
LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq<'a>> {}
   |                                                       ^^

error[E0700]: hidden type for `impl Sized` captures lifetime that does not appear in bounds
  --> $DIR/higher-ranked-regions-basic.rs:21:58
   |
LL |     fn test() -> impl for<'a> Trait<'a, Ty = impl Sized> {}
   |                           --                 ----------  ^^
   |                           |                  |
   |                           |                  opaque type defined here
   |                           hidden type `&'a ()` captures the lifetime `'a` as defined here

error[E0700]: hidden type for `capture_tait::Opq0` captures lifetime that does not appear in bounds
  --> $DIR/higher-ranked-regions-basic.rs:30:23
   |
LL |     type Opq0 = impl Sized;
   |                 ---------- opaque type defined here
LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0>;
   |                              -- hidden type `&'b ()` captures the lifetime `'b` as defined here
LL |     type Opq2 = impl for<'a> Trait<'a, Ty = Opq1<'a>>;
LL |     fn test() -> Opq2 {}
   |                       ^^

error[E0792]: expected generic lifetime parameter, found `'a`
  --> $DIR/higher-ranked-regions-basic.rs:39:23
   |
LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'b>>; // <- Note 'b
   |               -- this generic parameter must be used with a generic lifetime parameter
LL |     type Opq2 = impl for<'a> Trait<'a, Ty = Opq1<'a>>;
LL |     fn test() -> Opq2 {}
   |                       ^^

error[E0700]: hidden type for `capture_tait_complex_fail::Opq0<'a>` captures lifetime that does not appear in bounds
  --> $DIR/higher-ranked-regions-basic.rs:49:23
   |
LL |     type Opq0<'a> = impl Sized;
   |                     ---------- opaque type defined here
LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'a>>; // <- Note 'a
   |                              -- hidden type `&'b ()` captures the lifetime `'b` as defined here
LL |     type Opq2 = impl for<'a> Trait<'a, Ty = Opq1<'a>>;
LL |     fn test() -> Opq2 {}
   |                       ^^

error[E0792]: non-defining opaque type use in defining scope
  --> $DIR/higher-ranked-regions-basic.rs:57:41
   |
LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {}
   |                                         ^^^^^^^^^^^^^^^^^^^^^^ argument `'static` is not a generic parameter
   |
note: for this opaque type
  --> $DIR/higher-ranked-regions-basic.rs:56:25
   |
LL |     type Opq0<'a, 'b> = impl Sized;
   |                         ^^^^^^^^^^

error[E0792]: expected generic lifetime parameter, found `'a`
  --> $DIR/higher-ranked-regions-basic.rs:57:65
   |
LL |     type Opq0<'a, 'b> = impl Sized;
   |               -- this generic parameter must be used with a generic lifetime parameter
LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'static>> {}
   |                                                                 ^^

error: non-defining opaque type use in defining scope
  --> $DIR/higher-ranked-regions-basic.rs:66:41
   |
LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {}
   |                                         ^^^^^^^^^^^^^^^^^ generic argument `'a` used twice
   |
note: for this opaque type
  --> $DIR/higher-ranked-regions-basic.rs:65:25
   |
LL |     type Opq0<'a, 'b> = impl Sized;
   |                         ^^^^^^^^^^

error[E0792]: expected generic lifetime parameter, found `'a`
  --> $DIR/higher-ranked-regions-basic.rs:66:60
   |
LL |     type Opq0<'a, 'b> = impl Sized;
   |               -- this generic parameter must be used with a generic lifetime parameter
LL |     fn test() -> impl for<'a> Trait<'a, Ty = Opq0<'a, 'a>> {}
   |                                                            ^^

error[E0792]: expected generic lifetime parameter, found `'a`
  --> $DIR/higher-ranked-regions-basic.rs:76:23
   |
LL |     type Opq1<'a> = impl for<'b> Trait<'b, Ty = Opq0<'a, 'b>>;
   |               -- this generic parameter must be used with a generic lifetime parameter
LL |     type Opq2 = impl for<'a> Trait<'a, Ty = Opq1<'a>>;
LL |     fn test() -> Opq2 {}
   |                       ^^

error: aborting due to 10 previous errors

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