11error[E0106]: missing lifetime specifiers
2- --> $DIR/missing-lifetime-specifier.rs:27 :44
2+ --> $DIR/missing-lifetime-specifier.rs:26 :44
33 |
44LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
55 | ^^^ expected 2 lifetime parameters
@@ -11,21 +11,21 @@ LL | static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefC
1111 | ++++++++++++++++++
1212
1313error[E0106]: missing lifetime specifiers
14- --> $DIR/missing-lifetime-specifier.rs:31 :44
14+ --> $DIR/missing-lifetime-specifier.rs:30 :44
1515 |
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
1818 | |
1919 | expected named lifetime parameter
2020 |
2121 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
2222help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
2323 |
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+ | +++++++ ++++++++++++++++++
2626
2727error[E0106]: missing lifetime specifiers
28- --> $DIR/missing-lifetime-specifier.rs:35 :47
28+ --> $DIR/missing-lifetime-specifier.rs:34 :47
2929 |
3030LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
3131 | ^ expected 2 lifetime parameters
@@ -37,41 +37,46 @@ LL | static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> =
3737 | +++++++++++++++++
3838
3939error[E0106]: missing lifetime specifiers
40- --> $DIR/missing-lifetime-specifier.rs:39 :44
40+ --> $DIR/missing-lifetime-specifier.rs:38 :44
4141 |
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
4444 | |
4545 | expected named lifetime parameter
4646 |
4747 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
4848help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
4949 |
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+ | +++++++ +++++++++++++++++
5252
5353error[E0106]: missing lifetime specifier
54- --> $DIR/missing-lifetime-specifier.rs:48 :44
54+ --> $DIR/missing-lifetime-specifier.rs:47 :44
5555 |
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>>>>> =
5757 | ^ expected named lifetime parameter
5858 |
5959 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
6060help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
6161 |
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>>>>> =
6363 | +++++++
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+ |
6469
6570error[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
6772 |
6873LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
6974 | ^^^ ------- supplied 1 lifetime argument
7075 | |
7176 | expected 2 lifetime arguments
7277 |
7378note: 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
7580 |
7681LL | pub union Qux<'t, 'k, I> {
7782 | ^^^ -- --
@@ -81,22 +86,22 @@ LL | static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> =
8186 | +++++++++
8287
8388error[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
8590 |
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
9095 |
9196note: 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
9398 |
9499LL | trait Tar<'t, 'k, I> {}
95100 | ^^^ -- --
96101help: add missing lifetime argument
97102 |
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+ | +++++++++
100105
101106error: aborting due to 7 previous errors
102107
0 commit comments