[naga] Remove the compact feature

This commit is contained in:
Andy Leiserson 2025-05-19 14:21:33 -07:00 committed by Erich Gubler
parent 611a2bbede
commit 096f1f1f6d
7 changed files with 2 additions and 11 deletions

View File

@ -304,7 +304,7 @@ jobs:
# Check with all compatible features
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-types --no-default-features --features strict_asserts,fragile-send-sync-non-atomic-wasm,serde,counters
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features --features dot-out,compact
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p naga --no-default-features --features dot-out
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu-hal --no-default-features --features fragile-send-sync-non-atomic-wasm
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} -p wgpu --no-default-features --features serde

View File

@ -25,7 +25,6 @@ test = false
[dependencies]
naga = { workspace = true, features = [
"compact",
"wgsl-in",
"wgsl-out",
"glsl-in",

View File

@ -59,7 +59,7 @@ arbitrary = [
]
spv-in = ["dep:petgraph", "petgraph/graphmap", "dep:spirv"]
spv-out = ["dep:spirv"]
wgsl-in = ["dep:hexf-parse", "dep:unicode-ident", "compact"]
wgsl-in = ["dep:hexf-parse", "dep:unicode-ident"]
wgsl-out = []
## Enables outputting to HLSL (Microsoft's High-Level Shader Language).
@ -73,8 +73,6 @@ hlsl-out = []
## If you want to enable HLSL output it regardless of the target platform, use `naga/hlsl-out`.
hlsl-out-if-target-windows = []
compact = []
## Enables colored output through codespan-reporting and termcolor.
termcolor = ["codespan-reporting/termcolor"]

View File

@ -234,7 +234,6 @@ impl<T> Arena<T> {
Ok(())
}
#[cfg(feature = "compact")]
pub(crate) fn retain_mut<P>(&mut self, mut predicate: P)
where
P: FnMut(Handle<T>, &mut T) -> bool,

View File

@ -72,7 +72,6 @@ impl<T> UniqueArena<T> {
.unwrap_or(&Span::default())
}
#[cfg(feature = "compact")]
pub(crate) fn drain_all(&mut self) -> UniqueArenaDrain<T> {
UniqueArenaDrain {
inner_elts: self.set.drain(..),
@ -82,14 +81,12 @@ impl<T> UniqueArena<T> {
}
}
#[cfg(feature = "compact")]
pub struct UniqueArenaDrain<'a, T> {
inner_elts: indexmap::set::Drain<'a, T>,
inner_spans: alloc::vec::Drain<'a, Span>,
index: Index,
}
#[cfg(feature = "compact")]
impl<T> Iterator for UniqueArenaDrain<'_, T> {
type Item = (Handle<T>, T, Span);

View File

@ -109,7 +109,6 @@ mod arena;
mod as_diagnostic_file_path;
pub mod back;
pub mod common;
#[cfg(feature = "compact")]
pub mod compact;
pub mod diagnostic_filter;
pub mod error;

View File

@ -422,7 +422,6 @@ fn check_targets(input: &Input, module: &mut naga::Module, source_code: Option<&
);
});
#[cfg(feature = "compact")]
let info = {
naga::compact::compact(module);