Auto merge of #1172 - RalfJung:rustup, r=RalfJung
Rustup and also a test for https://github.com/rust-lang/rust/issues/68303
This commit is contained in:
commit
49aafadfb8
2 changed files with 10 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
b5e21dbb5cabdaaadc47a4d8e3f59979dcad2871
|
||||
2d2be570970d784db5539a1d309cd22b85be910a
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ fn main() {
|
|||
basic();
|
||||
ref_protector();
|
||||
ref_mut_protector();
|
||||
rust_issue_68303();
|
||||
}
|
||||
|
||||
fn basic() {
|
||||
|
|
@ -66,3 +67,11 @@ fn ref_mut_protector() {
|
|||
let rc = RefCell::new(0);
|
||||
break_it(&rc, rc.borrow_mut())
|
||||
}
|
||||
|
||||
/// Make sure we do not have bad enum layout optimizations.
|
||||
fn rust_issue_68303() {
|
||||
let optional=Some(RefCell::new(false));
|
||||
let mut handle=optional.as_ref().unwrap().borrow_mut();
|
||||
assert!(optional.is_some());
|
||||
*handle=true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue