Skip to content

Commit 88e5dd2

Browse files
committed
refactor: cleanup
1 parent fe09291 commit 88e5dd2

22 files changed

+3
-49
lines changed

compiler/rustc_lint/src/array_into_iter.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use crate::lints::{ArrayIntoIterDiag, ArrayIntoIterDiagSub};
42
use crate::{LateContext, LateLintPass, LintContext};
53
use rustc_hir as hir;

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// #![deny(rustc::untranslatable_diagnostic)]
2-
// #![deny(rustc::diagnostic_outside_of_impl)]
31
//! Lints in the Rust compiler.
42
//!
53
//! This contains lints which can feasibly be implemented as their own
@@ -2956,11 +2954,6 @@ impl<'tcx> LateLintPass<'tcx> for ClashingExternDeclarations {
29562954
};
29572955

29582956
// Finally, emit the diagnostic.
2959-
let mut expected_str = DiagnosticStyledString::new();
2960-
expected_str.push(existing_decl_ty.fn_sig(tcx).to_string(), false);
2961-
let mut found_str = DiagnosticStyledString::new();
2962-
found_str.push(this_decl_ty.fn_sig(tcx).to_string(), true);
2963-
29642957
let this = this_fi.ident.name;
29652958
let orig = orig.get_name();
29662959
let previous_decl_label = get_relevant_span(orig_fi);
@@ -3119,6 +3112,7 @@ declare_lint! {
31193112
declare_lint_pass!(NamedAsmLabels => [NAMED_ASM_LABELS]);
31203113

31213114
impl<'tcx> LateLintPass<'tcx> for NamedAsmLabels {
3115+
#[allow(rustc::diagnostic_outside_of_impl)]
31223116
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) {
31233117
if let hir::Expr {
31243118
kind: hir::ExprKind::InlineAsm(hir::InlineAsm { template_strs, .. }),

compiler/rustc_lint/src/context.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
//! previous lint state is pushed onto a stack and the ast is then recursed
1414
//! upon. As the ast is traversed, this keeps track of the current lint level
1515
//! for all lint attributes.
16-
#![deny(rustc::untranslatable_diagnostic)]
17-
#![deny(rustc::diagnostic_outside_of_impl)]
1816
1917
use self::TargetLint::*;
2018

compiler/rustc_lint/src/early.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
//! Implementation of lint checking.
42
//!
53
//! The lint checking is mostly consolidated into one pass which runs

compiler/rustc_lint/src/enum_intrinsics_non_enums.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use crate::{
42
context::LintContext,
53
lints::{EnumIntrinsicsMemDiscriminate, EnumIntrinsicsMemVariant},

compiler/rustc_lint/src/errors.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use rustc_errors::{
42
fluent, AddToDiagnostic, Diagnostic, ErrorGuaranteed, Handler, IntoDiagnostic,
53
SubdiagnosticMessage,

compiler/rustc_lint/src/expect.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use crate::lints::{Expectation, ExpectationNote};
42
use rustc_middle::ty::query::Providers;
53
use rustc_middle::ty::TyCtxt;

compiler/rustc_lint/src/for_loops_over_fallibles.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use crate::{
42
lints::{
53
ForLoopsOverFalliblesDiag, ForLoopsOverFalliblesLoopSub, ForLoopsOverFalliblesQuestionMark,

compiler/rustc_lint/src/internal.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! Some lints that are only useful in the compiler or crates that use compiler internals, such as
22
//! Clippy.
33
4-
#![deny(rustc::untranslatable_diagnostic)]
5-
#![deny(rustc::diagnostic_outside_of_impl)]
64
use crate::lints::{
75
BadOptAccessDiag, DefaultHashTypesDiag, DiagOutOfImpl, LintPassByHand, NonExistantDocKeyword,
86
QueryInstability, TyQualified, TykindDiag, TykindKind, UntranslatableDiag,

compiler/rustc_lint/src/let_underscore.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
31
use crate::{
42
lints::{NonBindingLet, NonBindingLetSub},
53
LateContext, LateLintPass, LintContext,

0 commit comments

Comments
 (0)