diff --git a/src/v1/05_emit_rust.dag b/src/v1/05_emit_rust.dag index 70c334b8041..ab651bcff7c 100644 --- a/src/v1/05_emit_rust.dag +++ b/src/v1/05_emit_rust.dag @@ -3438,6 +3438,44 @@ fn lib_rs_mod_name_from_path(path: String) -> String { data hand_maintained_map_key_required_type_names: List = ["ItemKind"] +// ONE AUTHORITY FOR THE LINT RELAXATION GENERATED RUST NEEDS, TWO RENDERINGS. Mechanically +// derived Rust carries artifacts no lint can inform an authoring decision about: parentheses +// the lowering adds to keep precedence safe, imports the emitter cannot know a body will not +// use, clones it cannot know are Copy. Relaxing those is a fact about GENERATED CODE, so it +// is spelled once here and rendered where it belongs, rather than copied per emitter -- it was +// spelled twice, here and in v1.compiler.stage0_crates, which is one concept with two names. +// +// THE RENDERING IS NOT COSMETIC. An inner `#![allow(..)]` at a crate root outranks `-D warnings` +// on the command line and reaches every module under that root, so a root that blankets on +// behalf of its generated modules also silences every HAND-MAINTAINED module sharing it. The +// v1-compiler root did exactly that: `cargo clippy --all-targets -- -D warnings`, one of the +// three checks DESIGN names, decided nothing over the 40 top-level and 27 cli_run modules +// written by hand. So the crate-root block is emitted only for a root whose modules are ALL +// generated, and where hand-maintained siblings share the root each generated item carries the +// relaxation as an outer attribute instead. +data generated_rust_lint_relaxations: List = [ + "unused_imports", + "unused_variables", + "unused_mut", + "unused_parens", + "dead_code", + "non_shorthand_field_patterns", + "suspicious_double_ref_op", + "clippy::all" +] + +fn generated_rust_lint_arguments() -> String { + generated_rust_lint_relaxations |> join(separator: ", ") +} + +fn generated_rust_crate_allow_block() -> String { + concat("#![allow(", generated_rust_lint_arguments(), ")]") +} + +fn generated_rust_item_allow_attr() -> String { + concat("#[allow(", generated_rust_lint_arguments(), ")]\n") +} + // ONE role, TWO projections. Being a macro provider decides both how the module is // RENDERED (`#[macro_use]`) and where it is ORDERED (ahead of its consumers), and the // two were independently written comparisons against the same literal until this @@ -3522,9 +3560,9 @@ fn stage0_package_name_to_crate_ident(package_name: String) -> String { // shell's own definition leaves every `crate::NonEmptyVec` in the modules that stay bound to // exactly the type it was bound to before this cut. Deleting it would silently repoint them at // the foundation's, which is a carrier change wearing a re-export's clothes. -fn stage0_host_shell_partition_reexport_block() -> String { +fn stage0_host_shell_partition_reexport_block(item_attr: String) -> String { generated_host_shell_partition_dependencies - |> map(pkg => concat("pub use ", stage0_package_name_to_crate_ident(package_name: pkg), "::*;")) + |> map(pkg => concat(item_attr, "pub use ", stage0_package_name_to_crate_ident(package_name: pkg), "::*;")) |> join(separator: "\n") } @@ -3540,6 +3578,17 @@ fn stage0_host_shell_partition_reexport_block() -> String { // the module NAME; it reads no module content and no rendered file, so a scoped emission still // declares the whole population minus the partition-owned names. Ownership and scope are decided // by different inputs and neither can shadow the other. +// A ROOT THAT MIXES AUTHORSHIP MAY NOT BLANKET ON ITS MODULES' BEHALF. `has_compiler_tests` +// selects the one root that declares hand-maintained modules beside generated ones -- the +// stage0 host shell -- and there the relaxation rides each generated item while the +// hand-maintained block is left bare, so `cargo clippy --all-targets -- -D warnings` reaches it. +// Every other root this function renders is wholly generated and keeps the crate-level block, +// which is honest because there is nothing under it the relaxation does not describe. +// +// The `im` alias carries the attribute because it is generated and one of its two names is +// unused; the NonEmpty* wrappers deliberately do NOT, because they are a fixed handful of items +// that are clean under the gate today, and leaving judged what can be judged keeps the excused +// set as small as the facts require rather than as large as the category. fn emit_lib_rs_from_paths(all_module_paths: List, has_compiler_tests: Bool) -> TextFile { let file_derived_names = all_module_paths |> map(lib_rs_mod_name_from_path) let shell_names = if has_compiler_tests { @@ -3552,7 +3601,20 @@ fn emit_lib_rs_from_paths(all_module_paths: List, has_compiler_tests: Bo } else { order_partial_lib_rs_mod_names(mod_names: shell_names) } - let mod_decls = mod_names |> map(emit_lib_rs_mod_decl) + let root_is_mixed_authorship = has_compiler_tests + let generated_item_attr = if root_is_mixed_authorship { + generated_rust_item_allow_attr() + } else { + "" + } + let root_allow_block = if root_is_mixed_authorship { + "" + } else { + concat(generated_rust_crate_allow_block(), "\n") + } + + let mod_decls = mod_names + |> map(n => concat(generated_item_attr, emit_lib_rs_mod_decl(mod_name: n))) let hand_maintained_mods = if has_compiler_tests { generated_pub_mod_block @@ -3560,20 +3622,22 @@ fn emit_lib_rs_from_paths(all_module_paths: List, has_compiler_tests: Bo "" } let test_mod = if has_compiler_tests { - "\n\n#[cfg(test)]\nmod compiler_tests;" + concat("\n\n#[cfg(test)]\n", generated_item_attr, "mod compiler_tests;") } else { "" } let partition_reexports = if has_compiler_tests { - concat(stage0_host_shell_partition_reexport_block(), "\n\n") + concat(stage0_host_shell_partition_reexport_block(item_attr: generated_item_attr), "\n\n") } else { "" } let shared_types = emit_non_empty_wrappers() let content = concat("// Generated by v1 compiler -- do not edit.\n\n", - "#![allow(unused_imports, unused_variables, unused_mut, unused_parens, dead_code, non_shorthand_field_patterns, suspicious_double_ref_op, clippy::all)]\n#![deny(unreachable_patterns)]\n", + root_allow_block, + "#![deny(unreachable_patterns)]\n", "#![recursion_limit = \"256\"]\n\n", + generated_item_attr, "use im::\{OrdSet as BTreeSet, Vector as Vec\};\n\n", partition_reexports, mod_decls |> join(separator: "\n"), diff --git a/src/v1/stage0/src/behavioral_receipt_host.rs b/src/v1/stage0/src/behavioral_receipt_host.rs index 50032e6b741..8fc6634d216 100644 --- a/src/v1/stage0/src/behavioral_receipt_host.rs +++ b/src/v1/stage0/src/behavioral_receipt_host.rs @@ -1,4 +1,17 @@ -#![allow(clippy::disallowed_macros)] +// CLIPPY ROSTER -- 6 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::clone_on_copy, // 1 + clippy::disallowed_macros, // 0 -- pre-existing + clippy::enum_variant_names, // 1 + clippy::needless_borrow, // 1 + dead_code, // 3 +)] use crate::cli_run::namespace_wave_admission::git_stdout; use std::fs; diff --git a/src/v1/stage0/src/bounded_shell_host_drain.rs b/src/v1/stage0/src/bounded_shell_host_drain.rs index 27a79df35da..ce166798829 100644 --- a/src/v1/stage0/src/bounded_shell_host_drain.rs +++ b/src/v1/stage0/src/bounded_shell_host_drain.rs @@ -4,6 +4,17 @@ //! native serve and the shared `CapturedProcessStream` carrier land. `std.shell_stream_capture` //! carries scaffold prose and predicate witnesses only — not parallel limits. +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::io_other_error, // 2 +)] + use std::io::Read; use std::process::{Child, ExitStatus}; diff --git a/src/v1/stage0/src/census_exclude_derive.rs b/src/v1/stage0/src/census_exclude_derive.rs index 34759b20b72..15950f21c9b 100644 --- a/src/v1/stage0/src/census_exclude_derive.rs +++ b/src/v1/stage0/src/census_exclude_derive.rs @@ -14,6 +14,17 @@ //! - (i) Silent live-importer loss → typed refusal. //! - (ii) Derived closure exclusion of live importers → legitimate, reported in receipt. +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 1 +)] + use std::collections::{BTreeSet, VecDeque}; use std::path::{Path, PathBuf}; use std::sync::OnceLock; diff --git a/src/v1/stage0/src/cli_run.rs b/src/v1/stage0/src/cli_run.rs index 4aa9c0ffb30..3f8564c6c5b 100644 --- a/src/v1/stage0/src/cli_run.rs +++ b/src/v1/stage0/src/cli_run.rs @@ -1,3 +1,40 @@ +// CLIPPY ROSTER -- 256 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::assertions_on_constants, // 1 + clippy::clone_on_copy, // 1 + clippy::cloned_ref_to_slice_refs, // 2 + clippy::collapsible_str_replace, // 1 + clippy::disallowed_macros, // 94 + clippy::doc_lazy_continuation, // 2 + clippy::empty_line_after_doc_comments, // 4 + clippy::enum_variant_names, // 1 + clippy::iter_kv_map, // 1 + clippy::manual_is_multiple_of, // 1 + clippy::manual_strip, // 3 + clippy::map_identity, // 2 + clippy::missing_const_for_thread_local, // 2 + clippy::needless_borrow, // 2 + clippy::needless_lifetimes, // 1 + clippy::only_used_in_recursion, // 1 + clippy::ptr_arg, // 4 + clippy::redundant_closure, // 3 + clippy::single_char_add_str, // 2 + clippy::too_many_arguments, // 2 + clippy::type_complexity, // 7 + clippy::unnecessary_to_owned, // 12 + clippy::unneeded_struct_pattern, // 1 + clippy::useless_vec, // 1 + dead_code, // 88 + unused_imports, // 14 + unused_mut, // 3 +)] + use im::HashMap; use std::cell::{Cell, RefCell}; use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque}; @@ -1286,7 +1323,7 @@ mod process_cwd_mutation_reachability_gate { // A raw-string opener: `r`, then zero or more `#`, then `"`, and not preceded by // an identifier character (else it is the tail of a name like `attr`). if c == 'r' - && i.checked_sub(1).map_or(true, |prev| { + && i.checked_sub(1).is_none_or(|prev| { !(chars[prev].is_ascii_alphanumeric() || chars[prev] == '_') }) { diff --git a/src/v1/stage0/src/cli_run/active_workset.rs b/src/v1/stage0/src/cli_run/active_workset.rs index 25c05b47089..fae251445d6 100644 --- a/src/v1/stage0/src/cli_run/active_workset.rs +++ b/src/v1/stage0/src/cli_run/active_workset.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 4 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + dead_code, // 4 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/census_heads.rs b/src/v1/stage0/src/cli_run/census_heads.rs index b5accf191c6..941d0c6f8e3 100644 --- a/src/v1/stage0/src/cli_run/census_heads.rs +++ b/src/v1/stage0/src/cli_run/census_heads.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 9 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::clone_on_copy, // 6 + clippy::type_complexity, // 1 + dead_code, // 2 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/class_b_census.rs b/src/v1/stage0/src/cli_run/class_b_census.rs index c99c89af0fa..0afd2dac196 100644 --- a/src/v1/stage0/src/cli_run/class_b_census.rs +++ b/src/v1/stage0/src/cli_run/class_b_census.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 7 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 7 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/compile_clean.rs b/src/v1/stage0/src/cli_run/compile_clean.rs index a5f1f793018..a2e3b0c0b51 100644 --- a/src/v1/stage0/src/cli_run/compile_clean.rs +++ b/src/v1/stage0/src/cli_run/compile_clean.rs @@ -1,5 +1,49 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 18 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 14 + clippy::manual_unwrap_or, // 1 + dead_code, // 3 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/complexity_gates.rs b/src/v1/stage0/src/cli_run/complexity_gates.rs index 19d24dd3e42..978caa3a685 100644 --- a/src/v1/stage0/src/cli_run/complexity_gates.rs +++ b/src/v1/stage0/src/cli_run/complexity_gates.rs @@ -1,5 +1,49 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::field_reassign_with_default, // 1 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/declared_refs.rs b/src/v1/stage0/src/cli_run/declared_refs.rs index 7ad3852a3eb..a5589cfd20d 100644 --- a/src/v1/stage0/src/cli_run/declared_refs.rs +++ b/src/v1/stage0/src/cli_run/declared_refs.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 4 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 2 + dead_code, // 2 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/doc_graph.rs b/src/v1/stage0/src/cli_run/doc_graph.rs index c18ee37e359..83f12342644 100644 --- a/src/v1/stage0/src/cli_run/doc_graph.rs +++ b/src/v1/stage0/src/cli_run/doc_graph.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/emit_host.rs b/src/v1/stage0/src/cli_run/emit_host.rs index 45e5de0feea..b99bf0b18fe 100644 --- a/src/v1/stage0/src/cli_run/emit_host.rs +++ b/src/v1/stage0/src/cli_run/emit_host.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::unneeded_struct_pattern, // 1 + dead_code, // 1 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/entry_resolve.rs b/src/v1/stage0/src/cli_run/entry_resolve.rs index 14bb2b33f94..1c94e2a05df 100644 --- a/src/v1/stage0/src/cli_run/entry_resolve.rs +++ b/src/v1/stage0/src/cli_run/entry_resolve.rs @@ -1,5 +1,49 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 31 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 10 + clippy::doc_lazy_continuation, // 2 + clippy::items_after_test_module, // 1 + clippy::redundant_closure, // 1 + clippy::type_complexity, // 8 + dead_code, // 9 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/external_authority.rs b/src/v1/stage0/src/cli_run/external_authority.rs index e4914aa009b..e3e9ef2a8b0 100644 --- a/src/v1/stage0/src/cli_run/external_authority.rs +++ b/src/v1/stage0/src/cli_run/external_authority.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/fallback_arm_census.rs b/src/v1/stage0/src/cli_run/fallback_arm_census.rs index 8937af02bd6..ee076c513aa 100644 --- a/src/v1/stage0/src/cli_run/fallback_arm_census.rs +++ b/src/v1/stage0/src/cli_run/fallback_arm_census.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/floor_discovery_snapshot.rs b/src/v1/stage0/src/cli_run/floor_discovery_snapshot.rs index 8d75fdc5312..3fe0408e29c 100644 --- a/src/v1/stage0/src/cli_run/floor_discovery_snapshot.rs +++ b/src/v1/stage0/src/cli_run/floor_discovery_snapshot.rs @@ -27,6 +27,50 @@ //! and `apply_effect_reach_derived_reads_live_tree` both read them while deciding the roster. That //! is a local read, not a transport. +// CLIPPY ROSTER -- 8 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 1 + clippy::too_many_arguments, // 2 + dead_code, // 2 + unused_imports, // 3 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use std::collections::{BTreeMap, HashMap, HashSet}; use std::fs; use std::io::Write as IoWrite; diff --git a/src/v1/stage0/src/cli_run/inert_carrier.rs b/src/v1/stage0/src/cli_run/inert_carrier.rs index e6db18cb612..a197cfca9e7 100644 --- a/src/v1/stage0/src/cli_run/inert_carrier.rs +++ b/src/v1/stage0/src/cli_run/inert_carrier.rs @@ -1,5 +1,49 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::collapsible_if, // 1 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/languages_census.rs b/src/v1/stage0/src/cli_run/languages_census.rs index 1c988dbdf16..f19f8fd4e4e 100644 --- a/src/v1/stage0/src/cli_run/languages_census.rs +++ b/src/v1/stage0/src/cli_run/languages_census.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/live_read_decode.rs b/src/v1/stage0/src/cli_run/live_read_decode.rs index bc2463625f1..2440a9f76ea 100644 --- a/src/v1/stage0/src/cli_run/live_read_decode.rs +++ b/src/v1/stage0/src/cli_run/live_read_decode.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/materialization_provider_consumer.rs b/src/v1/stage0/src/cli_run/materialization_provider_consumer.rs index 6cd54348860..55e604685a2 100644 --- a/src/v1/stage0/src/cli_run/materialization_provider_consumer.rs +++ b/src/v1/stage0/src/cli_run/materialization_provider_consumer.rs @@ -1,3 +1,47 @@ +// CLIPPY ROSTER -- 4 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::missing_const_for_thread_local, // 1 + clippy::needless_borrow, // 2 + clippy::too_many_arguments, // 1 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_imports, + unused_mut +)] + use crate::resolved_graph_cache::{ faithful_probe_unavailable_gap, is_union_part_absent, supports_faithful_probe, FaithfulResolvedGraphProbeParts, diff --git a/src/v1/stage0/src/cli_run/non_fold_residue.rs b/src/v1/stage0/src/cli_run/non_fold_residue.rs index 93340814076..74f6e957674 100644 --- a/src/v1/stage0/src/cli_run/non_fold_residue.rs +++ b/src/v1/stage0/src/cli_run/non_fold_residue.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/owned_data.rs b/src/v1/stage0/src/cli_run/owned_data.rs index 95e327564ef..2c680d1107a 100644 --- a/src/v1/stage0/src/cli_run/owned_data.rs +++ b/src/v1/stage0/src/cli_run/owned_data.rs @@ -1,5 +1,49 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::collapsible_if, // 1 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/p1_cohort.rs b/src/v1/stage0/src/cli_run/p1_cohort.rs index 9f3852088b8..3434233f94a 100644 --- a/src/v1/stage0/src/cli_run/p1_cohort.rs +++ b/src/v1/stage0/src/cli_run/p1_cohort.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 3 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + dead_code, // 3 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/pool_acquire.rs b/src/v1/stage0/src/cli_run/pool_acquire.rs index 5ecaeb92ab8..9b26d33d8b3 100644 --- a/src/v1/stage0/src/cli_run/pool_acquire.rs +++ b/src/v1/stage0/src/cli_run/pool_acquire.rs @@ -26,6 +26,50 @@ //! part of the key because `tokenize` bakes it into every span, so two spellings of one file are //! two different answers and must not share an entry. +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + dead_code, // 1 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_imports, + unused_mut +)] + use std::cell::RefCell; use std::collections::HashMap; use std::rc::Rc; diff --git a/src/v1/stage0/src/cli_run/required_floor_runner.rs b/src/v1/stage0/src/cli_run/required_floor_runner.rs index 083c0b64df6..cdb8416dcaf 100644 --- a/src/v1/stage0/src/cli_run/required_floor_runner.rs +++ b/src/v1/stage0/src/cli_run/required_floor_runner.rs @@ -1,5 +1,51 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 97 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 75 + clippy::needless_borrow, // 7 + clippy::needless_return, // 1 + clippy::nonminimal_bool, // 1 + clippy::type_complexity, // 1 + dead_code, // 10 + unused_imports, // 0 -- pre-existing + unused_variables, // 2 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/roadmap_acceptance_history_carrier.rs b/src/v1/stage0/src/cli_run/roadmap_acceptance_history_carrier.rs index 8d45847917a..8c6e66b8a5a 100644 --- a/src/v1/stage0/src/cli_run/roadmap_acceptance_history_carrier.rs +++ b/src/v1/stage0/src/cli_run/roadmap_acceptance_history_carrier.rs @@ -1,3 +1,38 @@ +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_imports, + unused_mut +)] + use std::rc::Rc; use serde::{Deserialize, Serialize}; diff --git a/src/v1/stage0/src/cli_run/shared_fill.rs b/src/v1/stage0/src/cli_run/shared_fill.rs index c74542faa8b..5213ec5174b 100644 --- a/src/v1/stage0/src/cli_run/shared_fill.rs +++ b/src/v1/stage0/src/cli_run/shared_fill.rs @@ -30,6 +30,50 @@ //! table at the end of the fold. Per DESIGN §5 that is the sanctioned second mode — a //! stopped-line audit that reports and does not green. +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::too_many_arguments, // 1 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_imports, + unused_mut +)] + use std::cell::{Cell, RefCell}; use std::collections::{BTreeMap, BTreeSet}; use std::sync::OnceLock; diff --git a/src/v1/stage0/src/cli_run/terminal_ledger_publish.rs b/src/v1/stage0/src/cli_run/terminal_ledger_publish.rs index 51329d166be..db7f52b8c2d 100644 --- a/src/v1/stage0/src/cli_run/terminal_ledger_publish.rs +++ b/src/v1/stage0/src/cli_run/terminal_ledger_publish.rs @@ -20,6 +20,51 @@ //! executor. When v2 drives the floor's execution it holds identity and outcome together, renders //! its own ledger, and this file is deleted whole. +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 1 + clippy::useless_format, // 1 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_imports, + unused_mut +)] + use crate::v1_interpreter::{self, str_value, ExecutionMode, InterpContext, Value}; use std::rc::Rc; diff --git a/src/v1/stage0/src/cli_run/test_migration.rs b/src/v1/stage0/src/cli_run/test_migration.rs index fa04886b80d..f6d5ce37279 100644 --- a/src/v1/stage0/src/cli_run/test_migration.rs +++ b/src/v1/stage0/src/cli_run/test_migration.rs @@ -1,5 +1,39 @@ // Split from cli_run.rs (pure code motion; no semantic change). #![allow(unused_imports)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + dead_code, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/cli_run/test_module_hygiene_bridge.rs b/src/v1/stage0/src/cli_run/test_module_hygiene_bridge.rs index ebabfdefefe..8cc5b99c008 100644 --- a/src/v1/stage0/src/cli_run/test_module_hygiene_bridge.rs +++ b/src/v1/stage0/src/cli_run/test_module_hygiene_bridge.rs @@ -1,3 +1,47 @@ +// CLIPPY ROSTER -- 11 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::unnecessary_to_owned, // 3 + dead_code, // 1 + unused_imports, // 7 +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::disallowed_macros, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use crate::module_path_index::parsed_dag_file::parse_dag_file; use crate::v1_compiler_infer_items::{item_kind, ItemKind}; use crate::v1_interpreter::{self, sorted_fields, str_value, ExecutionMode, InterpContext, Value}; diff --git a/src/v1/stage0/src/cli_run/witness_gates.rs b/src/v1/stage0/src/cli_run/witness_gates.rs index 733bfa6cdd8..7fe99d90acd 100644 --- a/src/v1/stage0/src/cli_run/witness_gates.rs +++ b/src/v1/stage0/src/cli_run/witness_gates.rs @@ -1,5 +1,48 @@ // Split from cli_run.rs (pure code motion; no semantic change). -#![allow(unused_imports)] +// CLIPPY ROSTER -- 11 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 7 + dead_code, // 4 + unused_imports, // 0 -- pre-existing +)] +// cli_run.rs is this module's PARENT, and an `#![allow]` there reaches every module +// under it -- the same cascade this commit removed at the crate root, one level down. +// These are the names its roster carries that this module does not trip, restored to +// warn so `-D warnings` still judges them here. A name moves from this list to the +// allow list above only with a counted site, never silently. +#![warn( + clippy::assertions_on_constants, + clippy::clone_on_copy, + clippy::cloned_ref_to_slice_refs, + clippy::collapsible_str_replace, + clippy::doc_lazy_continuation, + clippy::empty_line_after_doc_comments, + clippy::enum_variant_names, + clippy::iter_kv_map, + clippy::manual_is_multiple_of, + clippy::manual_strip, + clippy::map_identity, + clippy::missing_const_for_thread_local, + clippy::needless_borrow, + clippy::needless_lifetimes, + clippy::only_used_in_recursion, + clippy::ptr_arg, + clippy::redundant_closure, + clippy::single_char_add_str, + clippy::too_many_arguments, + clippy::type_complexity, + clippy::unnecessary_to_owned, + clippy::unneeded_struct_pattern, + clippy::useless_vec, + unused_mut +)] + use super::*; use im::HashMap; use std::cell::{Cell, RefCell}; diff --git a/src/v1/stage0/src/codex_app_server_stdio_session.rs b/src/v1/stage0/src/codex_app_server_stdio_session.rs index d1d54100bfb..7523e3124fc 100644 --- a/src/v1/stage0/src/codex_app_server_stdio_session.rs +++ b/src/v1/stage0/src/codex_app_server_stdio_session.rs @@ -1,5 +1,16 @@ //! Typed Codex app-server --stdio session driver (#8166 RejectAndFinishNow). +// CLIPPY ROSTER -- 13 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 13 +)] + use std::fs::File; use std::io::{BufRead, BufReader, Write}; use std::path::Path; diff --git a/src/v1/stage0/src/coproduct_reflection.rs b/src/v1/stage0/src/coproduct_reflection.rs index 743c0df1478..f4c2d60ac13 100644 --- a/src/v1/stage0/src/coproduct_reflection.rs +++ b/src/v1/stage0/src/coproduct_reflection.rs @@ -1,3 +1,19 @@ +// CLIPPY ROSTER -- 16 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 2 + clippy::missing_const_for_thread_local, // 2 + clippy::question_mark, // 1 + clippy::type_complexity, // 2 + clippy::unnecessary_to_owned, // 8 + unused_imports, // 1 +)] + use crate::v1_rt::VecCompat; use im::HashMap; use std::path::PathBuf; diff --git a/src/v1/stage0/src/data_initializer_identity.rs b/src/v1/stage0/src/data_initializer_identity.rs index 7f06807dea1..4861ed0b980 100644 --- a/src/v1/stage0/src/data_initializer_identity.rs +++ b/src/v1/stage0/src/data_initializer_identity.rs @@ -4,6 +4,19 @@ //! inferred `Node` stamps and owning type-item nodes — never lossy name strings re-looked up //! through first-pick authority helpers (`resolved_initializer_decl_ref`, etc.). +// CLIPPY ROSTER -- 7 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::unnecessary_to_owned, // 3 + unused_imports, // 2 + unused_variables, // 2 +)] + use std::rc::Rc; use im::HashMap; diff --git a/src/v1/stage0/src/declaration_index.rs b/src/v1/stage0/src/declaration_index.rs index 311a70c3af3..3086aa99373 100644 --- a/src/v1/stage0/src/declaration_index.rs +++ b/src/v1/stage0/src/declaration_index.rs @@ -94,6 +94,18 @@ //! main with four hard errors because NO CLOSURE REACHES IT. An orphan module's import claims //! are checked here and nowhere else. +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::empty_line_after_doc_comments, // 1 + clippy::items_after_test_module, // 1 +)] + use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::rc::Rc; diff --git a/src/v1/stage0/src/derived_realization_schedule.rs b/src/v1/stage0/src/derived_realization_schedule.rs index 0b432e2d794..2614f08b3a1 100644 --- a/src/v1/stage0/src/derived_realization_schedule.rs +++ b/src/v1/stage0/src/derived_realization_schedule.rs @@ -1,6 +1,18 @@ //! Derived realization schedule: fixed concurrency from `std.realize_pack` over a //! host budget and a derived space bound — replacing the retired AIMD memory governor. +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 1 + clippy::useless_format, // 1 +)] + use std::rc::Rc; use std::sync::{Arc, Mutex}; diff --git a/src/v1/stage0/src/emitted_closure_compile_host.rs b/src/v1/stage0/src/emitted_closure_compile_host.rs index 697c6e1d652..26e414f64c8 100644 --- a/src/v1/stage0/src/emitted_closure_compile_host.rs +++ b/src/v1/stage0/src/emitted_closure_compile_host.rs @@ -44,6 +44,18 @@ //! the current tree would be the tree-copied oracle DESIGN 5 rejects; an identity-grain debt //! contract over the emitted population is a separate construction with a separate argument. +// CLIPPY ROSTER -- 7 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 6 + unused_imports, // 1 +)] + use std::path::{Path, PathBuf}; use super::{ @@ -630,7 +642,7 @@ fn write_probe_crate_files( /// Run cargo over the probe crate. /// -//// THE ATTRIBUTED LOCATION AND THE DIAGNOSTIC IT SITS UNDER, READ FROM ONE PASS OVER STDERR. +/// THE ATTRIBUTED LOCATION AND THE DIAGNOSTIC IT SITS UNDER, READ FROM ONE PASS OVER STDERR. /// /// WHY BOTH, AND WHY THE SECOND IS NOT A NICETY. A caller holding only the location line knows a /// fault was reported IN a file and nothing about WHAT was reported: a syntax error, an diff --git a/src/v1/stage0/src/lib.rs b/src/v1/stage0/src/lib.rs index ed79b5ca7bc..f3ad199b634 100644 --- a/src/v1/stage0/src/lib.rs +++ b/src/v1/stage0/src/lib.rs @@ -1,6 +1,572 @@ // Generated by v1 compiler -- do not edit. -#![allow( +#![deny(unreachable_patterns)] +#![recursion_limit = "256"] + +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +use im::{OrdSet as BTreeSet, Vector as Vec}; + +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub use v1_stage0_v1_infer::*; + +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod extdeps_cargo; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod extdeps_cargo_version; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod extdeps_languages_rust_derive_contracts; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod extdeps_version; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod extdeps_version_semver; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_cli_dispatch_surface; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_namespace_reference_derived_closure_admission; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_rust_decl_type_overlay; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_stage0_crate_layout_generated; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_stage0_crate_partition_generated; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_stage0_emitted_population_manifest; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_stage0_executable_assembly_generated; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod gunbc_stage0_partition_package_graph; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_constructors; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_integer; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_logic; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_machine_constraints; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_occurrence_binding; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_occurrence_binding_candidates; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_occurrence_binding_resolve; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_primitive_projection; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_reference_binding_observation; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_repair_input_origin; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_serialization; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod std_workspace_artifact; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_annotation_bind; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_closure_stub_v2_std_integer_rust; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_closure_stub_v2_std_text_rust; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_compile; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_complexity; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_dag_collect; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_dag_collect_support; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_effect_derivation; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_emit; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_emit_core_support; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_emit_go; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_emit_python; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_emit_rust; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_expected_red_roster_join; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_frontend_observation; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer_access; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer_cycle; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer_lookup; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer_method; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer_patterns; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_infer_resolve; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_normalize; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] +pub mod v1_compiler_ownership; +#[allow( unused_imports, unused_variables, unused_mut, @@ -10,83 +576,237 @@ suspicious_double_ref_op, clippy::all )] -#![deny(unreachable_patterns)] -#![recursion_limit = "256"] - -use im::{OrdSet as BTreeSet, Vector as Vec}; - -pub use v1_stage0_v1_infer::*; - -pub mod extdeps_cargo; -pub mod extdeps_cargo_version; -pub mod extdeps_languages_rust_derive_contracts; -pub mod extdeps_version; -pub mod extdeps_version_semver; -pub mod gunbc_cli_dispatch_surface; -pub mod gunbc_namespace_reference_derived_closure_admission; -pub mod gunbc_rust_decl_type_overlay; -pub mod gunbc_stage0_crate_layout_generated; -pub mod gunbc_stage0_crate_partition_generated; -pub mod gunbc_stage0_emitted_population_manifest; -pub mod gunbc_stage0_executable_assembly_generated; -pub mod gunbc_stage0_partition_package_graph; -pub mod std_constructors; -pub mod std_integer; -pub mod std_logic; -pub mod std_machine_constraints; -pub mod std_occurrence_binding; -pub mod std_occurrence_binding_candidates; -pub mod std_occurrence_binding_resolve; -pub mod std_primitive_projection; -pub mod std_reference_binding_observation; -pub mod std_repair_input_origin; -pub mod std_serialization; -pub mod std_workspace_artifact; -pub mod v1_compiler_annotation_bind; -pub mod v1_compiler_closure_stub_v2_std_integer_rust; -pub mod v1_compiler_closure_stub_v2_std_text_rust; -pub mod v1_compiler_compile; -pub mod v1_compiler_complexity; -pub mod v1_compiler_dag_collect; -pub mod v1_compiler_dag_collect_support; -pub mod v1_compiler_effect_derivation; -pub mod v1_compiler_emit; -pub mod v1_compiler_emit_core_support; -pub mod v1_compiler_emit_go; -pub mod v1_compiler_emit_python; -pub mod v1_compiler_emit_rust; -pub mod v1_compiler_expected_red_roster_join; -pub mod v1_compiler_frontend_observation; -pub mod v1_compiler_infer; -pub mod v1_compiler_infer_access; -pub mod v1_compiler_infer_cycle; -pub mod v1_compiler_infer_lookup; -pub mod v1_compiler_infer_method; -pub mod v1_compiler_infer_patterns; -pub mod v1_compiler_infer_resolve; -pub mod v1_compiler_normalize; -pub mod v1_compiler_ownership; pub mod v1_compiler_parse; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_resolve; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_runtime_go; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_runtime_rust; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_stage0_crates; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_tokenize; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_trace; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_trait_bound_witness; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_trait_derive_emit; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_compiler_workspace_members; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_gunbc_namespace_reference_derived_closure_production_observations; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_gunbc_occurrence_binding_parser_walk; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_probe_emit_interp; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_test_non_ascii_perf_fixture; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_tests_claim_bare_variant_reference_occurrence_control_test; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_tests_claim_carrier_realization_census; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_tests_claim_checkpoint_identity_keying_witness_test; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_tests_claim_reference_derived_disposition_census_witness_test; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod v1_tests_claim_transport_roster_closure_witness_test; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod wt_a; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod wt_b; +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] pub mod wt_common; #[macro_use] pub mod v1_interpreter_dispatch_generated; @@ -174,4 +894,14 @@ impl NonEmptyBTreeSet { } #[cfg(test)] +#[allow( + unused_imports, + unused_variables, + unused_mut, + unused_parens, + dead_code, + non_shorthand_field_patterns, + suspicious_double_ref_op, + clippy::all +)] mod compiler_tests; diff --git a/src/v1/stage0/src/memory_governor.rs b/src/v1/stage0/src/memory_governor.rs index f33792506ef..066fa4093f6 100644 --- a/src/v1/stage0/src/memory_governor.rs +++ b/src/v1/stage0/src/memory_governor.rs @@ -3,6 +3,18 @@ //! The AIMD admission controller that lived here is deleted — concurrency is now a //! fixed width derived up front by `derived_realization_schedule` from `std.realize_pack` +// CLIPPY ROSTER -- 12 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::single_element_loop, // 1 + dead_code, // 11 +)] + use std::path::{Path, PathBuf}; /// Census anchor for observation witnesses — hold-line mirrors only; scheduling moved to diff --git a/src/v1/stage0/src/namespace_wave_admission.rs b/src/v1/stage0/src/namespace_wave_admission.rs index 2714c62c8d2..ba6cf3dff09 100644 --- a/src/v1/stage0/src/namespace_wave_admission.rs +++ b/src/v1/stage0/src/namespace_wave_admission.rs @@ -58,6 +58,18 @@ //! Adjudicating the consequence as well as the generator would be a second representation of //! one fact (DESIGN §2/§3). +// CLIPPY ROSTER -- 5 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::manual_contains, // 1 + clippy::useless_format, // 4 +)] + use std::collections::{BTreeMap, BTreeSet, VecDeque}; use crate::cli_run::declaration_index::{ diff --git a/src/v1/stage0/src/phase_profile.rs b/src/v1/stage0/src/phase_profile.rs index 466a8834c2b..dd9c728ef3f 100644 --- a/src/v1/stage0/src/phase_profile.rs +++ b/src/v1/stage0/src/phase_profile.rs @@ -21,6 +21,17 @@ //! green with this module deleted and zero `[phase-profile]` stderr with profiling enabled on //! the model path. +// CLIPPY ROSTER -- 3 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + unused_mut, // 3 +)] + use std::io::{self, Write}; use std::sync::atomic::{AtomicBool, AtomicU64, Ordering}; use std::sync::{Arc, Mutex, OnceLock}; diff --git a/src/v1/stage0/src/pre_push.rs b/src/v1/stage0/src/pre_push.rs index bccc548a884..a23b5a24d57 100644 --- a/src/v1/stage0/src/pre_push.rs +++ b/src/v1/stage0/src/pre_push.rs @@ -4,6 +4,20 @@ //! projected from `commit_gate_roster`. This module: stdin parse, git host effects, //! plan evaluation, step dispatch. +// CLIPPY ROSTER -- 9 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 6 + dead_code, // 1 + unused_imports, // 1 + unused_variables, // 1 +)] + use std::collections::BTreeSet; use std::io::{self, BufRead}; use std::path::{Path, PathBuf}; diff --git a/src/v1/stage0/src/required_regen_host.rs b/src/v1/stage0/src/required_regen_host.rs index e82b8a67a0c..038675ba959 100644 --- a/src/v1/stage0/src/required_regen_host.rs +++ b/src/v1/stage0/src/required_regen_host.rs @@ -1,5 +1,23 @@ //! Host realization for `v2.workflow.required_regen` — committed seed vs fresh emit. +// CLIPPY ROSTER -- 16 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::disallowed_macros, // 3 + clippy::enum_variant_names, // 1 + clippy::only_used_in_recursion, // 1 + clippy::redundant_closure, // 2 + clippy::too_many_arguments, // 3 + clippy::type_complexity, // 3 + dead_code, // 2 + unused_variables, // 1 +)] + use serde::Serialize; use std::collections::{BTreeMap, BTreeSet, HashMap}; use std::fs; diff --git a/src/v1/stage0/src/resolved_graph_cache.rs b/src/v1/stage0/src/resolved_graph_cache.rs index deacc07ee47..fe8433b6dd3 100644 --- a/src/v1/stage0/src/resolved_graph_cache.rs +++ b/src/v1/stage0/src/resolved_graph_cache.rs @@ -1,5 +1,18 @@ // SCAFFOLD (§7 seed-retained HAND-RUST — authority: gunbc.resolved_graph_cache_hand_rust_scaffold; // witness: dag/test/claim/resolved_graph_cache_hand_rust_witness_test.dag). +// CLIPPY ROSTER -- 3 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::manual_strip, // 1 + clippy::missing_const_for_thread_local, // 1 + dead_code, // 1 +)] + use im::HashMap; use std::fs::{self, File, OpenOptions}; use std::io::{Read, Write}; diff --git a/src/v1/stage0/src/shared_typecheck_store.rs b/src/v1/stage0/src/shared_typecheck_store.rs index 7c35d3c01bb..5413d34fecd 100644 --- a/src/v1/stage0/src/shared_typecheck_store.rs +++ b/src/v1/stage0/src/shared_typecheck_store.rs @@ -15,6 +15,17 @@ //! *names* and diagnostic trees — not per-worker `InternTable` indices — so worker B decodes //! worker A's snapshot against its own intern table without a cross-representation straddle. +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::new_without_default, // 1 +)] + use std::collections::HashMap as StdHashMap; use std::rc::Rc; use std::sync::atomic::{AtomicUsize, Ordering}; diff --git a/src/v1/stage0/src/usv_pilot_v2_std_node.rs b/src/v1/stage0/src/usv_pilot_v2_std_node.rs index 49005883af4..1fff72ae636 100644 --- a/src/v1/stage0/src/usv_pilot_v2_std_node.rs +++ b/src/v1/stage0/src/usv_pilot_v2_std_node.rs @@ -1,5 +1,16 @@ // Seed-retained dep surface for v2.compiler.use_site_verdict pilot (Wave 2 Band A). // Dissolve-on: v2.std.node self-emits; seed-linked extern imports replace this scaffold. +// CLIPPY ROSTER -- 1 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + unused_imports, // 1 +)] + use im::{vector as vec, Vector as Vec}; use std::rc::Rc; diff --git a/src/v1/stage0/src/v1_compiler_emit_rust.rs b/src/v1/stage0/src/v1_compiler_emit_rust.rs index 9d1de48aa8f..60ee968559a 100644 --- a/src/v1/stage0/src/v1_compiler_emit_rust.rs +++ b/src/v1/stage0/src/v1_compiler_emit_rust.rs @@ -6844,6 +6844,33 @@ pub fn hand_maintained_map_key_required_type_names() -> Rc> { CACHED.with(|c: &Rc>| c.clone()) } +pub fn generated_rust_lint_relaxations() -> Rc> { + thread_local! { + static CACHED: Rc> = { + Rc::new(vec!["unused_imports".to_string(), "unused_variables".to_string(), "unused_mut".to_string(), "unused_parens".to_string(), "dead_code".to_string(), "non_shorthand_field_patterns".to_string(), "suspicious_double_ref_op".to_string(), "clippy::all".to_string()]) + }; + } + CACHED.with(|c: &Rc>| c.clone()) +} + +pub fn generated_rust_lint_arguments() -> String { + generated_rust_lint_relaxations().join(&", ".to_string()) +} + +pub fn generated_rust_crate_allow_block() -> String { + v1_rt::concat( + v1_rt::concat("#![allow(".to_string(), generated_rust_lint_arguments()), + ")]".to_string(), + ) +} + +pub fn generated_rust_item_allow_attr() -> String { + v1_rt::concat( + v1_rt::concat("#[allow(".to_string(), generated_rust_lint_arguments()), + ")]\n".to_string(), + ) +} + pub fn emit_lib_rs_mod_decl(mod_name: String) -> String { { let declaration = v1_rt::concat( @@ -6920,7 +6947,7 @@ pub fn stage0_package_name_to_crate_ident(package_name: String) -> String { v1_rt::replace(package_name.clone(), "-".to_string(), "_".to_string()) } -pub fn stage0_host_shell_partition_reexport_block() -> String { +pub fn stage0_host_shell_partition_reexport_block(item_attr: String) -> String { Rc::new({ let mut __result = Vec::new(); for pkg in generated_host_shell_partition_dependencies() @@ -6929,7 +6956,7 @@ pub fn stage0_host_shell_partition_reexport_block() -> String { { __result.push(v1_rt::concat( v1_rt::concat( - "pub use ".to_string(), + v1_rt::concat(item_attr.clone(), "pub use ".to_string()), stage0_package_name_to_crate_ident(pkg.clone()), ), "::*;".to_string(), @@ -6970,33 +6997,53 @@ pub fn emit_lib_rs_from_paths( } else { order_partial_lib_rs_mod_names(shell_names.clone()) }; - let mod_decls = Rc::new( - mod_names - .iter() - .cloned() - .map(emit_lib_rs_mod_decl) - .collect::>(), - ); + let root_is_mixed_authorship = has_compiler_tests.clone(); + let generated_item_attr = if root_is_mixed_authorship.clone() { + generated_rust_item_allow_attr() + } else { + "".to_string() + }; + let root_allow_block = if root_is_mixed_authorship.clone() { + "".to_string() + } else { + v1_rt::concat(generated_rust_crate_allow_block(), "\n".to_string()) + }; + let mod_decls = Rc::new({ + let mut __result = Vec::new(); + for n in mod_names.iter().cloned() { + __result.push(v1_rt::concat( + generated_item_attr.clone(), + emit_lib_rs_mod_decl(n.clone()), + )); + } + __result + }); let hand_maintained_mods = if has_compiler_tests.clone() { generated_pub_mod_block() } else { "".to_string() }; let test_mod = if has_compiler_tests.clone() { - "\n\n#[cfg(test)]\nmod compiler_tests;".to_string() + v1_rt::concat( + v1_rt::concat( + "\n\n#[cfg(test)]\n".to_string(), + generated_item_attr.clone(), + ), + "mod compiler_tests;".to_string(), + ) } else { "".to_string() }; let partition_reexports = if has_compiler_tests.clone() { v1_rt::concat( - stage0_host_shell_partition_reexport_block(), + stage0_host_shell_partition_reexport_block(generated_item_attr.clone()), "\n\n".to_string(), ) } else { "".to_string() }; let shared_types = emit_non_empty_wrappers(); - let content = v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("// Generated by v1 compiler -- do not edit.\n\n".to_string(), "#![allow(unused_imports, unused_variables, unused_mut, unused_parens, dead_code, non_shorthand_field_patterns, suspicious_double_ref_op, clippy::all)]\n#![deny(unreachable_patterns)]\n".to_string()), "#![recursion_limit = \"256\"]\n\n".to_string()), "use im::{OrdSet as BTreeSet, Vector as Vec};\n\n".to_string()), partition_reexports.clone()), mod_decls.clone().join(&"\n".to_string())), hand_maintained_mods.clone()), "\n\n".to_string()), shared_types.clone()), test_mod.clone()); + let content = v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat(v1_rt::concat("// Generated by v1 compiler -- do not edit.\n\n".to_string(), root_allow_block.clone()), "#![deny(unreachable_patterns)]\n".to_string()), "#![recursion_limit = \"256\"]\n\n".to_string()), generated_item_attr.clone()), "use im::{OrdSet as BTreeSet, Vector as Vec};\n\n".to_string()), partition_reexports.clone()), mod_decls.clone().join(&"\n".to_string())), hand_maintained_mods.clone()), "\n\n".to_string()), shared_types.clone()), test_mod.clone()); Rc::new(TextFile { path: v1_rt::concat( v1_rt::concat(rust_source_root(), "lib".to_string()), diff --git a/src/v1/stage0/src/v1_compiler_stage0_crates.rs b/src/v1/stage0/src/v1_compiler_stage0_crates.rs index 0a28c2b3913..8dd3c890145 100644 --- a/src/v1/stage0/src/v1_compiler_stage0_crates.rs +++ b/src/v1/stage0/src/v1_compiler_stage0_crates.rs @@ -30,7 +30,9 @@ pub use crate::gunbc_stage0_partition_package_graph::{ pub use crate::std_dissolution::unbound_dissolution; pub use crate::std_dissolution::DissolutionCondition; use crate::std_dissolution::DissolutionCondition::*; -pub use crate::v1_compiler_emit_rust::{emit_cargo_dep, emit_non_empty_wrappers}; +pub use crate::v1_compiler_emit_rust::{ + emit_cargo_dep, emit_non_empty_wrappers, generated_rust_lint_relaxations, +}; use crate::v1_rt; use crate::v1_rt::{VecCompat, VecJoin}; pub use crate::v1_std_core::TextFile; @@ -68,21 +70,24 @@ pub struct Stage0CratePlan { } pub fn stage0_crate_allow_block() -> String { - Rc::new(vec![ - "#![allow(".to_string(), - " unused_imports,".to_string(), - " unused_variables,".to_string(), - " unused_mut,".to_string(), - " unused_parens,".to_string(), - " dead_code,".to_string(), - " non_shorthand_field_patterns,".to_string(), - " suspicious_double_ref_op,".to_string(), - " clippy::all".to_string(), - ")]".to_string(), - "#![deny(unreachable_patterns)]".to_string(), - "#![recursion_limit = \"256\"]".to_string(), - ]) - .join(&"\n".to_string()) + { + let lints = Rc::new({ + let mut __result = Vec::new(); + for lint in generated_rust_lint_relaxations().iter().cloned() { + __result.push(v1_rt::concat(" ".to_string(), lint.clone())); + } + __result + }) + .join(&",\n".to_string()); + Rc::new(vec![ + "#![allow(".to_string(), + lints.clone(), + ")]".to_string(), + "#![deny(unreachable_patterns)]".to_string(), + "#![recursion_limit = \"256\"]".to_string(), + ]) + .join(&"\n".to_string()) + } } pub fn stage0_foundation_header_doc() -> String { diff --git a/src/v1/stage0/src/v1_interpreter.rs b/src/v1/stage0/src/v1_interpreter.rs index b4295af96ee..27af0c81c65 100644 --- a/src/v1/stage0/src/v1_interpreter.rs +++ b/src/v1/stage0/src/v1_interpreter.rs @@ -1,3 +1,39 @@ +// CLIPPY ROSTER -- 121 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::clone_on_copy, // 1 + clippy::cloned_ref_to_slice_refs, // 8 + clippy::collapsible_if, // 1 + clippy::collapsible_match, // 1 + clippy::disallowed_macros, // 15 + clippy::doc_lazy_continuation, // 2 + clippy::double_parens, // 21 + clippy::explicit_auto_deref, // 2 + clippy::manual_clamp, // 1 + clippy::manual_div_ceil, // 1 + clippy::manual_is_multiple_of, // 1 + clippy::manual_repeat_n, // 1 + clippy::missing_const_for_thread_local, // 1 + clippy::needless_borrow, // 9 + clippy::needless_borrows_for_generic_args, // 2 + clippy::only_used_in_recursion, // 1 + clippy::single_match, // 1 + clippy::too_many_arguments, // 1 + clippy::type_complexity, // 10 + clippy::unnecessary_lazy_evaluations, // 1 + clippy::unnecessary_to_owned, // 20 + clippy::useless_format, // 6 + dead_code, // 4 + unused_imports, // 2 + unused_mut, // 2 + unused_parens, // 6 +)] + use crate::v1_rt::VecCompat; use im::HashMap; use std::cell::{Cell, RefCell}; @@ -543,7 +579,7 @@ pub struct CanonKey { impl CanonKey { fn new(key: Value) -> Option { - if key == key { + if key.is_reflexive() { Some(CanonKey { key }) } else { None @@ -918,6 +954,24 @@ impl fmt::Display for Value { } } +impl Value { + /// A value may key a map only if it equals ITSELF, and `Value` has inhabitants that do not: + /// `Float(f64::NAN)` compares false to itself under IEEE semantics, and the variants this + /// `PartialEq` does not match (a `Closure`, say) fall to its `false` arm. Admitting either + /// would make `impl Eq for CanonKey` a lie and its `Hash` unreachable for its own key. + /// + /// The test is `self == self`, spelled ONCE and named, because that is the only expression + /// that stays correct as `PartialEq` above grows arms: a hand-written structural check would + /// be a second authority for reflexivity and would silently disagree the day a variant is + /// added. `clippy::eq_op` is deny-by-default and cannot see that a non-reflexive inhabitant + /// exists, so the lint is refused here, at the one site whose whole content is that test -- + /// not at a crate root on behalf of everything under it. + #[allow(clippy::eq_op)] + fn is_reflexive(&self) -> bool { + self == self + } +} + impl PartialEq for Value { fn eq(&self, other: &Self) -> bool { match (self, other) { diff --git a/src/v1/stage0/src/v2_compiler_body_producer.rs b/src/v1/stage0/src/v2_compiler_body_producer.rs index c960b3a45a5..c6112d7a5d3 100644 --- a/src/v1/stage0/src/v2_compiler_body_producer.rs +++ b/src/v1/stage0/src/v2_compiler_body_producer.rs @@ -3,6 +3,17 @@ // Dissolve-on: self-emit cutover retires this module when v2.compiler.body_producer // is emitted-only and the behavioral harness is modeled (sbp_scaffold_dissolution_trigger). +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + unused_imports, // 2 +)] + use crate::usv_pilot_v2_std_algebra::list_snoc_item; use crate::usv_pilot_v2_std_node::{ node_rebuild, node_synthetic, Behavior, Connective, Edge, EdgeLabel, Node, NodeKind, Symbol, diff --git a/src/v1/stage0/src/v2_compiler_normalize.rs b/src/v1/stage0/src/v2_compiler_normalize.rs index 2dd9eb0b95b..9b7fbee4e8f 100644 --- a/src/v1/stage0/src/v2_compiler_normalize.rs +++ b/src/v1/stage0/src/v2_compiler_normalize.rs @@ -3,6 +3,17 @@ // Dissolve-on: self-emit cutover retires this module when v2.compiler.normalize // is emitted-only and the behavioral harness is modeled (sn_scaffold_dissolution_trigger). +// CLIPPY ROSTER -- 3 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + unused_imports, // 3 +)] + use im::{vector as vec, Vector as Vec}; use std::rc::Rc; diff --git a/src/v1/stage0/src/v2_compiler_target_carriers.rs b/src/v1/stage0/src/v2_compiler_target_carriers.rs index d81af227d55..68252d1cf5a 100644 --- a/src/v1/stage0/src/v2_compiler_target_carriers.rs +++ b/src/v1/stage0/src/v2_compiler_target_carriers.rs @@ -3,6 +3,18 @@ // Dissolve-on: self-emit cutover retires this module when v2.compiler.target_carriers // is emitted-only and the behavioral harness is modeled (stc_scaffold_dissolution_trigger). +// CLIPPY ROSTER -- 2 finding(s) this module trips today, listed one lint per line with +// its count. Until this commit the generated crate root allowed `clippy::all` plus six +// rustc groups on behalf of every module under it, so `cargo clippy --all-targets -- -D +// warnings` decided nothing here; the root now excuses only the generated modules it +// speaks for (v1.compiler.emit_rust generated_rust_lint_relaxations), and this is what +// that leaves visible. The list is MONOTONE NON-INCREASING: a name leaves when its last +// site is repaired, and a lint not named below reds the build, which is the whole point. +#![allow( + clippy::match_like_matches_macro, // 1 + unused_imports, // 1 +)] + use crate::usv_pilot_v2_std_node::{ named_edge_target_lookup, node_synthetic, Connective, Edge, EdgeLabel, NamedEdgeTargetLookup, Node, NodeKind, diff --git a/src/v1/stage0_crates.dag b/src/v1/stage0_crates.dag index d5f7b0ca2dd..820398a0eb1 100644 --- a/src/v1/stage0_crates.dag +++ b/src/v1/stage0_crates.dag @@ -3,7 +3,7 @@ module v1.compiler.stage0_crates import std.dissolution { DissolutionCondition, unbound_dissolution } import v1.std.core { TextFile } -import v1.compiler.emit_rust { emit_non_empty_wrappers, emit_cargo_dep } +import v1.compiler.emit_rust { emit_non_empty_wrappers, emit_cargo_dep, generated_rust_lint_relaxations } import extdeps.cargo { CargoDependency, CargoFeature, RegistryDep, LocalPathDep } import extdeps.cargo_version { render_cargo_package_header_prefix } import gunbc.stage0_partition_package_graph { @@ -44,17 +44,21 @@ type Stage0CratePlan { // (HandExplicit ~8-crate interim partition). Dissolve-on: rust_crate_partition_interim_explicit // when PolicyPartition lands. +// THE LINT NAMES ARE NOT SPELLED HERE. They were, and the identical list stood in +// v1.compiler.emit_rust as well -- one concept with two names, which is the fork §3 forbids: +// a lint added to one root and missed by the other is invisible, because the disagreement is +// between two suppressions and neither says anything. This module contributes only the +// RENDERING -- one lint per line, the deny and the recursion limit beside it -- over the list +// the emitter owns. A crate-level block is honest for these crates and only these: every +// partition crate is generated in full, including the modules it includes by `#[path]`, so +// there is no hand-authored line under this root for it to silence. fn stage0_crate_allow_block() -> String { + let lints = generated_rust_lint_relaxations + |> map(lint => concat(" ", lint)) + |> join(separator: ",\n") [ "#![allow(", - " unused_imports,", - " unused_variables,", - " unused_mut,", - " unused_parens,", - " dead_code,", - " non_shorthand_field_patterns,", - " suspicious_double_ref_op,", - " clippy::all", + lints, ")]", "#![deny(unreachable_patterns)]", "#![recursion_limit = \"256\"]"