diff --git a/Cargo.toml b/Cargo.toml index 5a6d62805d..cbad28e8e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,6 @@ default = [] clone = [] dot-out = [] glsl-in = ["pp-rs"] -glsl-validate = [] glsl-out = [] msl-out = [] serialize = ["serde", "indexmap/serde-1"] diff --git a/cli/Cargo.toml b/cli/Cargo.toml index ac5238bd51..daf169f428 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -14,7 +14,7 @@ name = "naga" path = "src/main.rs" [dependencies] -naga = { version = "0.9", path = "../", features = ["validate", "span", "wgsl-in", "wgsl-out", "glsl-in", "glsl-out", "spv-in", "spv-out", "msl-out", "hlsl-out", "dot-out", "glsl-validate", "serialize", "deserialize"] } +naga = { version = "0.9", path = "../", features = ["validate", "span", "wgsl-in", "wgsl-out", "glsl-in", "glsl-out", "spv-in", "spv-out", "msl-out", "hlsl-out", "dot-out", "serialize", "deserialize"] } bincode = "1" log = "0.4" codespan-reporting = "0.11" diff --git a/src/front/glsl/error.rs b/src/front/glsl/error.rs index c9ea102fab..299bf57aa4 100644 --- a/src/front/glsl/error.rs +++ b/src/front/glsl/error.rs @@ -101,7 +101,6 @@ pub enum ErrorKind { #[error("unsupported matrix of the form matCx2 in std140 block layout")] UnsupportedMatrixTypeInStd140, /// A variable with the same name already exists in the current scope. - #[cfg(feature = "glsl-validate")] #[error("Variable already declared: {0}")] VariableAlreadyDeclared(String), /// A semantic error was detected in the shader. diff --git a/src/front/glsl/variables.rs b/src/front/glsl/variables.rs index d6f9d7e0ff..1634fb40cb 100644 --- a/src/front/glsl/variables.rs +++ b/src/front/glsl/variables.rs @@ -637,10 +637,8 @@ impl Parser { let expr = ctx.add_expression(Expression::LocalVariable(handle), decl.meta, body); if let Some(name) = decl.name { - #[allow(unused_variables)] let maybe_var = ctx.add_local_var(name.clone(), expr, mutable); - #[cfg(feature = "glsl-validate")] if maybe_var.is_some() { self.errors.push(Error { kind: ErrorKind::VariableAlreadyDeclared(name),