Skip to content

Commit f9b70f0

Browse files
Migrate rustc_lint::EqInternalMethodImplemented to Diagnostic
1 parent b409cb1 commit f9b70f0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_lint/src/disallowed_pass_by_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl<'tcx> LateLintPass<'tcx> for DisallowedPassByRef {
2626
if cx.tcx.trait_impl_of_assoc(ty.hir_id.owner.to_def_id()).is_some() {
2727
return;
2828
}
29-
if let Some(t) = path_for_pass_by_value(cx, inner_ty) {
29+
if let Some(t) = path_for_rustc_pass_by_value(cx, inner_ty) {
3030
cx.emit_span_lint(
3131
DISALLOWED_PASS_BY_REF,
3232
ty.span,

compiler/rustc_lint/src/lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3951,7 +3951,7 @@ pub(crate) struct MalformedOnConstAttrLint {
39513951
pub span: Span,
39523952
}
39533953

3954-
#[derive(LintDiagnostic)]
3954+
#[derive(Diagnostic)]
39553955
#[diag("`Eq::assert_receiver_is_total_eq` should never be implemented by hand")]
39563956
#[note("this method was used to add checks to the `Eq` derive macro")]
39573957
pub(crate) struct EqInternalMethodImplemented;

tests/ui/deriving/internal_eq_trait_method_impls.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ error: `Eq::assert_receiver_is_total_eq` should never be implemented by hand
2828
LL | fn assert_receiver_is_total_eq(&self) {}
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030
|
31+
= note: this method was used to add checks to the `Eq` derive macro
3132
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
3233
= note: for more information, see issue #152336 <https://github.com/rust-lang/rust/issues/152336>
33-
= note: this method was used to add checks to the `Eq` derive macro
3434
note: the lint level is defined here
3535
--> $DIR/internal_eq_trait_method_impls.rs:1:21
3636
|

0 commit comments

Comments
 (0)