Rollup merge of #127662 - estebank:gate-span, r=TaKO8Ki
When finding item gated behind a `cfg` flag, point at it Previously we would only mention that the item was gated out, and opportunisitically mention the feature flag name when possible. We now point to the place where the item was gated, which can be behind layers of macro indirection, or in different modules. ``` error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner` --> $DIR/diagnostics-cross-crate.rs:18:23 | LL | cfged_out::inner::doesnt_exist::hello(); | ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner` | note: found an item that was configured out --> $DIR/auxiliary/cfged_out.rs:6:13 | LL | pub mod doesnt_exist { | ^^^^^^^^^^^^ note: the item is gated here --> $DIR/auxiliary/cfged_out.rs:5:5 | LL | #[cfg(FALSE)] | ^^^^^^^^^^^^^ ```
This commit is contained in:
commit
98fdfcb11b
11 changed files with 122 additions and 25 deletions
|
@ -232,6 +232,8 @@ resolve_is_private =
|
||||||
resolve_item_was_behind_feature =
|
resolve_item_was_behind_feature =
|
||||||
the item is gated behind the `{$feature}` feature
|
the item is gated behind the `{$feature}` feature
|
||||||
|
|
||||||
|
resolve_item_was_cfg_out = the item is gated here
|
||||||
|
|
||||||
resolve_items_in_traits_are_not_importable =
|
resolve_items_in_traits_are_not_importable =
|
||||||
items in traits are not importable
|
items in traits are not importable
|
||||||
|
|
||||||
|
|
|
@ -2532,7 +2532,13 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
||||||
&& let NestedMetaItem::MetaItem(meta_item) = &nested[0]
|
&& let NestedMetaItem::MetaItem(meta_item) = &nested[0]
|
||||||
&& let MetaItemKind::NameValue(feature_name) = &meta_item.kind
|
&& let MetaItemKind::NameValue(feature_name) = &meta_item.kind
|
||||||
{
|
{
|
||||||
let note = errors::ItemWasBehindFeature { feature: feature_name.symbol };
|
let note = errors::ItemWasBehindFeature {
|
||||||
|
feature: feature_name.symbol,
|
||||||
|
span: meta_item.span,
|
||||||
|
};
|
||||||
|
err.subdiagnostic(note);
|
||||||
|
} else {
|
||||||
|
let note = errors::ItemWasCfgOut { span: cfg.span };
|
||||||
err.subdiagnostic(note);
|
err.subdiagnostic(note);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1228,6 +1228,15 @@ pub(crate) struct FoundItemConfigureOut {
|
||||||
#[note(resolve_item_was_behind_feature)]
|
#[note(resolve_item_was_behind_feature)]
|
||||||
pub(crate) struct ItemWasBehindFeature {
|
pub(crate) struct ItemWasBehindFeature {
|
||||||
pub(crate) feature: Symbol,
|
pub(crate) feature: Symbol,
|
||||||
|
#[primary_span]
|
||||||
|
pub(crate) span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Subdiagnostic)]
|
||||||
|
#[note(resolve_item_was_cfg_out)]
|
||||||
|
pub(crate) struct ItemWasCfgOut {
|
||||||
|
#[primary_span]
|
||||||
|
pub(crate) span: Span,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Diagnostic)]
|
#[derive(Diagnostic)]
|
||||||
|
|
|
@ -11,12 +11,14 @@ fn main() {
|
||||||
cfged_out::inner::uwu(); //~ ERROR cannot find function
|
cfged_out::inner::uwu(); //~ ERROR cannot find function
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
//~| NOTE not found in `cfged_out::inner`
|
//~| NOTE not found in `cfged_out::inner`
|
||||||
|
//~| NOTE the item is gated here
|
||||||
|
|
||||||
// The module isn't found - we would like to get a diagnostic, but currently don't due to
|
// The module isn't found - we would like to get a diagnostic, but currently don't due to
|
||||||
// the awkward way the resolver diagnostics are currently implemented.
|
// the awkward way the resolver diagnostics are currently implemented.
|
||||||
cfged_out::inner::doesnt_exist::hello(); //~ ERROR failed to resolve
|
cfged_out::inner::doesnt_exist::hello(); //~ ERROR failed to resolve
|
||||||
//~^ NOTE could not find `doesnt_exist` in `inner`
|
//~^ NOTE could not find `doesnt_exist` in `inner`
|
||||||
//~| NOTE found an item that was configured out
|
//~| NOTE found an item that was configured out
|
||||||
|
//~| NOTE the item is gated here
|
||||||
|
|
||||||
// It should find the one in the right module, not the wrong one.
|
// It should find the one in the right module, not the wrong one.
|
||||||
cfged_out::inner::right::meow(); //~ ERROR cannot find function
|
cfged_out::inner::right::meow(); //~ ERROR cannot find function
|
||||||
|
@ -28,4 +30,5 @@ fn main() {
|
||||||
cfged_out::vanished(); //~ ERROR cannot find function
|
cfged_out::vanished(); //~ ERROR cannot find function
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
//~| NOTE not found in `cfged_out`
|
//~| NOTE not found in `cfged_out`
|
||||||
|
//~| NOTE the item is gated here
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
|
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
|
||||||
--> $DIR/diagnostics-cross-crate.rs:17:23
|
--> $DIR/diagnostics-cross-crate.rs:18:23
|
||||||
|
|
|
|
||||||
LL | cfged_out::inner::doesnt_exist::hello();
|
LL | cfged_out::inner::doesnt_exist::hello();
|
||||||
| ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
|
| ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
|
||||||
|
@ -9,6 +9,11 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub mod doesnt_exist {
|
LL | pub mod doesnt_exist {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/auxiliary/cfged_out.rs:5:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `uwu` in crate `cfged_out`
|
error[E0425]: cannot find function `uwu` in crate `cfged_out`
|
||||||
--> $DIR/diagnostics-cross-crate.rs:7:16
|
--> $DIR/diagnostics-cross-crate.rs:7:16
|
||||||
|
@ -27,9 +32,14 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn uwu() {}
|
LL | pub fn uwu() {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/auxiliary/cfged_out.rs:2:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `meow` in module `cfged_out::inner::right`
|
error[E0425]: cannot find function `meow` in module `cfged_out::inner::right`
|
||||||
--> $DIR/diagnostics-cross-crate.rs:22:30
|
--> $DIR/diagnostics-cross-crate.rs:24:30
|
||||||
|
|
|
|
||||||
LL | cfged_out::inner::right::meow();
|
LL | cfged_out::inner::right::meow();
|
||||||
| ^^^^ not found in `cfged_out::inner::right`
|
| ^^^^ not found in `cfged_out::inner::right`
|
||||||
|
@ -39,10 +49,14 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn meow() {}
|
LL | pub fn meow() {}
|
||||||
| ^^^^
|
| ^^^^
|
||||||
= note: the item is gated behind the `what-a-cool-feature` feature
|
note: the item is gated behind the `what-a-cool-feature` feature
|
||||||
|
--> $DIR/auxiliary/cfged_out.rs:16:15
|
||||||
|
|
|
||||||
|
LL | #[cfg(feature = "what-a-cool-feature")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `vanished` in crate `cfged_out`
|
error[E0425]: cannot find function `vanished` in crate `cfged_out`
|
||||||
--> $DIR/diagnostics-cross-crate.rs:28:16
|
--> $DIR/diagnostics-cross-crate.rs:30:16
|
||||||
|
|
|
|
||||||
LL | cfged_out::vanished();
|
LL | cfged_out::vanished();
|
||||||
| ^^^^^^^^ not found in `cfged_out`
|
| ^^^^^^^^ not found in `cfged_out`
|
||||||
|
@ -52,6 +66,11 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn vanished() {}
|
LL | pub fn vanished() {}
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/auxiliary/cfged_out.rs:21:1
|
||||||
|
|
|
||||||
|
LL | #[cfg(i_dont_exist_and_you_can_do_nothing_about_it)]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 5 previous errors
|
error: aborting due to 5 previous errors
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ pub mod inner {
|
||||||
pub fn uwu() {}
|
pub fn uwu() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(FALSE)]
|
#[cfg(FALSE)] //~ NOTE the item is gated here
|
||||||
pub use super::uwu;
|
pub use super::uwu;
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ pub use a::x;
|
||||||
//~| NOTE no `x` in `a`
|
//~| NOTE no `x` in `a`
|
||||||
|
|
||||||
mod a {
|
mod a {
|
||||||
#[cfg(FALSE)]
|
#[cfg(FALSE)] //~ NOTE the item is gated here
|
||||||
pub fn x() {}
|
pub fn x() {}
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
}
|
}
|
||||||
|
@ -25,10 +25,10 @@ pub use b::{x, y};
|
||||||
//~| NOTE no `y` in `b`
|
//~| NOTE no `y` in `b`
|
||||||
|
|
||||||
mod b {
|
mod b {
|
||||||
#[cfg(FALSE)]
|
#[cfg(FALSE)] //~ NOTE the item is gated here
|
||||||
pub fn x() {}
|
pub fn x() {}
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
#[cfg(FALSE)]
|
#[cfg(FALSE)] //~ NOTE the item is gated here
|
||||||
pub fn y() {}
|
pub fn y() {}
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,11 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn x() {}
|
LL | pub fn x() {}
|
||||||
| ^
|
| ^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-reexport.rs:17:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0432]: unresolved imports `b::x`, `b::y`
|
error[E0432]: unresolved imports `b::x`, `b::y`
|
||||||
--> $DIR/diagnostics-reexport.rs:22:13
|
--> $DIR/diagnostics-reexport.rs:22:13
|
||||||
|
@ -23,11 +28,21 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn x() {}
|
LL | pub fn x() {}
|
||||||
| ^
|
| ^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-reexport.rs:28:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
note: found an item that was configured out
|
note: found an item that was configured out
|
||||||
--> $DIR/diagnostics-reexport.rs:32:12
|
--> $DIR/diagnostics-reexport.rs:32:12
|
||||||
|
|
|
|
||||||
LL | pub fn y() {}
|
LL | pub fn y() {}
|
||||||
| ^
|
| ^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-reexport.rs:31:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `uwu` in module `inner`
|
error[E0425]: cannot find function `uwu` in module `inner`
|
||||||
--> $DIR/diagnostics-reexport.rs:38:12
|
--> $DIR/diagnostics-reexport.rs:38:12
|
||||||
|
@ -40,6 +55,11 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub use super::uwu;
|
LL | pub use super::uwu;
|
||||||
| ^^^
|
| ^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-reexport.rs:7:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
error: aborting due to 3 previous errors
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
#![allow(unexpected_cfgs)] // since we want to recognize them as unexpected
|
#![allow(unexpected_cfgs)] // since we want to recognize them as unexpected
|
||||||
|
|
||||||
pub mod inner {
|
pub mod inner {
|
||||||
#[cfg(FALSE)]
|
#[cfg(FALSE)] //~ NOTE the item is gated here
|
||||||
pub fn uwu() {}
|
pub fn uwu() {}
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
|
|
||||||
#[cfg(FALSE)]
|
#[cfg(FALSE)] //~ NOTE the item is gated here
|
||||||
|
//~^ NOTE the item is gated here
|
||||||
|
//~| NOTE the item is gated here
|
||||||
pub mod doesnt_exist {
|
pub mod doesnt_exist {
|
||||||
//~^ 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
|
||||||
|
@ -20,7 +22,7 @@ pub mod inner {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod right {
|
pub mod right {
|
||||||
#[cfg(feature = "what-a-cool-feature")]
|
#[cfg(feature = "what-a-cool-feature")] //~ NOTE the item is gated behind the `what-a-cool-feature` feature
|
||||||
pub fn meow() {}
|
pub fn meow() {}
|
||||||
//~^ NOTE found an item that was configured out
|
//~^ NOTE found an item that was configured out
|
||||||
}
|
}
|
||||||
|
@ -55,7 +57,6 @@ fn main() {
|
||||||
// It should find the one in the right module, not the wrong one.
|
// It should find the one in the right module, not the wrong one.
|
||||||
inner::right::meow(); //~ ERROR cannot find function
|
inner::right::meow(); //~ ERROR cannot find function
|
||||||
//~| NOTE not found in `inner::right
|
//~| NOTE not found in `inner::right
|
||||||
//~| NOTE the item is gated behind the `what-a-cool-feature` feature
|
|
||||||
|
|
||||||
// Exists in the crate root - we would generally want a diagnostic,
|
// Exists in the crate root - we would generally want a diagnostic,
|
||||||
// but currently don't have one.
|
// but currently don't have one.
|
||||||
|
|
|
@ -1,41 +1,56 @@
|
||||||
error[E0432]: unresolved import `super::inner::doesnt_exist`
|
error[E0432]: unresolved import `super::inner::doesnt_exist`
|
||||||
--> $DIR/diagnostics-same-crate.rs:30:9
|
--> $DIR/diagnostics-same-crate.rs:32:9
|
||||||
|
|
|
|
||||||
LL | use super::inner::doesnt_exist;
|
LL | use super::inner::doesnt_exist;
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `doesnt_exist` in `inner`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ no `doesnt_exist` in `inner`
|
||||||
|
|
|
|
||||||
note: found an item that was configured out
|
note: found an item that was configured out
|
||||||
--> $DIR/diagnostics-same-crate.rs:9:13
|
--> $DIR/diagnostics-same-crate.rs:11:13
|
||||||
|
|
|
|
||||||
LL | pub mod doesnt_exist {
|
LL | pub mod doesnt_exist {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-same-crate.rs:8:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0432]: unresolved import `super::inner::doesnt_exist`
|
error[E0432]: unresolved import `super::inner::doesnt_exist`
|
||||||
--> $DIR/diagnostics-same-crate.rs:33:23
|
--> $DIR/diagnostics-same-crate.rs:35:23
|
||||||
|
|
|
|
||||||
LL | use super::inner::doesnt_exist::hi;
|
LL | use super::inner::doesnt_exist::hi;
|
||||||
| ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
|
| ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
|
||||||
|
|
|
|
||||||
note: found an item that was configured out
|
note: found an item that was configured out
|
||||||
--> $DIR/diagnostics-same-crate.rs:9:13
|
--> $DIR/diagnostics-same-crate.rs:11:13
|
||||||
|
|
|
|
||||||
LL | pub mod doesnt_exist {
|
LL | pub mod doesnt_exist {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-same-crate.rs:8:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
|
error[E0433]: failed to resolve: could not find `doesnt_exist` in `inner`
|
||||||
--> $DIR/diagnostics-same-crate.rs:52:12
|
--> $DIR/diagnostics-same-crate.rs:54:12
|
||||||
|
|
|
|
||||||
LL | inner::doesnt_exist::hello();
|
LL | inner::doesnt_exist::hello();
|
||||||
| ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
|
| ^^^^^^^^^^^^ could not find `doesnt_exist` in `inner`
|
||||||
|
|
|
|
||||||
note: found an item that was configured out
|
note: found an item that was configured out
|
||||||
--> $DIR/diagnostics-same-crate.rs:9:13
|
--> $DIR/diagnostics-same-crate.rs:11:13
|
||||||
|
|
|
|
||||||
LL | pub mod doesnt_exist {
|
LL | pub mod doesnt_exist {
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-same-crate.rs:8:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `uwu` in module `inner`
|
error[E0425]: cannot find function `uwu` in module `inner`
|
||||||
--> $DIR/diagnostics-same-crate.rs:47:12
|
--> $DIR/diagnostics-same-crate.rs:49:12
|
||||||
|
|
|
|
||||||
LL | inner::uwu();
|
LL | inner::uwu();
|
||||||
| ^^^ not found in `inner`
|
| ^^^ not found in `inner`
|
||||||
|
@ -45,28 +60,37 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn uwu() {}
|
LL | pub fn uwu() {}
|
||||||
| ^^^
|
| ^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/diagnostics-same-crate.rs:4:5
|
||||||
|
|
|
||||||
|
LL | #[cfg(FALSE)]
|
||||||
|
| ^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `meow` in module `inner::right`
|
error[E0425]: cannot find function `meow` in module `inner::right`
|
||||||
--> $DIR/diagnostics-same-crate.rs:56:19
|
--> $DIR/diagnostics-same-crate.rs:58:19
|
||||||
|
|
|
|
||||||
LL | inner::right::meow();
|
LL | inner::right::meow();
|
||||||
| ^^^^ not found in `inner::right`
|
| ^^^^ not found in `inner::right`
|
||||||
|
|
|
|
||||||
note: found an item that was configured out
|
note: found an item that was configured out
|
||||||
--> $DIR/diagnostics-same-crate.rs:24:16
|
--> $DIR/diagnostics-same-crate.rs:26:16
|
||||||
|
|
|
|
||||||
LL | pub fn meow() {}
|
LL | pub fn meow() {}
|
||||||
| ^^^^
|
| ^^^^
|
||||||
= note: the item is gated behind the `what-a-cool-feature` feature
|
note: the item is gated behind the `what-a-cool-feature` feature
|
||||||
|
--> $DIR/diagnostics-same-crate.rs:25:15
|
||||||
|
|
|
||||||
|
LL | #[cfg(feature = "what-a-cool-feature")]
|
||||||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error[E0425]: cannot find function `uwu` in this scope
|
error[E0425]: cannot find function `uwu` in this scope
|
||||||
--> $DIR/diagnostics-same-crate.rs:43:5
|
--> $DIR/diagnostics-same-crate.rs:45:5
|
||||||
|
|
|
|
||||||
LL | uwu();
|
LL | uwu();
|
||||||
| ^^^ not found in this scope
|
| ^^^ not found in this scope
|
||||||
|
|
||||||
error[E0425]: cannot find function `vanished` in this scope
|
error[E0425]: cannot find function `vanished` in this scope
|
||||||
--> $DIR/diagnostics-same-crate.rs:63:5
|
--> $DIR/diagnostics-same-crate.rs:64:5
|
||||||
|
|
|
|
||||||
LL | vanished();
|
LL | vanished();
|
||||||
| ^^^^^^^^ not found in this scope
|
| ^^^^^^^^ not found in this scope
|
||||||
|
|
|
@ -104,6 +104,8 @@ LL | #[std::test]
|
||||||
|
|
|
|
||||||
note: found an item that was configured out
|
note: found an item that was configured out
|
||||||
--> $SRC_DIR/std/src/lib.rs:LL:COL
|
--> $SRC_DIR/std/src/lib.rs:LL:COL
|
||||||
|
note: the item is gated here
|
||||||
|
--> $SRC_DIR/std/src/lib.rs:LL:COL
|
||||||
|
|
||||||
error: aborting due to 16 previous errors
|
error: aborting due to 16 previous errors
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,17 @@ note: found an item that was configured out
|
||||||
|
|
|
|
||||||
LL | pub fn bar() { });
|
LL | pub fn bar() { });
|
||||||
| ^^^
|
| ^^^
|
||||||
|
note: the item is gated here
|
||||||
|
--> $DIR/macro-outer-attributes.rs:5:45
|
||||||
|
|
|
||||||
|
LL | $i:item) => (mod $nm { #[$a] $i }); }
|
||||||
|
| ^^^^^
|
||||||
|
LL |
|
||||||
|
LL | / test!(a,
|
||||||
|
LL | | #[cfg(FALSE)],
|
||||||
|
LL | | pub fn bar() { });
|
||||||
|
| |_______________________- in this macro invocation
|
||||||
|
= note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||||
help: consider importing this function
|
help: consider importing this function
|
||||||
|
|
|
|
||||||
LL + use b::bar;
|
LL + use b::bar;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue