-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #113532 - matthiaskrgr:rollup-mty7u37, r=matthiaskrgr
Rollup of 2 pull requests Successful merges: - #113331 (Add filter with following segment while lookup typo for path) - #113524 (Remove the library/term exception in tidy's pal checker code) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
15 changed files
with
301 additions
and
47 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
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
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
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
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,29 @@ | ||
// edition:2018 | ||
#![feature(decl_macro)] | ||
|
||
macro a() { | ||
extern crate core as my_core; | ||
mod v { | ||
// Early resolution. | ||
use my_core; //~ ERROR unresolved import `my_core` | ||
} | ||
mod u { | ||
// Late resolution. | ||
fn f() { my_core::mem::drop(0); } | ||
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core` | ||
} | ||
} | ||
|
||
a!(); | ||
|
||
mod v { | ||
// Early resolution. | ||
use my_core; //~ ERROR unresolved import `my_core` | ||
} | ||
mod u { | ||
// Late resolution. | ||
fn f() { my_core::mem::drop(0); } | ||
//~^ ERROR failed to resolve: use of undeclared crate or module `my_core` | ||
} | ||
|
||
fn main() {} |
53 changes: 53 additions & 0 deletions
53
tests/ui/hygiene/extern-prelude-from-opaque-fail-2018.stderr
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,53 @@ | ||
error[E0432]: unresolved import `my_core` | ||
--> $DIR/extern-prelude-from-opaque-fail-2018.rs:21:9 | ||
| | ||
LL | use my_core; | ||
| ^^^^^^^ no external crate `my_core` | ||
|
||
error[E0432]: unresolved import `my_core` | ||
--> $DIR/extern-prelude-from-opaque-fail-2018.rs:8:13 | ||
| | ||
LL | use my_core; | ||
| ^^^^^^^ no external crate `my_core` | ||
... | ||
LL | a!(); | ||
| ---- in this macro invocation | ||
| | ||
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0433]: failed to resolve: use of undeclared crate or module `my_core` | ||
--> $DIR/extern-prelude-from-opaque-fail-2018.rs:12:18 | ||
| | ||
LL | fn f() { my_core::mem::drop(0); } | ||
| ^^^^^^^ use of undeclared crate or module `my_core` | ||
... | ||
LL | a!(); | ||
| ---- in this macro invocation | ||
| | ||
= help: consider importing one of these items: | ||
std::mem | ||
core::mem | ||
= note: this error originates in the macro `a` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error[E0433]: failed to resolve: use of undeclared crate or module `my_core` | ||
--> $DIR/extern-prelude-from-opaque-fail-2018.rs:25:14 | ||
| | ||
LL | fn f() { my_core::mem::drop(0); } | ||
| ^^^^^^^ use of undeclared crate or module `my_core` | ||
| | ||
help: consider importing one of these items | ||
| | ||
LL + use core::mem; | ||
| | ||
LL + use std::mem; | ||
| | ||
help: if you import `mem`, refer to it directly | ||
| | ||
LL - fn f() { my_core::mem::drop(0); } | ||
LL + fn f() { mem::drop(0); } | ||
| | ||
|
||
error: aborting due to 4 previous errors | ||
|
||
Some errors have detailed explanations: E0432, E0433. | ||
For more information about an error, try `rustc --explain E0432`. |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// edition:2015 | ||
#![feature(decl_macro)] | ||
|
||
macro 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
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
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,34 @@ | ||
// run-rustfix | ||
use std::vec; | ||
|
||
use std::sync::atomic::AtomicBool; | ||
|
||
mod foo { | ||
pub mod bar { | ||
pub mod baz { | ||
pub use std::vec::Vec as MyVec; | ||
} | ||
} | ||
} | ||
|
||
mod u { | ||
use foo::bar::baz::MyVec; | ||
|
||
fn _a() { | ||
let _: Vec<i32> = MyVec::new(); //~ ERROR failed to resolve | ||
} | ||
} | ||
|
||
mod v { | ||
use foo::bar::baz::MyVec; | ||
|
||
fn _b() { | ||
let _: Vec<i32> = MyVec::new(); //~ ERROR failed to resolve | ||
} | ||
} | ||
|
||
fn main() { | ||
let _t: Vec<i32> = Vec::new(); //~ ERROR failed to resolve | ||
type _B = vec::Vec::<u8>; //~ ERROR failed to resolve | ||
let _t = AtomicBool::new(true); //~ ERROR failed to resolve | ||
} |
Oops, something went wrong.