-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #5806 Closes #5950 Closes #7178 Closes #8259 Closes #8578 Closes #8851 Closes #9129 Closes #10412
- Loading branch information
1 parent
000cda6
commit 3e04d2e
Showing
10 changed files
with
227 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,17 @@ | ||
// Copyright 2013 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. | ||
|
||
pub struct Foo<'a, A>(&'a A); | ||
|
||
impl<'a, A> Foo<'a, A> { | ||
pub fn new(a: &'a A) -> Foo<'a, A> { | ||
Foo(a) | ||
} | ||
} |
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,15 @@ | ||
// Copyright 2013 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. | ||
|
||
|
||
pub enum Foo<'a> { | ||
A, | ||
B(&'a str), | ||
} |
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,31 @@ | ||
// Copyright 2013 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. | ||
|
||
|
||
trait Serializable<'self, T> { //~ ERROR: no longer a special lifetime | ||
fn serialize(val : &'self T) -> ~[u8]; | ||
fn deserialize(repr : &[u8]) -> &'self T; | ||
} | ||
|
||
impl<'self> Serializable<str> for &'self str { | ||
fn serialize(val : &'self str) -> ~[u8] { | ||
~[1] | ||
} | ||
fn deserialize(repr: &[u8]) -> &'self str { | ||
"hi" | ||
} | ||
} | ||
|
||
fn main() { | ||
println("hello"); | ||
let x = ~"foo"; | ||
let y = x; | ||
println(y); | ||
} |
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,14 @@ | ||
// opyright 2013 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. | ||
|
||
#[path = "../compile-fail"] | ||
mod foo; //~ ERROR: illegal operation on a directory | ||
|
||
fn main() {} |
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,17 @@ | ||
// Copyright 2013 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. | ||
|
||
// xfail-fast | ||
|
||
pub use local_alias = local; | ||
|
||
mod local { } | ||
|
||
fn main() {} |
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,18 @@ | ||
// Copyright 2013 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. | ||
|
||
// xfail-fast | ||
// aux-build:issue-7178.rs | ||
|
||
extern mod cross_crate_self = "issue-7178"; | ||
|
||
fn main() { | ||
let _ = cross_crate_self::Foo::new(&1i); | ||
} |
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,17 @@ | ||
// Copyright 2013 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. | ||
|
||
// xfail-fast | ||
// aux-build:issue-8259.rs | ||
|
||
extern mod other = "issue-8259"; | ||
static a: other::Foo<'static> = other::A; | ||
|
||
fn main() {} |
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 2013 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. | ||
|
||
pub struct UninterpretedOption_NamePart { | ||
name_part: Option<~str>, | ||
} | ||
|
||
impl<'a> UninterpretedOption_NamePart { | ||
pub fn default_instance() -> &'static UninterpretedOption_NamePart { | ||
static instance: UninterpretedOption_NamePart = UninterpretedOption_NamePart { | ||
name_part: None, | ||
}; | ||
&'static instance | ||
} | ||
} | ||
|
||
pub fn main() {} |
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,33 @@ | ||
// Copyright 2013 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. | ||
|
||
#[feature(macro_rules)]; | ||
|
||
enum T { | ||
A(int), | ||
B(uint) | ||
} | ||
|
||
macro_rules! test( | ||
($e:expr) => ( | ||
fn foo(t: T) -> int { | ||
match t { | ||
A(y) => $e, | ||
B(y) => $e | ||
} | ||
} | ||
) | ||
) | ||
|
||
test!(10 + (y as int)) | ||
|
||
pub fn main() { | ||
foo(A(20)); | ||
} |
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,41 @@ | ||
// Copyright 2013 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. | ||
|
||
// xfail-pretty | ||
|
||
#[feature(managed_boxes, macro_rules)]; | ||
|
||
pub trait bomb { fn boom(@self, Ident); } | ||
pub struct S; | ||
impl bomb for S { fn boom(@self, _: Ident) { } } | ||
|
||
pub struct Ident { name: uint } | ||
|
||
// macro_rules! int3( () => ( unsafe { asm!( "int3" ); } ) ) | ||
macro_rules! int3( () => ( { } ) ) | ||
|
||
fn Ident_new() -> Ident { | ||
int3!(); | ||
Ident {name: 0x6789ABCD } | ||
} | ||
|
||
pub fn light_fuse(fld: @bomb) { | ||
int3!(); | ||
let f = || { | ||
int3!(); | ||
fld.boom(Ident_new()); // *** 1 | ||
}; | ||
f(); | ||
} | ||
|
||
pub fn main() { | ||
let b = @S as @bomb; | ||
light_fuse(b); | ||
} |
3e04d2e
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 alexcrichton
at alexcrichton@3e04d2e
3e04d2e
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 alexcrichton/rust/needstest = 3e04d2e into auto
3e04d2e
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.
alexcrichton/rust/needstest = 3e04d2e merged ok, testing candidate = 6d2e61b
3e04d2e
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/3059
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/902
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/904
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3065
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2167
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2168
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3076
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2165
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2170
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3078
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2166
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2169
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2245
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/3064
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2166
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2170
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2840
3e04d2e
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 = 6d2e61b