1
1
error[E0106]: missing lifetime specifiers
2
- --> $DIR/missing-lifetime-specifier.rs:27 :44
2
+ --> $DIR/missing-lifetime-specifier.rs:26 :44
3
3
|
4
4
LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
5
5
| ^^^ expected 2 lifetime parameters
@@ -11,21 +11,21 @@ LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefC
11
11
| ++++++++++++++++++
12
12
13
13
error[E0106]: missing lifetime specifiers
14
- --> $DIR/missing-lifetime-specifier.rs:31 :44
14
+ --> $DIR/missing-lifetime-specifier.rs:30 :44
15
15
|
16
- LL | static b: RefCell<HashMap<i32, Vec<Vec<&Bar>>>> = RefCell::new(HashMap::new());
17
- | ^^^^ expected 2 lifetime parameters
16
+ LL | static b: RefCell<HashMap<i32, Vec<Vec<&dyn Bar>>>> = RefCell::new(HashMap::new());
17
+ | ^ ^^^ expected 2 lifetime parameters
18
18
| |
19
19
| expected named lifetime parameter
20
20
|
21
21
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
22
22
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
23
23
|
24
- LL | static b: RefCell<HashMap<i32, Vec<Vec<&'static Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
25
- | +++++++ ++++++++++++++++++
24
+ LL | static b: RefCell<HashMap<i32, Vec<Vec<&'static dyn Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
25
+ | +++++++ ++++++++++++++++++
26
26
27
27
error[E0106]: missing lifetime specifiers
28
- --> $DIR/missing-lifetime-specifier.rs:35 :47
28
+ --> $DIR/missing-lifetime-specifier.rs:34 :47
29
29
|
30
30
LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
31
31
| ^ expected 2 lifetime parameters
@@ -37,41 +37,46 @@ LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> =
37
37
| +++++++++++++++++
38
38
39
39
error[E0106]: missing lifetime specifiers
40
- --> $DIR/missing-lifetime-specifier.rs:39 :44
40
+ --> $DIR/missing-lifetime-specifier.rs:38 :44
41
41
|
42
- LL | static d: RefCell<HashMap<i32, Vec<Vec<&Tar<i32>>>>> = RefCell::new(HashMap::new());
43
- | ^ ^ expected 2 lifetime parameters
42
+ LL | static d: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<i32>>>>> = RefCell::new(HashMap::new());
43
+ | ^ ^ expected 2 lifetime parameters
44
44
| |
45
45
| expected named lifetime parameter
46
46
|
47
47
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
48
48
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
49
49
|
50
- LL | static d: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
51
- | +++++++ +++++++++++++++++
50
+ LL | static d: RefCell<HashMap<i32, Vec<Vec<&'static dyn Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
51
+ | +++++++ +++++++++++++++++
52
52
53
53
error[E0106]: missing lifetime specifier
54
- --> $DIR/missing-lifetime-specifier.rs:48 :44
54
+ --> $DIR/missing-lifetime-specifier.rs:47 :44
55
55
|
56
- LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
56
+ LL | static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, i32>>>>> =
57
57
| ^ expected named lifetime parameter
58
58
|
59
59
= help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
60
60
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
61
61
|
62
- LL | static f: RefCell<HashMap<i32, Vec<Vec<&'static Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
62
+ LL | static f: RefCell<HashMap<i32, Vec<Vec<&'static dyn Tar<'static, i32>>>>> =
63
63
| +++++++
64
+ help: instead, you are more likely to want to return an owned value
65
+ |
66
+ LL - static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, i32>>>>> =
67
+ LL + static f: RefCell<HashMap<i32, Vec<Vec<dyn Tar<'static, i32>>>>> =
68
+ |
64
69
65
70
error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
66
- --> $DIR/missing-lifetime-specifier.rs:44 :44
71
+ --> $DIR/missing-lifetime-specifier.rs:43 :44
67
72
|
68
73
LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
69
74
| ^^^ ------- supplied 1 lifetime argument
70
75
| |
71
76
| expected 2 lifetime arguments
72
77
|
73
78
note: union defined here, with 2 lifetime parameters: `'t`, `'k`
74
- --> $DIR/missing-lifetime-specifier.rs:20 :11
79
+ --> $DIR/missing-lifetime-specifier.rs:19 :11
75
80
|
76
81
LL | pub union Qux<'t, 'k, I> {
77
82
| ^^^ -- --
@@ -81,22 +86,22 @@ LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> =
81
86
| +++++++++
82
87
83
88
error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
84
- --> $DIR/missing-lifetime-specifier.rs:48:45
89
+ --> $DIR/missing-lifetime-specifier.rs:47:49
85
90
|
86
- LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, i32>>>>> = RefCell::new(HashMap::new());
87
- | ^^^ ------- supplied 1 lifetime argument
88
- | |
89
- | expected 2 lifetime arguments
91
+ LL | static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, i32>>>>> =
92
+ | ^^^ ------- supplied 1 lifetime argument
93
+ | |
94
+ | expected 2 lifetime arguments
90
95
|
91
96
note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
92
- --> $DIR/missing-lifetime-specifier.rs:24 :7
97
+ --> $DIR/missing-lifetime-specifier.rs:23 :7
93
98
|
94
99
LL | trait Tar<'t, 'k, I> {}
95
100
| ^^^ -- --
96
101
help: add missing lifetime argument
97
102
|
98
- LL | static f: RefCell<HashMap<i32, Vec<Vec<&Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
99
- | +++++++++
103
+ LL | static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, 'static, i32>>>>> =
104
+ | +++++++++
100
105
101
106
error: aborting due to 7 previous errors
102
107
0 commit comments