resolve: Account for new importable entities
This commit is contained in:
parent
52e885628e
commit
47ee538a28
4 changed files with 49 additions and 11 deletions
|
|
@ -0,0 +1,5 @@
|
|||
// edition:2018
|
||||
|
||||
pub use ignore as built_in_attr;
|
||||
pub use u8 as built_in_type;
|
||||
pub use rustfmt as tool_mod;
|
||||
11
src/test/ui/rust-2018/uniform-paths/cross-crate.rs
Normal file
11
src/test/ui/rust-2018/uniform-paths/cross-crate.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// edition:2018
|
||||
// aux-build:cross-crate.rs
|
||||
|
||||
extern crate cross_crate;
|
||||
use cross_crate::*;
|
||||
|
||||
#[built_in_attr] //~ ERROR cannot use a built-in attribute through an import
|
||||
#[tool_mod::skip] //~ ERROR cannot use a tool module through an import
|
||||
fn main() {
|
||||
let _: built_in_type; // OK
|
||||
}
|
||||
26
src/test/ui/rust-2018/uniform-paths/cross-crate.stderr
Normal file
26
src/test/ui/rust-2018/uniform-paths/cross-crate.stderr
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
error: cannot use a built-in attribute through an import
|
||||
--> $DIR/cross-crate.rs:7:3
|
||||
|
|
||||
LL | #[built_in_attr]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
|
||||
note: the built-in attribute imported here
|
||||
--> $DIR/cross-crate.rs:5:5
|
||||
|
|
||||
LL | use cross_crate::*;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot use a tool module through an import
|
||||
--> $DIR/cross-crate.rs:8:3
|
||||
|
|
||||
LL | #[tool_mod::skip]
|
||||
| ^^^^^^^^
|
||||
|
|
||||
note: the tool module imported here
|
||||
--> $DIR/cross-crate.rs:5:5
|
||||
|
|
||||
LL | use cross_crate::*;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue