rust/compiler/rustc_lint/src
Matthias Krüger dd4ecd1cf4
Rollup merge of #121326 - fmease:detect-empty-leading-where-clauses-on-ty-aliases, r=compiler-errors
Detect empty leading where clauses on type aliases

1. commit: refactor the AST of type alias where clauses
   * I could no longer bear the look of `.0.1` and `.1.0`
   * Arguably moving `split` out of `TyAlias` into a substruct might not make that much sense from a semantic standpoint since it reprs an index into `TyAlias.predicates` but it's alright and it cleans up the usage sites of `TyAlias`
2. commit: fix an oversight: An empty leading where clause is still a leading where clause
   * semantically reject empty leading where clauses on lazy type aliases
     * e.g., on `#![feature(lazy_type_alias)] type X where = ();`
   * make empty leading where clauses on assoc types trigger lint `deprecated_where_clause_location`
     * e.g., `impl Trait for () { type X where = (); }`
2024-02-29 20:50:02 +01:00
..
context Detect empty leading where-clauses on type aliases 2024-02-29 17:20:04 +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 remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics 2024-02-25 08:14:52 +01: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