-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
mod foo { pub fn bar() {} }
fn main() {
match () {
foo::bar => {}
}
}
function-match.rs:4:9: 4:17 error: mismatched types: expected `()` but found an enum or structure pattern
function-match.rs:4 foo::bar => {}
^~~~~~~~
This should be complaining about mismatched types.
(The module is necessary to force the compiler search/use the function; with just bar => {}
it takes bar
to be a variable binding.)
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.