rust/tests/ui/lifetimes/issue-26638.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
461 B
Rust
Raw Normal View History

2019-05-28 18:46:13 +00:00
fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.next() }
//~^ ERROR missing lifetime specifier [E0106]
2022-06-05 16:33:09 +00:00
//~| ERROR mismatched types
fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() }
//~^ ERROR missing lifetime specifier [E0106]
2022-06-05 16:33:09 +00:00
//~| ERROR mismatched types
//~| ERROR function takes 1 argument but 0 arguments were supplied
2015-12-01 14:08:00 +00:00
fn parse_type_3() -> &str { unimplemented!() }
//~^ ERROR missing lifetime specifier [E0106]
fn main() {}