Skip to content

early-prohibit objects with Self-containing supertraits#28629

Merged
bors merged 1 commit into
rust-lang:masterfrom
arielb1:supertrait-self
Sep 26, 2015
Merged

early-prohibit objects with Self-containing supertraits#28629
bors merged 1 commit into
rust-lang:masterfrom
arielb1:supertrait-self

Conversation

@arielb1
Copy link
Copy Markdown
Contributor

@arielb1 arielb1 commented Sep 24, 2015

Fixes #28576

r? @eddyb

@eddyb
Copy link
Copy Markdown
Contributor

eddyb commented Sep 24, 2015

@bors r+

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 24, 2015

📌 Commit 77e8f33 has been approved by eddyb

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 26, 2015

⌛ Testing commit 77e8f33 with merge 67e1c8f...

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 26, 2015

💔 Test failed - auto-linux-32-nopt-t

@arielb1
Copy link
Copy Markdown
Contributor Author

arielb1 commented Sep 26, 2015

failures:

---- [pretty] run-pass/task-spawn-move-and-copy.rs stdout ----

error: pretty-printed source does not match expected source

Eh, the // Copyr at start of "task-spawn-move-and-copy.rs" got truncated:

ight 2012 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.


#![allow(unknown_features)]
#![feature(box_syntax, std_misc)]

use std::thread;
use std::sync::mpsc::channel;

pub fn main() {
    let (tx, rx) = channel::<usize>();

    let x: Box<isize> = box 1;
    let x_in_parent = &(*x) as *const isize as usize;

    let t =
        thread::spawn(move || {
                      let x_in_child = &(*x) as *const isize as usize;
                      tx.send(x_in_child).unwrap(); });

    let x_in_child = rx.recv().unwrap();
    assert_eq!(x_in_parent , x_in_child);

    t.join();
}

cc @alexcrichton - this looks like a race condition.

@bors retry

@bors
Copy link
Copy Markdown
Collaborator

bors commented Sep 26, 2015

⌛ Testing commit 77e8f33 with merge 9169e6c...

bors added a commit that referenced this pull request Sep 26, 2015
@bors bors merged commit 77e8f33 into rust-lang:master Sep 26, 2015
@brson
Copy link
Copy Markdown
Contributor

brson commented Oct 2, 2015

This looks like it turns a scenario that previously ICE'd into an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants