blob: 50851a5b0f84cb21d94cb406c95b564aa277a7ed [file] [log] [blame]
//@ edition: 2021
fn f<'a>(x: Box<dyn Fn() -> Option<usize + 'a>>) -> usize {
//~^ ERROR expected trait, found builtin type `usize`
//~| ERROR expected a type, found a trait [E0782]
0
}
fn create_adder<'a>(x: i32) -> usize + 'a {
//~^ ERROR expected trait, found builtin type `usize`
//~| ERROR expected a type, found a trait [E0782]
move |y| x + y
}
struct Struct<'a>{
x: usize + 'a,
//~^ ERROR expected trait, found builtin type `usize`
//~| ERROR expected a type, found a trait [E0782]
}
fn main() {
}