Skip to content

Commit a1d6fc4

Browse files
committed
rename lint; add tracking issue
1 parent b589976 commit a1d6fc4

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Diff for: compiler/rustc_lint_defs/src/builtin.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2311,13 +2311,13 @@ declare_lint! {
23112311
}
23122312

23132313
declare_lint! {
2314-
/// The `match_without_partial_eq` lint detects constants that are used in patterns,
2314+
/// The `const_patterns_without_partial_eq` lint detects constants that are used in patterns,
23152315
/// whose type does not implement `PartialEq`.
23162316
///
23172317
/// ### Example
23182318
///
23192319
/// ```rust,compile_fail
2320-
/// #![deny(match_without_partial_eq)]
2320+
/// #![deny(const_patterns_without_partial_eq)]
23212321
///
23222322
/// trait EnumSetType {
23232323
/// type Repr;
@@ -2352,12 +2352,12 @@ declare_lint! {
23522352
/// field-by-field. In the future we'd like to ensure that pattern matching always
23532353
/// follows `PartialEq` semantics, so that trait bound will become a requirement for
23542354
/// matching on constants.
2355-
pub MATCH_WITHOUT_PARTIAL_EQ,
2355+
pub CONST_PATTERNS_WITHOUT_PARTIAL_EQ,
23562356
Warn,
23572357
"constant in pattern does not implement `PartialEq`",
23582358
@future_incompatible = FutureIncompatibleInfo {
23592359
reason: FutureIncompatibilityReason::FutureReleaseErrorReportInDeps,
2360-
reference: "issue #X <https://github.com/rust-lang/rust/issues/X>",
2360+
reference: "issue #116122 <https://github.com/rust-lang/rust/issues/116122>",
23612361
};
23622362
}
23632363

@@ -3407,6 +3407,7 @@ declare_lint_pass! {
34073407
CONFLICTING_REPR_HINTS,
34083408
CONST_EVALUATABLE_UNCHECKED,
34093409
CONST_ITEM_MUTATION,
3410+
CONST_PATTERNS_WITHOUT_PARTIAL_EQ,
34103411
DEAD_CODE,
34113412
DEPRECATED,
34123413
DEPRECATED_CFG_ATTR_CRATE_TYPE_NAME,
@@ -3440,7 +3441,6 @@ declare_lint_pass! {
34403441
LOSSY_PROVENANCE_CASTS,
34413442
MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
34423443
MACRO_USE_EXTERN_CRATE,
3443-
MATCH_WITHOUT_PARTIAL_EQ,
34443444
META_VARIABLE_MISUSE,
34453445
MISSING_ABI,
34463446
MISSING_FRAGMENT_SPECIFIER,

Diff for: compiler/rustc_mir_build/src/thir/pattern/const_to_pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ impl<'tcx> ConstToPat<'tcx> {
246246
// any errors.) This ensures it shows up in cargo's future-compat reports as well.
247247
if !self.type_has_partial_eq_impl(cv.ty()) {
248248
self.tcx().emit_spanned_lint(
249-
lint::builtin::MATCH_WITHOUT_PARTIAL_EQ,
249+
lint::builtin::CONST_PATTERNS_WITHOUT_PARTIAL_EQ,
250250
self.id,
251251
self.span,
252252
NonPartialEqMatch { non_peq_ty: cv.ty() },

Diff for: tests/ui/consts/const_in_pattern/issue-65466.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LL | C => (),
55
| ^
66
|
77
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
9-
= note: `#[warn(match_without_partial_eq)]` on by default
8+
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
9+
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
1010

1111
warning: 1 warning emitted
1212

@@ -18,6 +18,6 @@ LL | C => (),
1818
| ^
1919
|
2020
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21-
= note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
22-
= note: `#[warn(match_without_partial_eq)]` on by default
21+
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
22+
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
2323

Diff for: tests/ui/match/issue-72896-non-partial-eq-const.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ LL | CONST_SET => { /* ok */ }
55
| ^^^^^^^^^
66
|
77
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
9-
= note: `#[warn(match_without_partial_eq)]` on by default
8+
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
9+
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
1010

1111
warning: 1 warning emitted
1212

@@ -18,6 +18,6 @@ LL | CONST_SET => { /* ok */ }
1818
| ^^^^^^^^^
1919
|
2020
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
21-
= note: for more information, see issue #X <https://github.com/rust-lang/rust/issues/X>
22-
= note: `#[warn(match_without_partial_eq)]` on by default
21+
= note: for more information, see issue #116122 <https://github.com/rust-lang/rust/issues/116122>
22+
= note: `#[warn(const_patterns_without_partial_eq)]` on by default
2323

0 commit comments

Comments
 (0)