rust/compiler/rustc_lint/src
Matthias Krüger 58825b4ea9
Rollup merge of #121580 - Suyashtnt:issue-121502-fix, r=michaelwoerister
make unused_imports less assertive in test modules

closes #121502

This is a fairly small change and I used the fix suggested in the example expected error message.
Not sure if I should've rather used the alternatives but this one seems the most descriptive.

Some alternatives:
- if this is meant to be a test module, add `#[cfg(test)]` to the containing module
- try adding #[cfg(test)] to this test module
- consider adding #[allow(unused_imports)] if you want to silent the lint on the unused import
- consider removing the unused import
2024-03-01 17:51:29 +01:00
..
context Rollup merge of #121580 - Suyashtnt:issue-121502-fix, r=michaelwoerister 2024-03-01 17:51:29 +01:00
nonstandard_style
array_into_iter.rs Mark some once-again-unreachable paths as unreachable. 2024-02-29 11:08:29 +11:00
async_fn_in_trait.rs Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
builtin.rs Rollup merge of #121060 - clubby789:bool-newtypes, r=cjgillot 2024-02-25 17:05:20 +01:00
context.rs Rename DiagnosticBuilder as Diag. 2024-02-28 08:55:35 +11:00
deref_into_dyn_supertrait.rs Auto merge of #120017 - nnethercote:lint-api, r=oli-obk 2024-01-23 00:06:57 +00:00
drop_forget_useless.rs hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent} 2024-02-10 12:24:46 +03:00
early.rs Use fewer delayed bugs. 2024-02-14 20:30:37 +11:00
enum_intrinsics_non_enums.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
errors.rs Rename DiagnosticBuilder as Diag. 2024-02-28 08:55:35 +11:00
expect.rs Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
for_loops_over_fallibles.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
foreign_modules.rs Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
hidden_unicode_codepoints.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
internal.rs Remove the UntranslatableDiagnosticTrivial lint. 2024-02-28 10:53:04 +11:00
invalid_from_utf8.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
late.rs tidy 2024-02-09 19:30:47 +01:00
let_underscore.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
levels.rs Rename DiagnosticBuilder as Diag. 2024-02-28 08:55:35 +11:00
lib.rs Remove the UntranslatableDiagnosticTrivial lint. 2024-02-28 10:53:04 +11:00
lints.rs Auto merge of #121489 - nnethercote:diag-renaming, r=davidtwco 2024-02-28 20:39:38 +00:00
map_unit_fn.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
methods.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
multiple_supertrait_upcastable.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
non_ascii_idents.rs separate messages for individual categories 2024-02-26 10:09:03 +08:00
non_fmt_panic.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
non_local_def.rs Add cargo update suggestion for non local defs 2024-02-17 14:00:08 +01:00
nonstandard_style.rs hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent} 2024-02-10 12:24:46 +03:00
noop_method_call.rs When encountering <&T as Clone>::clone(x) because T: Clone, suggest #[derive(Clone)] 2024-02-22 18:01:20 +00:00
opaque_hidden_inferred_bound.rs introduce enter_forall 2024-02-08 13:01:08 +00:00
pass_by_value.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
passes.rs Remove rustc_lint_defs::lint_array 2023-09-28 23:01:25 +02:00
ptr_nulls.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
redundant_semicolon.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
reference_casting.rs Ignore unsized types when trying to determine the size of a type 2024-02-14 19:23:20 +01:00
tests.rs refactor(rustc_lint): inline check_lint_name_cmdline 2023-08-30 17:35:07 +01:00
traits.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
types.rs Add f16 and f128 to rustc_type_ir::FloatTy and rustc_abi::Primitive 2024-02-28 12:58:32 -05:00
unit_bindings.rs Rename LintContext::emit_spanned_lint as LintContext::emit_span_lint. 2024-01-23 08:08:25 +11:00
unused.rs Add ErrorGuaranteed to ast::ExprKind::Err 2024-02-25 22:24:31 +01:00