-
Notifications
You must be signed in to change notification settings - Fork 13.4k
consider glob imports in cfg suggestion #141548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,61 @@ | ||
// issue#141256 | ||
|
||
mod original { | ||
#[cfg(false)] | ||
//~^ NOTE the item is gated here | ||
//~| NOTE the item is gated here | ||
//~| NOTE the item is gated here | ||
//~| NOTE the item is gated here | ||
//~| NOTE the item is gated here | ||
pub mod gated { | ||
//~^ NOTE found an item that was configured out | ||
//~| NOTE found an item that was configured out | ||
//~| NOTE found an item that was configured out | ||
//~| NOTE found an item that was configured out | ||
//~| NOTE found an item that was configured out | ||
pub fn foo() {} | ||
} | ||
} | ||
|
||
mod reexport { | ||
pub use super::original::*; | ||
} | ||
|
||
mod reexport2 { | ||
pub use super::reexport::*; | ||
} | ||
|
||
mod reexport30 { | ||
pub use super::original::*; | ||
pub use super::reexport31::*; | ||
} | ||
|
||
mod reexport31 { | ||
pub use super::reexport30::*; | ||
} | ||
|
||
mod reexport32 { | ||
pub use super::reexport30::*; | ||
} | ||
|
||
fn main() { | ||
reexport::gated::foo(); | ||
//~^ ERROR failed to resolve: could not find `gated` in `reexport` | ||
//~| NOTE could not find `gated` in `reexport` | ||
|
||
reexport2::gated::foo(); | ||
//~^ ERROR failed to resolve: could not find `gated` in `reexport2` | ||
//~| NOTE could not find `gated` in `reexport2` | ||
|
||
reexport30::gated::foo(); | ||
//~^ ERROR failed to resolve: could not find `gated` in `reexport30` | ||
//~| NOTE could not find `gated` in `reexport30` | ||
|
||
reexport31::gated::foo(); | ||
//~^ ERROR failed to resolve: could not find `gated` in `reexport31` | ||
//~| NOTE could not find `gated` in `reexport31` | ||
|
||
reexport32::gated::foo(); | ||
//~^ ERROR failed to resolve: could not find `gated` in `reexport32` | ||
//~| NOTE could not find `gated` in `reexport32` | ||
} |
This file contains hidden or 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,88 @@ | ||
error[E0433]: failed to resolve: could not find `gated` in `reexport` | ||
--> $DIR/diagnostics-reexport-2.rs:42:15 | ||
| | ||
LL | reexport::gated::foo(); | ||
| ^^^^^ could not find `gated` in `reexport` | ||
| | ||
note: found an item that was configured out | ||
--> $DIR/diagnostics-reexport-2.rs:10:13 | ||
| | ||
LL | pub mod gated { | ||
| ^^^^^ | ||
note: the item is gated here | ||
--> $DIR/diagnostics-reexport-2.rs:4:5 | ||
| | ||
LL | #[cfg(false)] | ||
| ^^^^^^^^^^^^^ | ||
|
||
error[E0433]: failed to resolve: could not find `gated` in `reexport2` | ||
--> $DIR/diagnostics-reexport-2.rs:46:16 | ||
| | ||
LL | reexport2::gated::foo(); | ||
| ^^^^^ could not find `gated` in `reexport2` | ||
| | ||
note: found an item that was configured out | ||
--> $DIR/diagnostics-reexport-2.rs:10:13 | ||
| | ||
LL | pub mod gated { | ||
| ^^^^^ | ||
note: the item is gated here | ||
--> $DIR/diagnostics-reexport-2.rs:4:5 | ||
| | ||
LL | #[cfg(false)] | ||
| ^^^^^^^^^^^^^ | ||
|
||
error[E0433]: failed to resolve: could not find `gated` in `reexport30` | ||
--> $DIR/diagnostics-reexport-2.rs:50:17 | ||
| | ||
LL | reexport30::gated::foo(); | ||
| ^^^^^ could not find `gated` in `reexport30` | ||
| | ||
note: found an item that was configured out | ||
--> $DIR/diagnostics-reexport-2.rs:10:13 | ||
| | ||
LL | pub mod gated { | ||
| ^^^^^ | ||
note: the item is gated here | ||
--> $DIR/diagnostics-reexport-2.rs:4:5 | ||
| | ||
LL | #[cfg(false)] | ||
| ^^^^^^^^^^^^^ | ||
|
||
error[E0433]: failed to resolve: could not find `gated` in `reexport31` | ||
--> $DIR/diagnostics-reexport-2.rs:54:17 | ||
| | ||
LL | reexport31::gated::foo(); | ||
| ^^^^^ could not find `gated` in `reexport31` | ||
| | ||
note: found an item that was configured out | ||
--> $DIR/diagnostics-reexport-2.rs:10:13 | ||
| | ||
LL | pub mod gated { | ||
| ^^^^^ | ||
note: the item is gated here | ||
--> $DIR/diagnostics-reexport-2.rs:4:5 | ||
| | ||
LL | #[cfg(false)] | ||
| ^^^^^^^^^^^^^ | ||
|
||
error[E0433]: failed to resolve: could not find `gated` in `reexport32` | ||
--> $DIR/diagnostics-reexport-2.rs:58:17 | ||
| | ||
LL | reexport32::gated::foo(); | ||
| ^^^^^ could not find `gated` in `reexport32` | ||
| | ||
note: found an item that was configured out | ||
--> $DIR/diagnostics-reexport-2.rs:10:13 | ||
| | ||
LL | pub mod gated { | ||
| ^^^^^ | ||
note: the item is gated here | ||
--> $DIR/diagnostics-reexport-2.rs:4:5 | ||
| | ||
LL | #[cfg(false)] | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 5 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0433`. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.