mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
15 lines
233 B
Rust
15 lines
233 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() {}
|