2018-11-07 12:26:05 +08:00
|
|
|
use std::path::Path;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let path = Path::new("foo");
|
|
|
|
match path {
|
|
|
|
Path::new("foo") => println!("foo"),
|
2019-10-14 17:20:50 -07:00
|
|
|
//~^ ERROR expected tuple struct or tuple variant
|
2018-11-07 12:26:05 +08:00
|
|
|
Path::new("bar") => println!("bar"),
|
2019-10-14 17:20:50 -07:00
|
|
|
//~^ ERROR expected tuple struct or tuple variant
|
2018-11-07 12:26:05 +08:00
|
|
|
_ => (),
|
|
|
|
}
|
|
|
|
}
|