diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-10-18 13:48:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-10-18 13:48:26 -0700 |
| commit | 64bf0cab396fdd277441012f0eff9f8d874acf36 (patch) | |
| tree | 5a202288c545ecf4d2aac2f2cbd4fcb7d8167684 /src/libsyntax | |
| parent | ea5a1843833a4c7720d3becfe79853a32f8de60b (diff) | |
| parent | 71b0049ad66eb3f1d8339979422b89e44306bc05 (diff) | |
| download | rust-64bf0cab396fdd277441012f0eff9f8d874acf36.tar.gz rust-64bf0cab396fdd277441012f0eff9f8d874acf36.zip | |
Rollup merge of #65498 - SimonSapin:plugin-help, r=Centril
Plugins deprecation: don’t suggest simply removing the attribute Building Servo with a recent Nightly produces: ```rust warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/issues/29597 --> components/script/lib.rs:14:1 | 14 | #![plugin(script_plugins)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute | = note: `#[warn(deprecated)]` on by default ``` First, linking to https://github.com/rust-lang/rust/issues/29597 is not ideal since there is pretty much no discussion there of the deprecation and what can be used instead. This PR changes the link to the deprecation PR which does have more discussion. Second, the “remove this attribute” suggestion is rather unhelpful. Just because a feature is deprecated doesn’t mean that simply removing its use without a replacement is acceptable. In the case of custom lint, there is no replacement available. Prefixing a message with “help:” when telling users that they’re screwed honestly feels disrespectful. This PR also changes the message to be more factual.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate/builtin_attrs.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate/builtin_attrs.rs b/src/libsyntax/feature_gate/builtin_attrs.rs index 043a2ffb5a4..7dd6ae90d9a 100644 --- a/src/libsyntax/feature_gate/builtin_attrs.rs +++ b/src/libsyntax/feature_gate/builtin_attrs.rs @@ -286,7 +286,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ( sym::plugin_registrar, Normal, template!(Word), Gated( - Stability::Deprecated("https://github.com/rust-lang/rust/issues/29597", None), + Stability::Deprecated( + "https://github.com/rust-lang/rust/pull/64675", + Some("may be removed in a future compiler version"), + ), sym::plugin_registrar, "compiler plugins are deprecated", cfg_fn!(plugin_registrar) @@ -295,7 +298,10 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[ ( sym::plugin, CrateLevel, template!(List: "name|name(args)"), Gated( - Stability::Deprecated("https://github.com/rust-lang/rust/issues/29597", None), + Stability::Deprecated( + "https://github.com/rust-lang/rust/pull/64675", + Some("may be removed in a future compiler version"), + ), sym::plugin, "compiler plugins are deprecated", cfg_fn!(plugin) |
