rust/compiler/rustc_lint/src
Weihang Lo 1d526692d4
Rollup merge of #115152 - weihanglo:lint-refactor, r=compiler-errors
refactor(lint): translate `RenamedOrRemovedLint`

I was trying to address <https://github.com/rust-lang/cargo/issues/12495> and found that maybe I should refactor relevant lints a bit.

This PR translates `RenamedOrRemovedLint` into fluent file. To make diagnostic types clearer and easier to organize, this PR splits it into two structs.

The second commit adds lifetime annotations for removing unnecessary clones. If people feel too noisy, we can revert such change.

### Possibly relevant UI tests:

* `tests/ui/lint-removed*`
* `tests/ui/lint-renamed*`
* `tests/ui/rustdoc-renamed.rs`
* `tests/rustdoc-ui/lints/unknown-renamed-lints.rs`
2023-08-24 22:53:59 +01:00
..
nonstandard_style mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
array_into_iter.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
builtin.rs Auto merge of #114723 - petrochenkov:noplugin2, r=davidtwco 2023-08-13 10:59:36 +00:00
context.rs refactor: use references to reduce unnecessary clones 2023-08-24 01:09:55 +01:00
deref_into_dyn_supertrait.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
drop_forget_useless.rs Fix dropping_copy_types lint from linting in match-arm with side-effects 2023-07-01 16:05:55 +02:00
early.rs rustc: Move features from Session to GlobalCtxt 2023-08-11 16:51:50 +08:00
enum_intrinsics_non_enums.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
errors.rs refactor: use references to reduce unnecessary clones 2023-08-24 01:09:55 +01:00
expect.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
for_loops_over_fallibles.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
foreign_modules.rs Simplify clashing_extern_declarations. 2023-08-04 16:09:13 +00:00
hidden_unicode_codepoints.rs migrate: hidden_unicode_codepoints.rs 2023-01-09 17:07:25 -05:00
internal.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
invalid_from_utf8.rs Add invalid_from_utf8 analogous to invalid_from_utf8_unchecked 2023-05-27 00:18:28 +02:00
late.rs Use {Local}ModDefId in many queries 2023-08-14 07:22:48 +00:00
let_underscore.rs Fix typos in compiler 2023-04-10 22:02:52 +02:00
levels.rs lint: translate RenamedOrRemovedLint 2023-08-24 01:09:46 +01:00
lib.rs Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
lints.rs lint: translate RenamedOrRemovedLint 2023-08-24 01:09:46 +01:00
map_unit_fn.rs Fix #109152, fix the scenario that we may can not get span of func 2023-03-15 14:07:39 +08:00
methods.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
multiple_supertrait_upcastable.rs Add missing feature gate in multiple_supertrait_upcastable doc 2023-07-31 12:28:53 +01:00
non_ascii_idents.rs Reword confusable idents lint 2023-08-04 16:46:08 +00:00
non_fmt_panic.rs Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
nonstandard_style.rs allow host param to be lowercase 2023-07-04 11:47:46 +00:00
noop_method_call.rs fix 2023-07-23 09:58:31 +00:00
opaque_hidden_inferred_bound.rs Rename arg_iter to iter_instantiated 2023-07-17 21:04:12 +00:00
pass_by_value.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
passes.rs Take a LocalDefId in hir::Visitor::visit_fn. 2023-01-28 09:51:50 +00:00
ptr_nulls.rs Also add label with original type for function pointers 2023-08-03 10:57:11 +02:00
redundant_semicolon.rs refactor: cleanup 2023-01-09 18:57:02 -05:00
reference_casting.rs Add support for ptr::write for the invalid_reference_casting lint 2023-08-22 15:47:29 +02:00
tests.rs Update to last upstream version 2021-07-08 17:14:28 +02:00
traits.rs Re-format let-else per rustfmt update 2023-07-12 21:49:27 -04:00
types.rs Rollup merge of #114486 - Urgau:const-context-nan-suggestion-114471, r=compiler-errors 2023-08-06 03:56:09 +02:00
unused.rs match scrutinee need necessary parentheses for structs 2023-08-14 18:05:13 +08:00