resolve: Account for new importable entities

This commit is contained in:
Vadim Petrochenkov 2019-03-09 16:15:40 +03:00
parent 52e885628e
commit 47ee538a28
4 changed files with 49 additions and 11 deletions

View file

@ -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;

View 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
}

View 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