pub struct GnucVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
The GCC release the compiler claims to be, as __GNUC__, __GNUC_MINOR__ and
__GNUC_PATCHLEVEL__.
Design: spec/04-driver-and-cli.md section 4.5, which makes this a knob rather than a
constant and says to start conservative and raise it as the matrix in rucc-gnu fills in.
The default is the version Clang claimed for over a decade, which is the one value every
real header set is known to cope with from a compiler that is not GCC. It is deliberately
low. glibc gates most of what it hands a caller on __GNUC_PREREQ, so the claim decides
which half of sys/cdefs.h we get, and claiming a version whose promises we have not kept
means being handed syntax we cannot parse.
Fields§
§major: u32__GNUC__.
minor: u32__GNUC_MINOR__.
patch: u32__GNUC_PATCHLEVEL__.
Trait Implementations§
Source§impl Clone for GnucVersion
impl Clone for GnucVersion
Source§fn clone(&self) -> GnucVersion
fn clone(&self) -> GnucVersion
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 GnucVersion
Source§impl Debug for GnucVersion
impl Debug for GnucVersion
Source§impl Default for GnucVersion
impl Default for GnucVersion
Source§fn default() -> GnucVersion
fn default() -> GnucVersion
Returns the “default value” for a type. Read more
impl Eq for GnucVersion
Source§impl FromStr for GnucVersion
impl FromStr for GnucVersion
Source§impl Hash for GnucVersion
impl Hash for GnucVersion
Source§impl Ord for GnucVersion
impl Ord for GnucVersion
Source§fn cmp(&self, other: &GnucVersion) -> Ordering
fn cmp(&self, other: &GnucVersion) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for GnucVersion
impl PartialEq for GnucVersion
Source§impl PartialOrd for GnucVersion
impl PartialOrd for GnucVersion
impl StructuralPartialEq for GnucVersion
Auto Trait Implementations§
impl Freeze for GnucVersion
impl RefUnwindSafe for GnucVersion
impl Send for GnucVersion
impl Sync for GnucVersion
impl Unpin for GnucVersion
impl UnsafeUnpin for GnucVersion
impl UnwindSafe for GnucVersion
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