Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f9289c3

Browse files
committed
refactor: comment about lint location
1 parent a0614ec commit f9289c3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

compiler/rustc_lint/src/lints.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use rustc_span::{symbol::Ident, Span, Symbol};
66

77
use crate::LateContext;
88

9+
// array_into_iter.rs
910
#[derive(LintDiagnostic)]
1011
#[diag(lint_array_into_iter)]
1112
pub struct ArrayIntoIterDiag<'a> {
@@ -32,6 +33,7 @@ pub enum ArrayIntoIterDiagSub {
3233
},
3334
}
3435

36+
// enum_intrinsics_non_enums.rs
3537
#[derive(LintDiagnostic)]
3638
#[diag(lint_enum_intrinsics_mem_discriminant)]
3739
pub struct EnumIntrinsicsMemDiscriminate<'a> {
@@ -47,6 +49,7 @@ pub struct EnumIntrinsicsMemVariant<'a> {
4749
pub ty_param: Ty<'a>,
4850
}
4951

52+
// methods.rs
5053
#[derive(LintDiagnostic)]
5154
#[diag(lint_cstring_ptr)]
5255
#[note]
@@ -57,6 +60,8 @@ pub struct CStringPtr {
5760
#[label(unwrap_label)]
5861
pub unwrap: Span,
5962
}
63+
64+
// non_ascii_idents.rs
6065
#[derive(LintDiagnostic)]
6166
#[diag(lint_identifier_non_ascii_char)]
6267
pub struct IdentifierNonAsciiChar;
@@ -83,6 +88,7 @@ pub struct MixedScriptConfusables {
8388
pub includes: String,
8489
}
8590

91+
// non_fmt_panic.rs
8692
pub struct NonFmtPanicUnused {
8793
pub count: usize,
8894
pub suggestion: Option<Span>,
@@ -126,6 +132,7 @@ pub struct NonFmtPanicBraces {
126132
pub suggestion: Option<Span>,
127133
}
128134

135+
// nonstandard_style.rs
129136
#[derive(LintDiagnostic)]
130137
#[diag(lint_non_camel_case_type)]
131138
pub struct NonCamelCaseType<'a> {
@@ -236,6 +243,7 @@ pub enum NonUpperCaseGlobalSub {
236243
},
237244
}
238245

246+
// noop_method_call.rs
239247
#[derive(LintDiagnostic)]
240248
#[diag(lint_noop_method_call)]
241249
#[note]
@@ -246,6 +254,7 @@ pub struct NoopMethodCallDiag<'a> {
246254
pub label: Span,
247255
}
248256

257+
// pass_by_value.rs
249258
#[derive(LintDiagnostic)]
250259
#[diag(lint_pass_by_value)]
251260
pub struct PassByValueDiag {
@@ -254,6 +263,7 @@ pub struct PassByValueDiag {
254263
pub suggestion: Span,
255264
}
256265

266+
// redundant_semicolon.rs
257267
#[derive(LintDiagnostic)]
258268
#[diag(lint_redundant_semicolons)]
259269
pub struct RedundantSemicolonsDiag {
@@ -262,6 +272,7 @@ pub struct RedundantSemicolonsDiag {
262272
pub suggestion: Span,
263273
}
264274

275+
// traits.rs
265276
pub struct DropTraitConstraintsDiag<'a> {
266277
pub predicate: Predicate<'a>,
267278
pub tcx: TyCtxt<'a>,
@@ -300,6 +311,7 @@ impl<'a> DecorateLint<'a, ()> for DropGlue<'_> {
300311
}
301312
}
302313

314+
// types.rs
303315
#[derive(LintDiagnostic)]
304316
#[diag(lint_range_endpoint_out_of_range)]
305317
pub struct RangeEndpointOutOfRange<'a> {
@@ -457,6 +469,7 @@ pub struct InvalidAtomicOrderingDiag {
457469
pub fail_order_arg_span: Span,
458470
}
459471

472+
// unused.rs
460473
#[derive(LintDiagnostic)]
461474
#[diag(lint_unused_op)]
462475
pub struct UnusedOp<'a> {

0 commit comments

Comments
 (0)