Rollup merge of #64675 - Centril:deprecate-plugin, r=oli-obk

Deprecate `#![plugin]` & `#[plugin_registrar]`

This PR deprecates `#![plugin]` and `#[plugin_registrar]`.

~A removal deadline is set: 1.44.0. This will be in 9 months from now and should give everyone who is still relying on the feature ample time to rid themselves of this dependency.~

cc https://github.com/rust-lang/rust/issues/29597

r? @Mark-Simulacrum
This commit is contained in:
Tyler Mandry 2019-10-03 16:25:37 -07:00 committed by GitHub
commit da0afc1638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
52 changed files with 580 additions and 245 deletions

View File

@ -278,10 +278,23 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
),
// Plugins:
ungated!(plugin_registrar, Normal, template!(Word)),
gated!(
plugin, CrateLevel, template!(List: "name|name(args)"),
"compiler plugins are experimental and possibly buggy",
(
sym::plugin_registrar, Normal, template!(Word),
Gated(
Stability::Deprecated("https://github.com/rust-lang/rust/issues/29597", None),
sym::plugin_registrar,
"compiler plugins are deprecated",
cfg_fn!(plugin_registrar)
)
),
(
sym::plugin, CrateLevel, template!(List: "name|name(args)"),
Gated(
Stability::Deprecated("https://github.com/rust-lang/rust/issues/29597", None),
sym::plugin,
"compiler plugins are deprecated",
cfg_fn!(plugin)
)
),
// Testing:

View File

@ -41,7 +41,7 @@ impl MetadataLoader for NoLlvmMetadataLoader {
struct TheBackend;
impl CodegenBackend for TheBackend {
fn metadata_loader(&self) -> Box<MetadataLoader + Sync> {
fn metadata_loader(&self) -> Box<dyn MetadataLoader + Sync> {
Box::new(NoLlvmMetadataLoader)
}
@ -64,7 +64,7 @@ impl CodegenBackend for TheBackend {
tcx: TyCtxt<'tcx>,
_metadata: EncodedMetadata,
_need_metadata_module: bool,
) -> Box<Any> {
) -> Box<dyn Any> {
use rustc::hir::def_id::LOCAL_CRATE;
Box::new(tcx.crate_name(LOCAL_CRATE) as Symbol)
@ -72,7 +72,7 @@ impl CodegenBackend for TheBackend {
fn join_codegen_and_link(
&self,
ongoing_codegen: Box<Any>,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
_dep_graph: &DepGraph,
outputs: &OutputFilenames,
@ -97,6 +97,6 @@ impl CodegenBackend for TheBackend {
/// This is the entrypoint for a hot plugged rustc_codegen_llvm
#[no_mangle]
pub fn __rustc_codegen_backend() -> Box<CodegenBackend> {
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
Box::new(TheBackend)
}

View File

@ -1,6 +1,7 @@
// aux-build:attr-plugin-test.rs
#![plugin(attr_plugin_test)]
//~^ ERROR compiler plugins are experimental and possibly buggy
//~^ ERROR compiler plugins are deprecated
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -1,4 +1,4 @@
error[E0658]: compiler plugins are experimental and possibly buggy
error[E0658]: compiler plugins are deprecated
--> $DIR/gated-plugin.rs:3:1
|
LL | #![plugin(attr_plugin_test)]
@ -7,6 +7,14 @@ LL | #![plugin(attr_plugin_test)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin)]` to the crate attributes to enable
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/gated-plugin.rs:3:1
|
LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View File

@ -4,5 +4,6 @@
#![feature(plugin)] //~ ERROR crate is not marked with #![crate_okay]
#![plugin(lint_for_crate)]
//~^ WARN use of deprecated attribute `plugin`
pub fn main() { }

View File

@ -1,9 +1,18 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/issue-15778-fail.rs:6:1
|
LL | #![plugin(lint_for_crate)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: crate is not marked with #![crate_okay]
--> $DIR/issue-15778-fail.rs:5:1
|
LL | / #![feature(plugin)]
LL | | #![plugin(lint_for_crate)]
LL | |
LL | |
LL | | pub fn main() { }
| |_________________^
|

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/issue-15778-pass.rs:8:1
|
LL | #![plugin(lint_for_crate_rpass)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/issue-40001.rs:6:1
|
LL | #![plugin(issue_40001_plugin)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -3,7 +3,9 @@
// compile-flags: -D lint-me
#![feature(plugin)]
#![plugin(lint_group_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
fn lintme() { } //~ ERROR item is named 'lintme'

View File

@ -1,5 +1,13 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-group-plugin-deny-cmdline.rs:7:1
|
LL | #![plugin(lint_group_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: item is named 'lintme'
--> $DIR/lint-group-plugin-deny-cmdline.rs:8:1
--> $DIR/lint-group-plugin-deny-cmdline.rs:10:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^^^^^
@ -7,7 +15,7 @@ LL | fn lintme() { }
= note: `-D test-lint` implied by `-D lint-me`
error: item is named 'pleaselintme'
--> $DIR/lint-group-plugin-deny-cmdline.rs:10:1
--> $DIR/lint-group-plugin-deny-cmdline.rs:12:1
|
LL | fn pleaselintme() { }
| ^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,3 +1,11 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-group-plugin.rs:6:1
|
LL | #![plugin(lint_group_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
warning: item is named 'lintme'
--> $DIR/lint-group-plugin.rs:9:1
|

View File

@ -1,3 +1,11 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-plugin-cmdline-allow.rs:8:1
|
LL | #![plugin(lint_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
warning: function is never used: `lintme`
--> $DIR/lint-plugin-cmdline-allow.rs:10:1
|

View File

@ -3,6 +3,7 @@
#![feature(plugin)]
#![plugin(lint_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
#![deny(test_lint)]
fn lintme() { } //~ ERROR item is named 'lintme'

View File

@ -1,11 +1,19 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-plugin-deny-attr.rs:5:1
|
LL | #![plugin(lint_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: item is named 'lintme'
--> $DIR/lint-plugin-deny-attr.rs:8:1
--> $DIR/lint-plugin-deny-attr.rs:9:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/lint-plugin-deny-attr.rs:6:9
--> $DIR/lint-plugin-deny-attr.rs:7:9
|
LL | #![deny(test_lint)]
| ^^^^^^^^^

View File

@ -4,6 +4,7 @@
#![feature(plugin)]
#![plugin(lint_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
fn lintme() { } //~ ERROR item is named 'lintme'

View File

@ -1,5 +1,13 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-plugin-deny-cmdline.rs:6:1
|
LL | #![plugin(lint_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: item is named 'lintme'
--> $DIR/lint-plugin-deny-cmdline.rs:8:1
--> $DIR/lint-plugin-deny-cmdline.rs:9:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^^^^^

View File

@ -3,6 +3,7 @@
#![feature(plugin)]
#![plugin(lint_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
#![forbid(test_lint)]
fn lintme() { } //~ ERROR item is named 'lintme'

View File

@ -1,5 +1,5 @@
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
--> $DIR/lint-plugin-forbid-attrs.rs:10:9
--> $DIR/lint-plugin-forbid-attrs.rs:11:9
|
LL | #![forbid(test_lint)]
| --------- `forbid` level set here
@ -7,14 +7,22 @@ LL | #![forbid(test_lint)]
LL | #[allow(test_lint)]
| ^^^^^^^^^ overruled by previous forbid
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-plugin-forbid-attrs.rs:5:1
|
LL | #![plugin(lint_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: item is named 'lintme'
--> $DIR/lint-plugin-forbid-attrs.rs:8:1
--> $DIR/lint-plugin-forbid-attrs.rs:9:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/lint-plugin-forbid-attrs.rs:6:11
--> $DIR/lint-plugin-forbid-attrs.rs:7:11
|
LL | #![forbid(test_lint)]
| ^^^^^^^^^

View File

@ -4,7 +4,7 @@
#![feature(plugin)]
#![plugin(lint_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
fn lintme() { } //~ ERROR item is named 'lintme'
#[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint)

View File

@ -6,6 +6,14 @@ LL | #[allow(test_lint)]
|
= note: `forbid` lint level was set on command line
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-plugin-forbid-cmdline.rs:6:1
|
LL | #![plugin(lint_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: item is named 'lintme'
--> $DIR/lint-plugin-forbid-cmdline.rs:8:1
|

View File

@ -1,3 +1,11 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-plugin.rs:5:1
|
LL | #![plugin(lint_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
warning: item is named 'lintme'
--> $DIR/lint-plugin.rs:8:1
|

View File

@ -2,6 +2,14 @@ warning: lint name `test_lint` is deprecated and does not have an effect anymore
|
= note: requested on the command line with `-A test_lint`
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-tool-cmdline-allow.rs:8:1
|
LL | #![plugin(lint_tool_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
warning: item is named 'lintme'
--> $DIR/lint-tool-cmdline-allow.rs:10:1
|

View File

@ -4,6 +4,7 @@
#![feature(plugin)]
#![plugin(lint_tool_test)]
//~^ WARN use of deprecated attribute `plugin`
#![allow(dead_code)]
#![cfg_attr(foo, warn(test_lint))]
//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future

View File

@ -1,5 +1,5 @@
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
--> $DIR/lint-tool-test.rs:8:23
--> $DIR/lint-tool-test.rs:9:23
|
LL | #![cfg_attr(foo, warn(test_lint))]
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
@ -7,19 +7,19 @@ LL | #![cfg_attr(foo, warn(test_lint))]
= note: `#[warn(renamed_and_removed_lints)]` on by default
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
--> $DIR/lint-tool-test.rs:11:9
--> $DIR/lint-tool-test.rs:12:9
|
LL | #![deny(clippy_group)]
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
--> $DIR/lint-tool-test.rs:25:9
--> $DIR/lint-tool-test.rs:26:9
|
LL | #[allow(test_group)]
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
warning: unknown lint: `this_lint_does_not_exist`
--> $DIR/lint-tool-test.rs:27:8
--> $DIR/lint-tool-test.rs:28:8
|
LL | #[deny(this_lint_does_not_exist)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -27,32 +27,40 @@ LL | #[deny(this_lint_does_not_exist)]
= note: `#[warn(unknown_lints)]` on by default
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
--> $DIR/lint-tool-test.rs:8:23
--> $DIR/lint-tool-test.rs:9:23
|
LL | #![cfg_attr(foo, warn(test_lint))]
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lint-tool-test.rs:6:1
|
LL | #![plugin(lint_tool_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: item is named 'lintme'
--> $DIR/lint-tool-test.rs:14:1
--> $DIR/lint-tool-test.rs:15:1
|
LL | fn lintme() { }
| ^^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/lint-tool-test.rs:11:9
--> $DIR/lint-tool-test.rs:12:9
|
LL | #![deny(clippy_group)]
| ^^^^^^^^^^^^
= note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]`
error: item is named 'lintmetoo'
--> $DIR/lint-tool-test.rs:22:5
--> $DIR/lint-tool-test.rs:23:5
|
LL | fn lintmetoo() { }
| ^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> $DIR/lint-tool-test.rs:11:9
--> $DIR/lint-tool-test.rs:12:9
|
LL | #![deny(clippy_group)]
| ^^^^^^^^^^^^

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/llvm-pass-plugin.rs:6:1
|
LL | #![plugin(llvm_pass_plugin)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/lto-syntax-extension.rs:9:1
|
LL | #![plugin(lto_syntax_extension_plugin)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -5,5 +5,6 @@
#![feature(plugin)]
#![plugin(rlib_crate_test)]
//~^ ERROR: plugin `rlib_crate_test` only found in rlib format, but must be available in dylib format
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -4,5 +4,13 @@ error[E0457]: plugin `rlib_crate_test` only found in rlib format, but must be av
LL | #![plugin(rlib_crate_test)]
| ^^^^^^^^^^^^^^^
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/macro-crate-rlib.rs:6:1
|
LL | #![plugin(rlib_crate_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/outlive-expansion-phase.rs:6:1
|
LL | #![plugin(outlive_expansion_phase)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/plugin-args-1.rs:6:1
|
LL | #![plugin(plugin_args)]
| ^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/plugin-args-2.rs:6:1
|
LL | #![plugin(plugin_args())]
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/plugin-args-3.rs:6:1
|
LL | #![plugin(plugin_args(hello(there), how(are="you")))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -3,6 +3,7 @@
#![feature(plugin)]
#![plugin(attr_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
#![deny(unused_attributes)]
#[baz]

View File

@ -1,23 +1,31 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/plugin-attr-register-deny.rs:5:1
|
LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: unused attribute
--> $DIR/plugin-attr-register-deny.rs:14:5
--> $DIR/plugin-attr-register-deny.rs:15:5
|
LL | #[bar]
| ^^^^^^
|
note: lint level defined here
--> $DIR/plugin-attr-register-deny.rs:6:9
--> $DIR/plugin-attr-register-deny.rs:7:9
|
LL | #![deny(unused_attributes)]
| ^^^^^^^^^^^^^^^^^
error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
--> $DIR/plugin-attr-register-deny.rs:14:5
--> $DIR/plugin-attr-register-deny.rs:15:5
|
LL | #[bar]
| ^^^^^^
error: unused attribute
--> $DIR/plugin-attr-register-deny.rs:11:1
--> $DIR/plugin-attr-register-deny.rs:12:1
|
LL | #[foo]
| ^^^^^^

View File

@ -4,6 +4,7 @@
#![feature(plugin)]
#![plugin(attr_plugin_test)]
//~^ WARN use of deprecated attribute `plugin`
pub use mac as reexport; //~ ERROR `mac` is private, and cannot be re-exported

View File

@ -1,15 +1,23 @@
error[E0364]: `mac` is private, and cannot be re-exported
--> $DIR/plugin-reexport.rs:8:9
--> $DIR/plugin-reexport.rs:9:9
|
LL | pub use mac as reexport;
| ^^^^^^^^^^^^^^^
|
note: consider marking `mac` as `pub` in the imported module
--> $DIR/plugin-reexport.rs:8:9
--> $DIR/plugin-reexport.rs:9:9
|
LL | pub use mac as reexport;
| ^^^^^^^^^^^^^^^
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/plugin-reexport.rs:6:1
|
LL | #![plugin(attr_plugin_test)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error
For more information about this error, try `rustc --explain E0364`.

View File

@ -0,0 +1,8 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/roman-numerals-macro.rs:6:1
|
LL | #![plugin(roman_numerals)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default

View File

@ -32,9 +32,13 @@
// check-pass
#![feature(test)]
#![feature(test, plugin_registrar)]
#![warn(unused_attributes, unknown_lints)]
// Exception, a gated and deprecated attribute.
#![plugin_registrar] //~ WARN unused attribute
// UNGATED WHITE-LISTED BUILT-IN ATTRIBUTES
#![warn(x5400)] //~ WARN unknown lint: `x5400`
@ -43,7 +47,6 @@
#![deny(x5100)] //~ WARN unknown lint: `x5100`
#![macro_use] // (allowed if no argument; see issue-43160-gating-of-macro_use.rs)
#![macro_export] //~ WARN unused attribute
#![plugin_registrar] //~ WARN unused attribute
// skipping testing of cfg
// skipping testing of cfg_attr
#![main] //~ WARN unused attribute

View File

@ -1,6 +1,7 @@
// Test that `#![plugin(...)]` attribute is gated by `plugin` feature gate
#![plugin(foo)]
//~^ ERROR compiler plugins are experimental and possibly buggy
//~^ ERROR compiler plugins are deprecated
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -1,4 +1,4 @@
error[E0658]: compiler plugins are experimental and possibly buggy
error[E0658]: compiler plugins are deprecated
--> $DIR/feature-gate-plugin.rs:3:1
|
LL | #![plugin(foo)]
@ -7,6 +7,14 @@ LL | #![plugin(foo)]
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin)]` to the crate attributes to enable
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/feature-gate-plugin.rs:3:1
|
LL | #![plugin(foo)]
| ^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.

View File

@ -3,6 +3,9 @@
// the registration function isn't typechecked yet
#[plugin_registrar]
//~^ ERROR compiler plugins are deprecated
//~| WARN use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated
pub fn registrar() {}
//~^ ERROR compiler plugins are experimental
//~^ ERROR compiler plugins are experimental and possibly buggy
fn main() {}

View File

@ -1,5 +1,5 @@
error[E0658]: compiler plugins are experimental and possibly buggy
--> $DIR/feature-gate-plugin_registrar.rs:6:1
--> $DIR/feature-gate-plugin_registrar.rs:8:1
|
LL | pub fn registrar() {}
| ^^^^^^^^^^^^^^^^^^^^^
@ -7,6 +7,23 @@ LL | pub fn registrar() {}
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin_registrar)]` to the crate attributes to enable
error: aborting due to previous error
error[E0658]: compiler plugins are deprecated
--> $DIR/feature-gate-plugin_registrar.rs:5:1
|
LL | #[plugin_registrar]
| ^^^^^^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/29597
= help: add `#![feature(plugin_registrar)]` to the crate attributes to enable
warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/feature-gate-plugin_registrar.rs:5:1
|
LL | #[plugin_registrar]
| ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.

View File

@ -3,5 +3,6 @@
#[plugin(bla)] //~ ERROR unused attribute
//~^ ERROR should be an inner attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -1,3 +1,11 @@
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/invalid-plugin-attr.rs:4:1
|
LL | #[plugin(bla)]
| ^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: unused attribute
--> $DIR/invalid-plugin-attr.rs:4:1
|

View File

@ -1,4 +1,5 @@
#![feature(plugin)]
#![plugin] //~ ERROR malformed `plugin` attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -4,5 +4,13 @@ error: malformed `plugin` attribute input
LL | #![plugin]
| ^^^^^^^^^^ help: must be of the form: `#[plugin(name|name(args))]`
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/malformed-plugin-1.rs:2:1
|
LL | #![plugin]
| ^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error

View File

@ -1,4 +1,5 @@
#![feature(plugin)]
#![plugin="bleh"] //~ ERROR malformed `plugin` attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -4,5 +4,13 @@ error: malformed `plugin` attribute input
LL | #![plugin="bleh"]
| ^^^^^^^^^^^^^^^^^ help: must be of the form: `#[plugin(name|name(args))]`
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/malformed-plugin-2.rs:2:1
|
LL | #![plugin="bleh"]
| ^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error

View File

@ -1,4 +1,5 @@
#![feature(plugin)]
#![plugin(foo="bleh")] //~ ERROR malformed `plugin` attribute
//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
fn main() {}

View File

@ -4,5 +4,13 @@ error[E0498]: malformed `plugin` attribute
LL | #![plugin(foo="bleh")]
| ^^^^^^^^^^^^^^^^^^^^^^ malformed attribute
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/malformed-plugin-3.rs:2:1
|
LL | #![plugin(foo="bleh")]
| ^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
error: aborting due to previous error

View File

@ -1,3 +1,17 @@
warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/multiple-plugin-registrars.rs:6:1
|
LL | #[plugin_registrar]
| ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated attribute `plugin_registrar`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597
--> $DIR/multiple-plugin-registrars.rs:9:1
|
LL | #[plugin_registrar]
| ^^^^^^^^^^^^^^^^^^^ help: remove this attribute
error: multiple plugin registration functions found
|
note: one is here