1error[E0106]: missing lifetime specifier 2 --> $DIR/impl-trait-missing-lifetime-gated.rs:9:54 3 | 4LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() } 5 | ^ expected named lifetime parameter 6 | 7 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 8help: consider using the `'static` lifetime 9 | 10LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() } 11 | +++++++ 12 13error[E0106]: missing lifetime specifier 14 --> $DIR/impl-trait-missing-lifetime-gated.rs:19:60 15 | 16LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() } 17 | ^ expected named lifetime parameter 18 | 19 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 20help: consider using the `'static` lifetime 21 | 22LL | async fn i(mut x: impl Iterator<Item = &()>) -> Option<&'static ()> { x.next() } 23 | +++++++ 24 25error[E0106]: missing lifetime specifier 26 --> $DIR/impl-trait-missing-lifetime-gated.rs:27:58 27 | 28LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() } 29 | ^^ expected named lifetime parameter 30 | 31 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 32help: consider using the `'static` lifetime 33 | 34LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() } 35 | ~~~~~~~ 36 37error[E0106]: missing lifetime specifier 38 --> $DIR/impl-trait-missing-lifetime-gated.rs:37:64 39 | 40LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() } 41 | ^^ expected named lifetime parameter 42 | 43 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 44help: consider using the `'static` lifetime 45 | 46LL | async fn i(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'static ()> { x.next() } 47 | ~~~~~~~ 48 49error[E0106]: missing lifetime specifier 50 --> $DIR/impl-trait-missing-lifetime-gated.rs:47:37 51 | 52LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() } 53 | ^ expected named lifetime parameter 54 | 55 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 56help: consider using the `'static` lifetime 57 | 58LL | fn g(mut x: impl Foo) -> Option<&'static ()> { x.next() } 59 | +++++++ 60 61error[E0106]: missing lifetime specifier 62 --> $DIR/impl-trait-missing-lifetime-gated.rs:58:41 63 | 64LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() } 65 | ^ expected named lifetime parameter 66 | 67 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 68help: consider using the `'static` lifetime 69 | 70LL | fn g(mut x: impl Foo<()>) -> Option<&'static ()> { x.next() } 71 | +++++++ 72 73error[E0658]: anonymous lifetimes in `impl Trait` are unstable 74 --> $DIR/impl-trait-missing-lifetime-gated.rs:6:35 75 | 76LL | fn f(_: impl Iterator<Item = &()>) {} 77 | ^ expected named lifetime parameter 78 | 79 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 80help: consider introducing a named lifetime parameter 81 | 82LL | fn f<'a>(_: impl Iterator<Item = &'a ()>) {} 83 | ++++ ++ 84 85error[E0658]: anonymous lifetimes in `impl Trait` are unstable 86 --> $DIR/impl-trait-missing-lifetime-gated.rs:9:39 87 | 88LL | fn g(mut x: impl Iterator<Item = &()>) -> Option<&()> { x.next() } 89 | ^ expected named lifetime parameter 90 | 91 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 92help: consider introducing a named lifetime parameter 93 | 94LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&()> { x.next() } 95 | ++++ ++ 96 97error[E0658]: anonymous lifetimes in `impl Trait` are unstable 98 --> $DIR/impl-trait-missing-lifetime-gated.rs:24:35 99 | 100LL | fn f(_: impl Iterator<Item = &'_ ()>) {} 101 | ^^ expected named lifetime parameter 102 | 103 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 104help: consider introducing a named lifetime parameter 105 | 106LL | fn f<'a>(_: impl Iterator<Item = &'a ()>) {} 107 | ++++ ~~ 108 109error[E0658]: anonymous lifetimes in `impl Trait` are unstable 110 --> $DIR/impl-trait-missing-lifetime-gated.rs:27:39 111 | 112LL | fn g(mut x: impl Iterator<Item = &'_ ()>) -> Option<&'_ ()> { x.next() } 113 | ^^ expected named lifetime parameter 114 | 115 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 116help: consider introducing a named lifetime parameter 117 | 118LL | fn g<'a>(mut x: impl Iterator<Item = &'a ()>) -> Option<&'_ ()> { x.next() } 119 | ++++ ~~ 120 121error[E0658]: anonymous lifetimes in `impl Trait` are unstable 122 --> $DIR/impl-trait-missing-lifetime-gated.rs:44:18 123 | 124LL | fn f(_: impl Foo) {} 125 | ^^^ expected named lifetime parameter 126 | 127 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 128help: consider introducing a named lifetime parameter 129 | 130LL | fn f<'a>(_: impl Foo<'a>) {} 131 | ++++ ++++ 132 133error[E0658]: anonymous lifetimes in `impl Trait` are unstable 134 --> $DIR/impl-trait-missing-lifetime-gated.rs:47:22 135 | 136LL | fn g(mut x: impl Foo) -> Option<&()> { x.next() } 137 | ^^^ expected named lifetime parameter 138 | 139 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 140help: consider introducing a named lifetime parameter 141 | 142LL | fn g<'a>(mut x: impl Foo<'a>) -> Option<&()> { x.next() } 143 | ++++ ++++ 144 145error[E0658]: anonymous lifetimes in `impl Trait` are unstable 146 --> $DIR/impl-trait-missing-lifetime-gated.rs:55:22 147 | 148LL | fn f(_: impl Foo<()>) {} 149 | ^ expected named lifetime parameter 150 | 151 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 152help: consider introducing a named lifetime parameter 153 | 154LL | fn f<'a>(_: impl Foo<'a, ()>) {} 155 | ++++ +++ 156 157error[E0658]: anonymous lifetimes in `impl Trait` are unstable 158 --> $DIR/impl-trait-missing-lifetime-gated.rs:58:26 159 | 160LL | fn g(mut x: impl Foo<()>) -> Option<&()> { x.next() } 161 | ^ expected named lifetime parameter 162 | 163 = help: add `#![feature(anonymous_lifetime_in_impl_trait)]` to the crate attributes to enable 164help: consider introducing a named lifetime parameter 165 | 166LL | fn g<'a>(mut x: impl Foo<'a, ()>) -> Option<&()> { x.next() } 167 | ++++ +++ 168 169error: aborting due to 14 previous errors 170 171Some errors have detailed explanations: E0106, E0658. 172For more information about an error, try `rustc --explain E0106`. 173