Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmac-0.1.0 fails test suite due to type inference regression in Rust 1.15 #39808
Comments
brson
added
the
regression-from-stable-to-stable
label
Feb 14, 2017
This comment has been minimized.
This comment has been minimized.
|
Likely #39440? This is not considered a breakage. Actionable items: send PR to the crate or inform the author of the issue. |
This comment has been minimized.
This comment has been minimized.
|
Merged 10 days ago and it's in stable already? |
This comment has been minimized.
This comment has been minimized.
|
Oh well, then whatever other new impl for |
This comment has been minimized.
This comment has been minimized.
|
Yeah. Why wasn't this caught during the beta period though? |
This comment has been minimized.
This comment has been minimized.
|
It's actually because of the never-type stuff. The type error is complaining about a block that says |
This comment has been minimized.
This comment has been minimized.
|
Minimized: use std::borrow::Cow;
fn main() {
let _ = if false {
Cow::Owned(format!("{:?}", panic!())) /* as Cow<str> */ // uncomment to fix
} else {
Cow::Borrowed("")
};
} |
This comment has been minimized.
This comment has been minimized.
|
Oh wow, this sounds nasty. Especially since typeck shouldn’t even bother figuring out the type of the branch with |
golddranks
referenced this issue
Feb 20, 2017
Closed
Type inference regression in recent nightly #39984
brson
added
I-nominated
T-lang
labels
Mar 2, 2017
This comment has been minimized.
This comment has been minimized.
|
This is because of #39485, where we updated our handling of diverging types to be more consistent. |
This comment has been minimized.
This comment has been minimized.
|
Oh, well, it says stable-to-stable, so I guess not. But yes, related to the handling of diverging types. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Even smaller example: fn main() {
let _ = if false {
Ok(panic!())
} else {
Err("")
};
} |
This comment has been minimized.
This comment has been minimized.
|
triage: P-high along with #39984 |
brson commentedFeb 14, 2017
This is on 1.15. Not 1.14.
cc @reem