-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-type-systemArea: Type systemArea: Type system
Milestone
Description
This looks inferrable.
fn main() {
let early_error: fn@(str) -> ! = {|msg|
fail
};
}
../src/test/run-pass/infer-closure.rs:2:38: 4:5 warning: unable to infer kind of closure, defaulting to block
../src/test/run-pass/infer-closure.rs:2 let early_error: fn@(str) -> ! = {|msg|
../src/test/run-pass/infer-closure.rs:3 fail
../src/test/run-pass/infer-closure.rs:4 };
../src/test/run-pass/infer-closure.rs:2:38: 4:5 error: mismatched types: expected `fn@(++str) -> !` but found `fn&(<T2>) -> <T3>` (types differ)
../src/test/run-pass/infer-closure.rs:2 let early_error: fn@(str) -> ! = {|msg|
../src/test/run-pass/infer-closure.rs:3 fail
../src/test/run-pass/infer-closure.rs:4 };
../src/test/run-pass/infer-closure.rs:2:38: 4:5 error: cannot determine a type for this expression
../src/test/run-pass/infer-closure.rs:2 let early_error: fn@(str) -> ! = {|msg|
../src/test/run-pass/infer-closure.rs:3 fail
../src/test/run-pass/infer-closure.rs:4 };
error: aborting due to previous errors
Metadata
Metadata
Assignees
Labels
A-type-systemArea: Type systemArea: Type system