Skip to content

Commit 1d7c1b1

Browse files
committed
Add more missing 2015 edition directives
1 parent 46326e1 commit 1d7c1b1

Some content is hidden

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

43 files changed

+90
-63
lines changed

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/resolve-bad-visibility.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
enum E {}
23
trait Tr {}
34

tests/ui/resolve/resolve-bad-visibility.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
error[E0577]: expected module, found enum `E`
2-
--> $DIR/resolve-bad-visibility.rs:4:8
2+
--> $DIR/resolve-bad-visibility.rs:5:8
33
|
44
LL | pub(in E) struct S;
55
| ^ not a module
66

77
error[E0577]: expected module, found trait `Tr`
8-
--> $DIR/resolve-bad-visibility.rs:5:8
8+
--> $DIR/resolve-bad-visibility.rs:6:8
99
|
1010
LL | pub(in Tr) struct Z;
1111
| ^^ not a module
1212

1313
error[E0742]: visibilities can only be restricted to ancestor modules
14-
--> $DIR/resolve-bad-visibility.rs:6:8
14+
--> $DIR/resolve-bad-visibility.rs:7:8
1515
|
1616
LL | pub(in std::vec) struct F;
1717
| ^^^^^^^^
1818

1919
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
20-
--> $DIR/resolve-bad-visibility.rs:7:8
20+
--> $DIR/resolve-bad-visibility.rs:8:8
2121
|
2222
LL | pub(in nonexistent) struct G;
2323
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
@@ -28,7 +28,7 @@ LL + extern crate nonexistent;
2828
|
2929

3030
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `too_soon`
31-
--> $DIR/resolve-bad-visibility.rs:8:8
31+
--> $DIR/resolve-bad-visibility.rs:9:8
3232
|
3333
LL | pub(in too_soon) struct H;
3434
| ^^^^^^^^ use of unresolved module or unlinked crate `too_soon`

tests/ui/resolve/suggest-builder-fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Bar {
3232
}
3333

3434
mod SomeMod {
35-
use Bar;
35+
use crate::Bar;
3636

3737
impl Bar {
3838
// Public method. Should be suggested

tests/ui/resolve/unresolved-segments-visibility.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern crate alloc as b;
55

66
mod foo {
77
mod bar {
8-
pub(in b::string::String::newy) extern crate alloc as e;
8+
pub(in crate::b::string::String::newy) extern crate alloc as e;
99
//~^ ERROR failed to resolve: `String` is a struct, not a module [E0433]
1010
}
1111
}

tests/ui/resolve/unresolved-segments-visibility.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0433]: failed to resolve: `String` is a struct, not a module
2-
--> $DIR/unresolved-segments-visibility.rs:8:27
2+
--> $DIR/unresolved-segments-visibility.rs:8:34
33
|
4-
LL | pub(in b::string::String::newy) extern crate alloc as e;
5-
| ^^^^^^ `String` is a struct, not a module
4+
LL | pub(in crate::b::string::String::newy) extern crate alloc as e;
5+
| ^^^^^^ `String` is a struct, not a module
66

77
error: aborting due to 1 previous error
88

tests/ui/rust-2018/edition-lint-fully-qualified-paths.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23

34
#![deny(absolute_paths_not_starting_with_crate)]

tests/ui/rust-2018/edition-lint-fully-qualified-paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23

34
#![deny(absolute_paths_not_starting_with_crate)]

tests/ui/rust-2018/edition-lint-fully-qualified-paths.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
2-
--> $DIR/edition-lint-fully-qualified-paths.rs:18:25
2+
--> $DIR/edition-lint-fully-qualified-paths.rs:19:25
33
|
44
LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
55
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
99
note: the lint level is defined here
10-
--> $DIR/edition-lint-fully-qualified-paths.rs:3:9
10+
--> $DIR/edition-lint-fully-qualified-paths.rs:4:9
1111
|
1212
LL | #![deny(absolute_paths_not_starting_with_crate)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
16-
--> $DIR/edition-lint-fully-qualified-paths.rs:18:25
16+
--> $DIR/edition-lint-fully-qualified-paths.rs:19:25
1717
|
1818
LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
1919
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo`
@@ -23,7 +23,7 @@ LL | let _: <foo::Baz as ::foo::Foo>::Bar = ();
2323
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2424

2525
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
26-
--> $DIR/edition-lint-fully-qualified-paths.rs:24:13
26+
--> $DIR/edition-lint-fully-qualified-paths.rs:25:13
2727
|
2828
LL | let _: <::foo::Baz as foo::Foo>::Bar = ();
2929
| ^^^^^^^^^^ help: use `crate`: `crate::foo::Baz`

tests/ui/rust-2018/edition-lint-nested-empty-paths.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23

34
#![deny(absolute_paths_not_starting_with_crate)]

tests/ui/rust-2018/edition-lint-nested-empty-paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23

34
#![deny(absolute_paths_not_starting_with_crate)]

tests/ui/rust-2018/edition-lint-nested-empty-paths.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
2-
--> $DIR/edition-lint-nested-empty-paths.rs:16:5
2+
--> $DIR/edition-lint-nested-empty-paths.rs:17:5
33
|
44
LL | use foo::{bar::{baz::{}}};
55
| ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}}}`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
99
note: the lint level is defined here
10-
--> $DIR/edition-lint-nested-empty-paths.rs:3:9
10+
--> $DIR/edition-lint-nested-empty-paths.rs:4:9
1111
|
1212
LL | #![deny(absolute_paths_not_starting_with_crate)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
16-
--> $DIR/edition-lint-nested-empty-paths.rs:20:5
16+
--> $DIR/edition-lint-nested-empty-paths.rs:21:5
1717
|
1818
LL | use foo::{bar::{XX, baz::{}}};
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}`
@@ -22,7 +22,7 @@ LL | use foo::{bar::{XX, baz::{}}};
2222
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
2323

2424
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
25-
--> $DIR/edition-lint-nested-empty-paths.rs:20:5
25+
--> $DIR/edition-lint-nested-empty-paths.rs:21:5
2626
|
2727
LL | use foo::{bar::{XX, baz::{}}};
2828
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}`
@@ -32,7 +32,7 @@ LL | use foo::{bar::{XX, baz::{}}};
3232
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3333

3434
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
35-
--> $DIR/edition-lint-nested-empty-paths.rs:26:5
35+
--> $DIR/edition-lint-nested-empty-paths.rs:27:5
3636
|
3737
LL | use foo::{bar::{baz::{}, baz1::{}}};
3838
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}`
@@ -41,7 +41,7 @@ LL | use foo::{bar::{baz::{}, baz1::{}}};
4141
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
4242

4343
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
44-
--> $DIR/edition-lint-nested-empty-paths.rs:26:5
44+
--> $DIR/edition-lint-nested-empty-paths.rs:27:5
4545
|
4646
LL | use foo::{bar::{baz::{}, baz1::{}}};
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}`

tests/ui/rust-2018/edition-lint-nested-paths.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23

34
#![deny(absolute_paths_not_starting_with_crate)]

tests/ui/rust-2018/edition-lint-nested-paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23

34
#![deny(absolute_paths_not_starting_with_crate)]

tests/ui/rust-2018/edition-lint-nested-paths.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
2-
--> $DIR/edition-lint-nested-paths.rs:5:5
2+
--> $DIR/edition-lint-nested-paths.rs:6:5
33
|
44
LL | use foo::{a, b};
55
| ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
99
note: the lint level is defined here
10-
--> $DIR/edition-lint-nested-paths.rs:3:9
10+
--> $DIR/edition-lint-nested-paths.rs:4:9
1111
|
1212
LL | #![deny(absolute_paths_not_starting_with_crate)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
16-
--> $DIR/edition-lint-nested-paths.rs:5:5
16+
--> $DIR/edition-lint-nested-paths.rs:6:5
1717
|
1818
LL | use foo::{a, b};
1919
| ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}`
@@ -23,7 +23,7 @@ LL | use foo::{a, b};
2323
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2424

2525
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
26-
--> $DIR/edition-lint-nested-paths.rs:22:13
26+
--> $DIR/edition-lint-nested-paths.rs:23:13
2727
|
2828
LL | use foo::{self as x, c};
2929
| ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}`
@@ -32,7 +32,7 @@ LL | use foo::{self as x, c};
3232
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
3333

3434
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
35-
--> $DIR/edition-lint-nested-paths.rs:22:13
35+
--> $DIR/edition-lint-nested-paths.rs:23:13
3636
|
3737
LL | use foo::{self as x, c};
3838
| ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}`

tests/ui/rust-2018/edition-lint-paths.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ aux-build:edition-lint-paths.rs
23
//@ run-rustfix
34

tests/ui/rust-2018/edition-lint-paths.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ aux-build:edition-lint-paths.rs
23
//@ run-rustfix
34

tests/ui/rust-2018/edition-lint-paths.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
2-
--> $DIR/edition-lint-paths.rs:11:9
2+
--> $DIR/edition-lint-paths.rs:12:9
33
|
44
LL | use bar::Bar;
55
| ^^^^^^^^ help: use `crate`: `crate::bar::Bar`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
99
note: the lint level is defined here
10-
--> $DIR/edition-lint-paths.rs:4:9
10+
--> $DIR/edition-lint-paths.rs:5:9
1111
|
1212
LL | #![deny(absolute_paths_not_starting_with_crate)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
16-
--> $DIR/edition-lint-paths.rs:18:9
16+
--> $DIR/edition-lint-paths.rs:19:9
1717
|
1818
LL | use bar;
1919
| ^^^ help: use `crate`: `crate::bar`
@@ -22,7 +22,7 @@ LL | use bar;
2222
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
2323

2424
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
25-
--> $DIR/edition-lint-paths.rs:24:9
25+
--> $DIR/edition-lint-paths.rs:25:9
2626
|
2727
LL | use {main, Bar as SomethingElse};
2828
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -31,7 +31,7 @@ LL | use {main, Bar as SomethingElse};
3131
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
3232

3333
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
34-
--> $DIR/edition-lint-paths.rs:24:9
34+
--> $DIR/edition-lint-paths.rs:25:9
3535
|
3636
LL | use {main, Bar as SomethingElse};
3737
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -41,7 +41,7 @@ LL | use {main, Bar as SomethingElse};
4141
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
4242

4343
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
44-
--> $DIR/edition-lint-paths.rs:24:9
44+
--> $DIR/edition-lint-paths.rs:25:9
4545
|
4646
LL | use {main, Bar as SomethingElse};
4747
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}`
@@ -51,7 +51,7 @@ LL | use {main, Bar as SomethingElse};
5151
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
5252

5353
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
54-
--> $DIR/edition-lint-paths.rs:39:5
54+
--> $DIR/edition-lint-paths.rs:40:5
5555
|
5656
LL | use bar::Bar;
5757
| ^^^^^^^^ help: use `crate`: `crate::bar::Bar`
@@ -60,7 +60,7 @@ LL | use bar::Bar;
6060
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
6161

6262
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
63-
--> $DIR/edition-lint-paths.rs:51:9
63+
--> $DIR/edition-lint-paths.rs:52:9
6464
|
6565
LL | use *;
6666
| ^ help: use `crate`: `crate::*`
@@ -69,7 +69,7 @@ LL | use *;
6969
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
7070

7171
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
72-
--> $DIR/edition-lint-paths.rs:56:6
72+
--> $DIR/edition-lint-paths.rs:57:6
7373
|
7474
LL | impl ::foo::SomeTrait for u32 {}
7575
| ^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::SomeTrait`
@@ -78,7 +78,7 @@ LL | impl ::foo::SomeTrait for u32 {}
7878
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
7979

8080
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
81-
--> $DIR/edition-lint-paths.rs:61:13
81+
--> $DIR/edition-lint-paths.rs:62:13
8282
|
8383
LL | let x = ::bar::Bar;
8484
| ^^^^^^^^^^ help: use `crate`: `crate::bar::Bar`

tests/ui/rust-2018/extern-crate-rename.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ aux-build:edition-lint-paths.rs
23
//@ run-rustfix
34

tests/ui/rust-2018/extern-crate-rename.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ aux-build:edition-lint-paths.rs
23
//@ run-rustfix
34

tests/ui/rust-2018/extern-crate-rename.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
2-
--> $DIR/extern-crate-rename.rs:11:5
2+
--> $DIR/extern-crate-rename.rs:12:5
33
|
44
LL | use my_crate::foo;
55
| ^^^^^^^^^^^^^ help: use `crate`: `crate::my_crate::foo`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
99
note: the lint level is defined here
10-
--> $DIR/extern-crate-rename.rs:7:9
10+
--> $DIR/extern-crate-rename.rs:8:9
1111
|
1212
LL | #![deny(absolute_paths_not_starting_with_crate)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/rust-2018/extern-crate-submod.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ aux-build:edition-lint-paths.rs
23
//@ run-rustfix
34

tests/ui/rust-2018/extern-crate-submod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ aux-build:edition-lint-paths.rs
23
//@ run-rustfix
34

tests/ui/rust-2018/extern-crate-submod.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
2-
--> $DIR/extern-crate-submod.rs:18:5
2+
--> $DIR/extern-crate-submod.rs:19:5
33
|
44
LL | use m::edition_lint_paths::foo;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::m::edition_lint_paths::foo`
66
|
77
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018!
88
= note: for more information, see issue #53130 <https://github.com/rust-lang/rust/issues/53130>
99
note: the lint level is defined here
10-
--> $DIR/extern-crate-submod.rs:8:9
10+
--> $DIR/extern-crate-submod.rs:9:9
1111
|
1212
LL | #![deny(absolute_paths_not_starting_with_crate)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/rust-2018/try-ident.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//@ edition: 2015
12
//@ run-rustfix
23
//@ check-pass
34

0 commit comments

Comments
 (0)