Skip to content

Commit 58bb781

Browse files
committed
---
yaml --- r: 229212 b: refs/heads/try c: dcf7ac6 h: refs/heads/master v: v3
1 parent 1486ae3 commit 58bb781

File tree

8 files changed

+81
-15
lines changed

8 files changed

+81
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 2b4124684e26708038b6678a38fcfbeeecb90c6e
4+
refs/heads/try: dcf7ac6f9a84ae52b07f9d7310637c9f9d9815ce
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/test/compile-fail/issue-12997-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#[bench]
1616
fn bar(x: isize) { }
1717
//~^ ERROR mismatched types
18-
//~| expected `fn(&mut test::Bencher)`
18+
//~| expected `fn(&mut __test::test::Bencher)`
1919
//~| found `fn(isize) {bar}`
2020
//~| expected &-ptr
2121
//~| found isize
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! Test that absolute path names are correct when a crate is not linked into the root namespace
12+
13+
mod foo {
14+
extern crate core;
15+
}
16+
17+
fn assert_clone<T>() where T : Clone { }
18+
19+
fn main() {
20+
assert_clone::<foo::core::atomic::AtomicBool>();
21+
//~^ ERROR the trait `foo::core::clone::Clone` is not implemented for the type `foo::core::
22+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! Test that when a crate is linked under another name that that name is used in global paths
12+
13+
extern crate core as bar;
14+
15+
fn assert_clone<T>() where T : Clone { }
16+
17+
fn main() {
18+
assert_clone::<bar::atomic::AtomicBool>();
19+
//~^ ERROR the trait `bar::clone::Clone` is not implemented for the type `bar::atomic::
20+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
//! Test that when a crate is linked multiple times that the shortest absolute path name is used
12+
13+
mod foo {
14+
extern crate core;
15+
}
16+
17+
extern crate core;
18+
19+
fn assert_clone<T>() where T : Clone { }
20+
21+
fn main() {
22+
assert_clone::<foo::core::atomic::AtomicBool>();
23+
//~^ ERROR the trait `core::clone::Clone` is not implemented for the type `core::atomic::
24+
}

branches/try/src/test/compile-fail/privacy5.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,30 +101,30 @@ fn xcrate() {
101101
let c = other::C(2, 3); //~ ERROR: cannot invoke tuple struct constructor
102102
let d = other::D(4);
103103

104-
let other::A(()) = a; //~ ERROR: field #1 of struct `privacy_tuple_struct::A` is private
104+
let other::A(()) = a; //~ ERROR: field #1 of struct `other::A` is private
105105
let other::A(_) = a;
106106
match a { other::A(()) => {} }
107-
//~^ ERROR: field #1 of struct `privacy_tuple_struct::A` is private
107+
//~^ ERROR: field #1 of struct `other::A` is private
108108
match a { other::A(_) => {} }
109109

110110
let other::B(_) = b;
111-
let other::B(_b) = b; //~ ERROR: field #1 of struct `privacy_tuple_struct::B` is private
111+
let other::B(_b) = b; //~ ERROR: field #1 of struct `other::B` is private
112112
match b { other::B(_) => {} }
113113
match b { other::B(_b) => {} }
114-
//~^ ERROR: field #1 of struct `privacy_tuple_struct::B` is private
114+
//~^ ERROR: field #1 of struct `other::B` is private
115115
match b { other::B(1) => {} other::B(_) => {} }
116-
//~^ ERROR: field #1 of struct `privacy_tuple_struct::B` is private
116+
//~^ ERROR: field #1 of struct `other::B` is private
117117

118118
let other::C(_, _) = c;
119119
let other::C(_a, _) = c;
120-
let other::C(_, _b) = c; //~ ERROR: field #2 of struct `privacy_tuple_struct::C` is private
121-
let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `privacy_tuple_struct::C` is private
120+
let other::C(_, _b) = c; //~ ERROR: field #2 of struct `other::C` is private
121+
let other::C(_a, _b) = c; //~ ERROR: field #2 of struct `other::C` is private
122122
match c { other::C(_, _) => {} }
123123
match c { other::C(_a, _) => {} }
124124
match c { other::C(_, _b) => {} }
125-
//~^ ERROR: field #2 of struct `privacy_tuple_struct::C` is private
125+
//~^ ERROR: field #2 of struct `other::C` is private
126126
match c { other::C(_a, _b) => {} }
127-
//~^ ERROR: field #2 of struct `privacy_tuple_struct::C` is private
127+
//~^ ERROR: field #2 of struct `other::C` is private
128128

129129
let other::D(_) = d;
130130
let other::D(_d) = d;

branches/try/src/test/compile-fail/struct-field-privacy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ fn test(a: A, b: inner::A, c: inner::B, d: xc::A, e: xc::B) {
3737
c.a;
3838
c.b; //~ ERROR: field `b` of struct `inner::B` is private
3939

40-
d.a; //~ ERROR: field `a` of struct `struct_field_privacy::A` is private
40+
d.a; //~ ERROR: field `a` of struct `xc::A` is private
4141
d.b;
4242

4343
e.a;
44-
e.b; //~ ERROR: field `b` of struct `struct_field_privacy::B` is private
44+
e.b; //~ ERROR: field `b` of struct `xc::B` is private
4545
}
4646

4747
fn main() {}

branches/try/src/test/compile-fail/suggest-private-fields.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ struct A {
2222
fn main () {
2323
// external crate struct
2424
let k = B {
25-
aa: 20, //~ ERROR structure `struct_field_privacy::B` has no field named `aa`
25+
aa: 20, //~ ERROR structure `xc::B` has no field named `aa`
2626
//~^ HELP did you mean `a`?
27-
bb: 20, //~ ERROR structure `struct_field_privacy::B` has no field named `bb`
27+
bb: 20, //~ ERROR structure `xc::B` has no field named `bb`
2828
};
2929
// local crate struct
3030
let l = A {

0 commit comments

Comments
 (0)