mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
20 lines
802 B
Plaintext
20 lines
802 B
Plaintext
error[E0164]: expected tuple struct or tuple variant, found associated function `Path::new`
|
|
--> $DIR/match-fn-call.rs:6:9
|
|
|
|
|
LL | Path::new("foo") => println!("foo"),
|
|
| ^^^^^^^^^^^^^^^^ `fn` calls are not allowed in patterns
|
|
|
|
|
= help: for more information, visit https://doc.rust-lang.org/book/ch18-00-patterns.html
|
|
|
|
error[E0164]: expected tuple struct or tuple variant, found associated function `Path::new`
|
|
--> $DIR/match-fn-call.rs:8:9
|
|
|
|
|
LL | Path::new("bar") => println!("bar"),
|
|
| ^^^^^^^^^^^^^^^^ `fn` calls are not allowed in patterns
|
|
|
|
|
= help: for more information, visit https://doc.rust-lang.org/book/ch18-00-patterns.html
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0164`.
|