-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #113920 - bvanjoi:fix-81413, r=petrochenkov
fix(resolve): report unresolved imports firstly Fixes #81413 An easy fix, r? ```@petrochenkov```
- Loading branch information
Showing
3 changed files
with
64 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
pub const ITEM: Item = Item; | ||
|
||
pub struct Item; | ||
|
||
pub fn item() {} | ||
|
||
pub use doesnt_exist::*; | ||
//~^ ERROR unresolved import `doesnt_exist` | ||
mod a { | ||
use crate::{item, Item, ITEM}; | ||
} | ||
|
||
mod b { | ||
use crate::item; | ||
use crate::Item; | ||
use crate::ITEM; | ||
} | ||
|
||
mod c { | ||
use crate::item; | ||
} | ||
|
||
fn main() {} |
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,11 @@ | ||
error[E0432]: unresolved import `doesnt_exist` | ||
--> $DIR/issue-81413.rs:7:9 | ||
| | ||
LL | pub use doesnt_exist::*; | ||
| ^^^^^^^^^^^^ maybe a missing crate `doesnt_exist`? | ||
| | ||
= help: consider adding `extern crate doesnt_exist` to use the `doesnt_exist` crate | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0432`. |