mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
19 lines
802 B
Text
19 lines
802 B
Text
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`.
|