diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-28 15:18:48 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-05-30 02:23:20 +1000 |
| commit | f8887aa5afd5ec20b3074e798c29146da3d91f91 (patch) | |
| tree | b1a8fdf4c8a069f0de8a0baf5a06da9f45add8a2 /compiler/rustc_lint/src/nonstandard_style.rs | |
| parent | 13718eb788622ef8c998650451174570230d2971 (diff) | |
| download | rust-f8887aa5afd5ec20b3074e798c29146da3d91f91.tar.gz rust-f8887aa5afd5ec20b3074e798c29146da3d91f91.zip | |
Reorder fields in `hir::ItemKind` variants.
Specifically `TyAlias`, `Enum`, `Struct`, `Union`. So the fields match the textual order in the source code. The interesting part of the change is in `compiler/rustc_hir/src/hir.rs`. The rest is extremely mechanical refactoring.
Diffstat (limited to 'compiler/rustc_lint/src/nonstandard_style.rs')
| -rw-r--r-- | compiler/rustc_lint/src/nonstandard_style.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/nonstandard_style.rs b/compiler/rustc_lint/src/nonstandard_style.rs index 048d377b78f..31c18074466 100644 --- a/compiler/rustc_lint/src/nonstandard_style.rs +++ b/compiler/rustc_lint/src/nonstandard_style.rs @@ -513,7 +513,7 @@ impl<'tcx> LateLintPass<'tcx> for NonUpperCaseGlobals { fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { let attrs = cx.tcx.hir_attrs(it.hir_id()); match it.kind { - hir::ItemKind::Static(ident, ..) + hir::ItemKind::Static(_, ident, ..) if !ast::attr::contains_name(attrs, sym::no_mangle) => { NonUpperCaseGlobals::check_upper_case(cx, "static variable", &ident); |
