diff options
| author | Michael Goulet <michael@errs.io> | 2024-06-27 15:27:52 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-06-28 18:33:31 -0400 |
| commit | 6f3ad0a40bf6bd80610008bfe48d3977e921d09d (patch) | |
| tree | b29151959cad72f410db1541d8c957db42ca58f8 /compiler/rustc_lint/src | |
| parent | e9e6e2e444c30c23a9c878a88fbc3978c2acad95 (diff) | |
| download | rust-6f3ad0a40bf6bd80610008bfe48d3977e921d09d.tar.gz rust-6f3ad0a40bf6bd80610008bfe48d3977e921d09d.zip | |
Only require symbol name for @feature_gate
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/impl_trait_overcaptures.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/multiple_supertrait_upcastable.rs | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_lint/src/impl_trait_overcaptures.rs b/compiler/rustc_lint/src/impl_trait_overcaptures.rs index d4f6d388d9f..0860413190c 100644 --- a/compiler/rustc_lint/src/impl_trait_overcaptures.rs +++ b/compiler/rustc_lint/src/impl_trait_overcaptures.rs @@ -11,7 +11,7 @@ use rustc_middle::ty::{ self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitableExt, TypeVisitor, }; use rustc_session::{declare_lint, declare_lint_pass}; -use rustc_span::{sym, Span}; +use rustc_span::Span; use crate::fluent_generated as fluent; use crate::{LateContext, LateLintPass}; @@ -57,7 +57,7 @@ declare_lint! { pub IMPL_TRAIT_OVERCAPTURES, Allow, "`impl Trait` will capture more lifetimes than possibly intended in edition 2024", - @feature_gate = sym::precise_capturing; + @feature_gate = precise_capturing; //@future_incompatible = FutureIncompatibleInfo { // reason: FutureIncompatibilityReason::EditionSemanticsChange(Edition::Edition2024), // reference: "<FIXME>", @@ -91,7 +91,7 @@ declare_lint! { pub IMPL_TRAIT_REDUNDANT_CAPTURES, Warn, "redundant precise-capturing `use<...>` syntax on an `impl Trait`", - @feature_gate = sym::precise_capturing; + @feature_gate = precise_capturing; } declare_lint_pass!( diff --git a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs index aa1d94228ea..b9ed648b246 100644 --- a/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs +++ b/compiler/rustc_lint/src/multiple_supertrait_upcastable.rs @@ -2,7 +2,6 @@ use crate::{LateContext, LateLintPass, LintContext}; use rustc_hir as hir; use rustc_session::{declare_lint, declare_lint_pass}; -use rustc_span::sym; declare_lint! { /// The `multiple_supertrait_upcastable` lint detects when an object-safe trait has multiple @@ -30,7 +29,7 @@ declare_lint! { pub MULTIPLE_SUPERTRAIT_UPCASTABLE, Allow, "detect when an object-safe trait has multiple supertraits", - @feature_gate = sym::multiple_supertrait_upcastable; + @feature_gate = multiple_supertrait_upcastable; } declare_lint_pass!(MultipleSupertraitUpcastable => [MULTIPLE_SUPERTRAIT_UPCASTABLE]); |
