forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
detect when suggested paths enter extern crates more rigorously
- Loading branch information
Showing
4 changed files
with
46 additions
and
11 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,18 @@ | ||
#![crate_type = "lib"] | ||
|
||
pub mod public { | ||
use private_import; | ||
|
||
// should not be suggested since it is private | ||
struct Foo; | ||
|
||
mod private_module { | ||
// should not be suggested since it is private | ||
pub struct Foo; | ||
} | ||
} | ||
|
||
mod private_import { | ||
// should not be suggested since it is private | ||
pub struct Foo; | ||
} |
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,12 @@ | ||
// aux-build:issue-80079.rs | ||
|
||
// using a module from another crate should not cause errors to suggest private | ||
// items in that module | ||
|
||
extern crate issue_80079; | ||
|
||
use issue_80079::public; | ||
|
||
fn main() { | ||
let _ = Foo; //~ ERROR cannot find value `Foo` in this scope | ||
} |
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,9 @@ | ||
error[E0425]: cannot find value `Foo` in this scope | ||
--> $DIR/issue-80079.rs:11:13 | ||
| | ||
LL | let _ = Foo; | ||
| ^^^ not found in this scope | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0425`. |