-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlT-langRelevant to the language teamRelevant to the language team
Description
This code:
fn main() {
let o: Option<u32> = None;
let foo = || -> ! {
loop {}
};
o.unwrap_or_else(|| {
foo();
});
}
Will yield this warning:
main.rs:8:25: 10:6 warning: broken MIR (return = ()): bad assignment (u32 = ()): Sorts(ExpectedFound { expected: u32, found: () })
main.rs: 8 o.unwrap_or_else(|| {
main.rs: 9 foo();
main.rs:10 });
Metadata
Metadata
Assignees
Labels
A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlT-langRelevant to the language teamRelevant to the language team