Make proc_macro_derive_resolution_fallback
a future-breakage lint
When `cargo report future-incompatibilities` is stabilized (see #71249), this will cause dependencies that trigger this lint to be included in the report.
This commit is contained in:
parent
175b8db73b
commit
32a5abc6fe
2 changed files with 73 additions and 0 deletions
|
@ -1960,6 +1960,7 @@ declare_lint! {
|
|||
"detects proc macro derives using inaccessible names from parent modules",
|
||||
@future_incompatible = FutureIncompatibleInfo {
|
||||
reference: "issue #83583 <https://github.com/rust-lang/rust/issues/83583>",
|
||||
reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -82,3 +82,75 @@ LL | #[derive(generate_mod::CheckDerive)]
|
|||
error: aborting due to 4 previous errors; 4 warnings emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0412`.
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
warning: cannot find type `FromOutside` in this scope
|
||||
--> $DIR/generate-mod.rs:16:10
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDerive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
|
||||
|
|
||||
= note: `#[warn(proc_macro_derive_resolution_fallback)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
|
||||
= note: this warning originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: cannot find type `OuterDerive` in this scope
|
||||
--> $DIR/generate-mod.rs:16:10
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDerive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
|
||||
= note: this warning originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: cannot find type `FromOutside` in this scope
|
||||
--> $DIR/generate-mod.rs:23:14
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDerive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
|
||||
= note: this warning originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: cannot find type `OuterDerive` in this scope
|
||||
--> $DIR/generate-mod.rs:23:14
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDerive)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
|
||||
= note: this warning originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: cannot find type `FromOutside` in this scope
|
||||
--> $DIR/generate-mod.rs:30:10
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/generate-mod.rs:30:10
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
|
||||
= note: this warning originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
Future breakage diagnostic:
|
||||
warning: cannot find type `OuterDeriveLint` in this scope
|
||||
--> $DIR/generate-mod.rs:30:10
|
||||
|
|
||||
LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #83583 <https://github.com/rust-lang/rust/issues/83583>
|
||||
= note: this warning originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue