rust/tests/ui/async-await/issue-66312.rs
2024-02-16 20:02:50 +00:00

15 lines
234 B
Rust

//@ edition:2018
trait Test<T> {
fn is_some(self: T); //~ ERROR invalid `self` parameter type
}
async fn f() {
let x = Some(2);
if x.is_some() { //~ ERROR mismatched types
println!("Some");
}
}
fn main() {}