pub enum LanguageStandard {
C(CStandard),
Cxx(CxxStandard),
}Expand description
One per-compile standard value, carried by the build IR. Encodes the source language, so the dialect lowering derives both the rule kind and the standard flag from this single field.
Variants§
C(CStandard)
Cxx(CxxStandard)
Implementations§
Source§impl LanguageStandard
impl LanguageStandard
pub const fn language(self) -> SourceLanguage
pub const fn as_str(self) -> &'static str
Sourcepub const fn msvc_spelling(self) -> Option<&'static str>
pub const fn msvc_spelling(self) -> Option<&'static str>
The /std: value cl.exe accepts for this standard, when a
stable one exists. None marks the MSVC-dialect gaps
(C89/C99/C23, C++98/11/23/26); the planner rejects those
before lowering on the MSVC dialect.
Trait Implementations§
Source§impl Clone for LanguageStandard
impl Clone for LanguageStandard
Source§fn clone(&self) -> LanguageStandard
fn clone(&self) -> LanguageStandard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LanguageStandard
Source§impl Debug for LanguageStandard
impl Debug for LanguageStandard
Source§impl Display for LanguageStandard
impl Display for LanguageStandard
impl Eq for LanguageStandard
Source§impl Hash for LanguageStandard
impl Hash for LanguageStandard
Source§impl PartialEq for LanguageStandard
impl PartialEq for LanguageStandard
Source§fn eq(&self, other: &LanguageStandard) -> bool
fn eq(&self, other: &LanguageStandard) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LanguageStandard
Auto Trait Implementations§
impl Freeze for LanguageStandard
impl RefUnwindSafe for LanguageStandard
impl Send for LanguageStandard
impl Sync for LanguageStandard
impl Unpin for LanguageStandard
impl UnsafeUnpin for LanguageStandard
impl UnwindSafe for LanguageStandard
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.