-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundnessregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
#![allow(dead_code)]
#[derive(Debug)]
#[repr(i32)]
enum E {
Min = -2147483648i32,
Max = 2147483647i32,
}
fn main() {
println!("{:?}", Some(E::Min));
}
Rust 1.23.0 correctly prints Some(Min)
. Rust 1.24.0 incorrectly prints None
.
Mentioning @eddyb because this sounds potentially relevant to #45225 or follow-on optimization.
(Discovered by @udoprog in #rust.)
Metadata
Metadata
Assignees
Labels
I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundnessregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.