fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0106]: missing lifetime specifier 2 --> $DIR/issue-26638.rs:1:62 3 | 4LL | fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.next() } 5 | ^ expected named lifetime parameter 6 | 7 = help: this function's return type contains a borrowed value, but the signature does not say which one of `iter`'s 2 lifetimes it is borrowed from 8help: consider introducing a named lifetime parameter 9 | 10LL | fn parse_type<'lifetime>(iter: Box<dyn Iterator<Item=&str>+'static>) -> &'lifetime str { iter.next() } 11 | ^^^^^^^^^^^ ^^^^^^^^^^ 12 13error[E0106]: missing lifetime specifier 14 --> $DIR/issue-26638.rs:4:40 15 | 16LL | fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } 17 | ^ help: consider giving it an explicit bounded or 'static lifetime: `&'static` 18 | 19 = help: this function's return type contains a borrowed value with an elided lifetime, but the lifetime cannot be derived from the arguments 20 21error[E0106]: missing lifetime specifier 22 --> $DIR/issue-26638.rs:7:22 23 | 24LL | fn parse_type_3() -> &str { unimplemented!() } 25 | ^ help: consider giving it a 'static lifetime: `&'static` 26 | 27 = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from 28 29error: aborting due to 3 previous errors 30 31For more information about this error, try `rustc --explain E0106`.