Skip to content

Commit b3ddf3c

Browse files
authored
Rollup merge of #142066 - ferrocene:lw/edition-2015-tests, r=compiler-errors
More simple 2015 edition test decoupling This should be the last of these PRs for now. The remaining tests that do not work on other editions than 2015 either need the range support (so blocked on the MCP), need normalization rules (which needs discussions first/same MCP) or revisions. r? compiler-errors
2 parents bdf7b74 + 2549962 commit b3ddf3c

File tree

109 files changed

+356
-371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+356
-371
lines changed

tests/ui/auxiliary/typeid-intrinsic-aux1.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ pub struct E(Result<&'static str, isize>);
99
pub type F = Option<isize>;
1010
pub type G = usize;
1111
pub type H = &'static str;
12-
pub type I = Box<Fn()>;
13-
pub type I32Iterator = Iterator<Item=i32>;
14-
pub type U32Iterator = Iterator<Item=u32>;
12+
pub type I = Box<dyn Fn()>;
13+
pub type I32Iterator = dyn Iterator<Item=i32>;
14+
pub type U32Iterator = dyn Iterator<Item=u32>;
1515

1616
pub fn id_A() -> TypeId { TypeId::of::<A>() }
1717
pub fn id_B() -> TypeId { TypeId::of::<B>() }

tests/ui/auxiliary/typeid-intrinsic-aux2.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ pub struct E(Result<&'static str, isize>);
99
pub type F = Option<isize>;
1010
pub type G = usize;
1111
pub type H = &'static str;
12-
pub type I = Box<Fn()>;
13-
pub type I32Iterator = Iterator<Item=i32>;
14-
pub type U32Iterator = Iterator<Item=u32>;
12+
pub type I = Box<dyn Fn()>;
13+
pub type I32Iterator = dyn Iterator<Item=i32>;
14+
pub type U32Iterator = dyn Iterator<Item=u32>;
1515

1616
pub fn id_A() -> TypeId { TypeId::of::<A>() }
1717
pub fn id_B() -> TypeId { TypeId::of::<B>() }

tests/ui/resolve/auxiliary/issue-80079.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![crate_type = "lib"]
22

33
pub mod public {
4-
use private_import;
4+
use crate::private_import;
55

66
// should not be suggested since it is private
77
struct Foo;

tests/ui/resolve/auxiliary/privacy-struct-ctor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pub mod m {
22
pub struct S(u8);
33

44
pub mod n {
5-
pub(in m) struct Z(pub(in m::n) u8);
5+
pub(in crate::m) struct Z(pub(in crate::m::n) u8);
66
}
77
}
88

tests/ui/resolve/extern-prelude-fail.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ compile-flags:--extern extern_prelude
23
//@ aux-build:extern-prelude.rs
34

tests/ui/resolve/extern-prelude-fail.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0432]: unresolved import `extern_prelude`
2-
--> $DIR/extern-prelude-fail.rs:7:9
2+
--> $DIR/extern-prelude-fail.rs:8:9
33
|
44
LL | use extern_prelude::S;
55
| ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `extern_prelude`
@@ -10,7 +10,7 @@ LL + extern crate extern_prelude;
1010
|
1111

1212
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `extern_prelude`
13-
--> $DIR/extern-prelude-fail.rs:8:15
13+
--> $DIR/extern-prelude-fail.rs:9:15
1414
|
1515
LL | let s = ::extern_prelude::S;
1616
| ^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `extern_prelude`

tests/ui/resolve/issue-42944.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod foo {
33
}
44

55
mod bar {
6-
use foo::Bx;
6+
use crate::foo::Bx;
77

88
fn foo() {
99
Bx(());

tests/ui/resolve/issue-5035.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ trait I {}
44
type K = dyn I;
55
impl K for isize {} //~ ERROR expected trait, found type alias `K`
66

7-
use ImportError; //~ ERROR unresolved import `ImportError` [E0432]
7+
use crate::ImportError; //~ ERROR unresolved import `crate::ImportError` [E0432]
88
//~^ NOTE no `ImportError` in the root
99
impl ImportError for () {} // check that this is not an additional error (cf. issue #35142)
1010

tests/ui/resolve/issue-5035.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0432]: unresolved import `ImportError`
1+
error[E0432]: unresolved import `crate::ImportError`
22
--> $DIR/issue-5035.rs:7:5
33
|
4-
LL | use ImportError;
5-
| ^^^^^^^^^^^ no `ImportError` in the root
4+
LL | use crate::ImportError;
5+
| ^^^^^^^^^^^^^^^^^^ no `ImportError` in the root
66

77
error[E0404]: expected trait, found type alias `K`
88
--> $DIR/issue-5035.rs:5:6

tests/ui/resolve/privacy-enum-ctor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod m {
88
}
99

1010
pub mod n {
11-
pub(in m) enum Z {
11+
pub(in crate::m) enum Z {
1212
Fn(u8),
1313
Struct {
1414
s: u8,
@@ -17,7 +17,7 @@ mod m {
1717
}
1818
}
1919

20-
use m::n::Z; // OK, only the type is imported
20+
use crate::m::n::Z; // OK, only the type is imported
2121

2222
fn f() {
2323
n::Z;

0 commit comments

Comments
 (0)