docs(naga): use hyphenated "enable-extension" noun like spec.

This commit is contained in:
Erich Gubler 2024-10-22 17:01:23 -04:00
parent 64884d1eba
commit fc0a488246
2 changed files with 9 additions and 9 deletions

View File

@ -946,13 +946,13 @@ impl<'a> Error<'a> {
},
Error::EnableExtensionNotYetImplemented { kind, span } => ParseError {
message: format!(
"the `{}` enable extension is not yet supported",
"the `{}` enable-extension is not yet supported",
EnableExtension::Unimplemented(kind).to_ident()
),
labels: vec![(
span,
concat!(
"this extension specifies standard functionality ",
"this enable-extension specifies standard functionality ",
"which is not yet implemented in Naga"
)
.into(),
@ -967,12 +967,12 @@ impl<'a> Error<'a> {
)],
},
Error::EnableExtensionNotEnabled { kind, span } => ParseError {
message: format!("`{}` enable extension is not enabled", kind.to_ident()),
message: format!("`{}` enable-extension is not enabled", kind.to_ident()),
labels: vec![(
span,
format!(
concat!(
"the `{}` enable extension is needed for this functionality, ",
"the `{}` enable-extension is needed for this functionality, ",
"but it is not currently enabled"
),
kind.to_ident()
@ -982,7 +982,7 @@ impl<'a> Error<'a> {
notes: if let EnableExtension::Unimplemented(kind) = kind {
vec![format!(
concat!(
"This extension is not yet implemented. ",
"This enable-extension is not yet implemented. ",
"Let Naga maintainers know that you ran into this at ",
"<https://github.com/gfx-rs/wgpu/issues/{}>, ",
"so they can prioritize it!"

View File

@ -3,7 +3,7 @@
//! The focal point of this module is the [`EnableExtension`] API.
use crate::{front::wgsl::error::Error, Span};
/// Tracks the status of every enable extension known to Naga.
/// Tracks the status of every enable-extension known to Naga.
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct EnableExtensions {}
@ -12,14 +12,14 @@ impl EnableExtensions {
Self {}
}
/// Add an enable extension to the set requested by a module.
/// Add an enable-extension to the set requested by a module.
#[allow(unreachable_code)]
pub(crate) fn add(&mut self, ext: ImplementedEnableExtension) {
let _field: &mut bool = match ext {};
*_field = true;
}
/// Query whether an enable extension tracked here has been requested.
/// Query whether an enable-extension tracked here has been requested.
#[allow(unused)]
pub(crate) const fn contains(&self, ext: ImplementedEnableExtension) -> bool {
match ext {}
@ -32,7 +32,7 @@ impl Default for EnableExtensions {
}
}
/// A shader language extension not guaranteed to be present in all environments.
/// An enable-extension not guaranteed to be present in all environments.
///
/// WGSL spec.: <https://www.w3.org/TR/WGSL/#enable-extensions-sec>
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq)]