-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test ordering of glue_drop and glue_takew in self-re-assignment. Closes
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT | ||
// file at the top-level directory of this distribution and at | ||
// http://rust-lang.org/COPYRIGHT. | ||
// | ||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | ||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | ||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | ||
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// Ensure assigning an owned or managed variable to itself works. In particular, | ||
// that we do not glue_drop before we glue_take (#3290). | ||
|
||
use std::rc::Rc; | ||
|
||
pub fn main() { | ||
let mut x = ~3; | ||
x = x; | ||
assert!(*x == 3); | ||
|
||
let mut x = Rc::new(3); | ||
x = x; | ||
assert!(*x.borrow() == 3); | ||
} |
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from huonw
at nrc@8334915
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging nick29581/rust/glue = 8334915 into auto
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nick29581/rust/glue = 8334915 merged ok, testing candidate = 52030353
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some tests failed:
failure: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4316
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4303
exception: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/2146
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4301
exception: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3407
exception: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3410
exception: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1257
exception: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4310
exception: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3417
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from huonw
at nrc@8334915
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging nick29581/rust/glue = 8334915 into auto
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nick29581/rust/glue = 8334915 merged ok, testing candidate = 54bccc5
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/4311
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/2153
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/2154
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/4309
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/3409
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/3415
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/4324
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/3412
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/3418
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/4326
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/3412
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/3417
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/3486
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/1265
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/4318
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/3419
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/3425
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/4086
8334915
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 54bccc5