1 error[E0106]: missing lifetime specifier
2 --> $DIR/impl-trait-missing-lifetime-gated.rs:9:54
4 LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
5 | ^ expected named lifetime parameter
7 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
8 help: consider using the `'static` lifetime
10 LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() }
13 error[E0106]: missing lifetime specifier
14 --> $DIR/impl-trait-missing-lifetime-gated.rs:19:60
16 LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
17 | ^ expected named lifetime parameter
19 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
20 help: consider using the `'static` lifetime
22 LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() }
25 error[E0106]: missing lifetime specifier
26 --> $DIR/impl-trait-missing-lifetime-gated.rs:27:58
28 LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
29 | ^^ expected named lifetime parameter
31 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
32 help: consider using the `'static` lifetime
34 LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
37 error[E0106]: missing lifetime specifier
38 --> $DIR/impl-trait-missing-lifetime-gated.rs:37:64
40 LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
41 | ^^ expected named lifetime parameter
43 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
44 help: consider using the `'static` lifetime
46 LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() }
49 error[E0106]: missing lifetime specifier
50 --> $DIR/impl-trait-missing-lifetime-gated.rs:47:37
52 LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() }
53 | ^ expected named lifetime parameter
55 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
56 help: consider using the `'static` lifetime
58 LL | fn g(mut x: impl Foo) -> Option<&'static ()> { x.next() }
61 error[E0106]: missing lifetime specifier
62 --> $DIR/impl-trait-missing-lifetime-gated.rs:58:41
64 LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
65 | ^ expected named lifetime parameter
67 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
68 help: consider using the `'static` lifetime
70 LL | fn g(mut x: impl Foo<()>) -> Option<&'static ()> { x.next() }
73 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
74 --> $DIR/impl-trait-missing-lifetime-gated.rs:6:35
76 LL | fn f(_: impl Iterator<Item = &()>) {}
77 | ^ expected named lifetime parameter
79 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
80 help: consider introducing a named lifetime parameter
82 LL | fn f<'a>(_: impl Iterator<Item = &'a ()>) {}
85 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
86 --> $DIR/impl-trait-missing-lifetime-gated.rs:9:39
88 LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() }
89 | ^ expected named lifetime parameter
91 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
92 help: consider introducing a named lifetime parameter
94 LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&()> { x.next() }
97 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
98 --> $DIR/impl-trait-missing-lifetime-gated.rs:24:35
100 LL | fn f(_: impl Iterator<Item = &'_ ()>) {}
101 | ^^ expected named lifetime parameter
103 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
104 help: consider introducing a named lifetime parameter
106 LL | fn f<'a>(_: impl Iterator<Item = &'a ()>) {}
109 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
110 --> $DIR/impl-trait-missing-lifetime-gated.rs:27:39
112 LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() }
113 | ^^ expected named lifetime parameter
115 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
116 help: consider introducing a named lifetime parameter
118 LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'_ ()> { x.next() }
121 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
122 --> $DIR/impl-trait-missing-lifetime-gated.rs:44:18
124 LL | fn f(_: impl Foo) {}
125 | ^^^ expected named lifetime parameter
127 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
128 help: consider introducing a named lifetime parameter
130 LL | fn f<'a>(_: impl Foo<'a>) {}
133 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
134 --> $DIR/impl-trait-missing-lifetime-gated.rs:47:22
136 LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() }
137 | ^^^ expected named lifetime parameter
139 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
140 help: consider introducing a named lifetime parameter
142 LL | fn g<'a>(mut x: impl Foo<'a>) -> Option<&()> { x.next() }
145 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
146 --> $DIR/impl-trait-missing-lifetime-gated.rs:55:22
148 LL | fn f(_: impl Foo<()>) {}
149 | ^ expected named lifetime parameter
151 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
152 help: consider introducing a named lifetime parameter
154 LL | fn f<'a>(_: impl Foo<'a, ()>) {}
157 error[E0658]: anonymous lifetimes in `impl Trait` are unstable
158 --> $DIR/impl-trait-missing-lifetime-gated.rs:58:26
160 LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() }
161 | ^ expected named lifetime parameter
163 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable
164 help: consider introducing a named lifetime parameter
166 LL | fn g<'a>(mut x: impl Foo<'a, ()>) -> Option<&()> { x.next() }
169 error: aborting due to 14 previous errors
171 Some errors have detailed explanations: E0106, E0658.
172 For more information about an error, try `rustc --explain E0106`.