about summary refs log tree commit diff
path: root/tests/ui/suggestions/missing-lifetime-specifier.stderr
blob: b8c58155e636d9ac993ec1eee6b200c43ea53a83 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
error[E0106]: missing lifetime specifiers
  --> $DIR/missing-lifetime-specifier.rs:26:44
   |
LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo>>>> = RefCell::new(HashMap::new());
   |                                            ^^^ expected 2 lifetime parameters
   |
   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
   |
LL |     static a: RefCell<HashMap<i32, Vec<Vec<Foo<'static, 'static>>>>> = RefCell::new(HashMap::new());
   |                                               ++++++++++++++++++

error[E0106]: missing lifetime specifiers
  --> $DIR/missing-lifetime-specifier.rs:30:44
   |
LL |     static b: RefCell<HashMap<i32, Vec<Vec<&dyn Bar>>>> = RefCell::new(HashMap::new());
   |                                            ^    ^^^ expected 2 lifetime parameters
   |                                            |
   |                                            expected named lifetime parameter
   |
   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
   |
LL |     static b: RefCell<HashMap<i32, Vec<Vec<&'static dyn Bar<'static, 'static>>>>> = RefCell::new(HashMap::new());
   |                                             +++++++        ++++++++++++++++++

error[E0106]: missing lifetime specifiers
  --> $DIR/missing-lifetime-specifier.rs:34:47
   |
LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<i32>>>>> = RefCell::new(HashMap::new());
   |                                               ^ expected 2 lifetime parameters
   |
   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`, or if you will only have owned values
   |
LL |     static c: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
   |                                                +++++++++++++++++

error[E0106]: missing lifetime specifiers
  --> $DIR/missing-lifetime-specifier.rs:38:44
   |
LL |     static d: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<i32>>>>> = RefCell::new(HashMap::new());
   |                                            ^       ^ expected 2 lifetime parameters
   |                                            |
   |                                            expected named lifetime parameter
   |
   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
   |
LL |     static d: RefCell<HashMap<i32, Vec<Vec<&'static dyn Tar<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
   |                                             +++++++         +++++++++++++++++

error[E0106]: missing lifetime specifier
  --> $DIR/missing-lifetime-specifier.rs:47:44
   |
LL |     static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, i32>>>>> =
   |                                            ^ expected named lifetime parameter
   |
   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
help: consider using the `'static` lifetime, but this is uncommon unless you're returning a borrowed value from a `const` or a `static`
   |
LL |     static f: RefCell<HashMap<i32, Vec<Vec<&'static dyn Tar<'static, i32>>>>> =
   |                                             +++++++
help: instead, you are more likely to want to return an owned value
   |
LL -     static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, i32>>>>> =
LL +     static f: RefCell<HashMap<i32, Vec<Vec<dyn Tar<'static, i32>>>>> =
   |

error[E0107]: union takes 2 lifetime arguments but 1 lifetime argument was supplied
  --> $DIR/missing-lifetime-specifier.rs:43:44
   |
LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, i32>>>>> = RefCell::new(HashMap::new());
   |                                            ^^^ ------- supplied 1 lifetime argument
   |                                            |
   |                                            expected 2 lifetime arguments
   |
note: union defined here, with 2 lifetime parameters: `'t`, `'k`
  --> $DIR/missing-lifetime-specifier.rs:19:11
   |
LL | pub union Qux<'t, 'k, I> {
   |           ^^^ --  --
help: add missing lifetime argument
   |
LL |     static e: RefCell<HashMap<i32, Vec<Vec<Qux<'static, 'static, i32>>>>> = RefCell::new(HashMap::new());
   |                                                       +++++++++

error[E0107]: trait takes 2 lifetime arguments but 1 lifetime argument was supplied
  --> $DIR/missing-lifetime-specifier.rs:47:49
   |
LL |     static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, i32>>>>> =
   |                                                 ^^^ ------- supplied 1 lifetime argument
   |                                                 |
   |                                                 expected 2 lifetime arguments
   |
note: trait defined here, with 2 lifetime parameters: `'t`, `'k`
  --> $DIR/missing-lifetime-specifier.rs:23:7
   |
LL | trait Tar<'t, 'k, I> {}
   |       ^^^ --  --
help: add missing lifetime argument
   |
LL |     static f: RefCell<HashMap<i32, Vec<Vec<&dyn Tar<'static, 'static, i32>>>>> =
   |                                                            +++++++++

error: aborting due to 7 previous errors

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