Closed
Description
The following MVE prints 42
with rustc 1.45.0 but 13
with rustc 1.44.0
struct Foo {
x: i32,
}
fn main() {
let mut foo = Foo { x: 42 };
let x = &mut foo.x;
*x = 13;
let y = foo;
println!("{}", y.x); // -> 42; expected result: 13
}
Initially reported on Stack Overflow.
Metadata
Metadata
Assignees
Labels
Category: This is a bug.Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessCritical priorityRelevant to the release subteam, which will review and decide on the PR/issue.Performance or correctness regression from one stable version to another.