pub struct Attrs {
pub set: AttrSet,
pub fp_contract: FpContract,
}Expand description
Everything true of a whole function.
Two parts, because most of these are either so or not so and one of them has three answers.
A default set is a function nobody has promised anything about, which is what a function
fresh from crate::Func::new is.
Fields§
§set: AttrSetThe ones that are either set or not.
fp_contract: FpContractHow far the code generator may fuse a multiply and an addition.
Implementations§
Source§impl Attrs
impl Attrs
Sourcepub const fn is_default(self) -> bool
pub const fn is_default(self) -> bool
Whether nothing has been promised, which is when the printer writes nothing at all.
Sourcepub fn conflict(self) -> Option<(&'static str, &'static str)>
pub fn conflict(self) -> Option<(&'static str, &'static str)>
Two attributes that are set and contradict each other, if there are any.
The verifier asks, because a function that is both always_inline and noinline is one
where two parts of the frontend disagreed, and the answer the optimizer picks would be
whichever branch it happens to test first.
Trait Implementations§
impl Copy for Attrs
impl Eq for Attrs
impl StructuralPartialEq for Attrs
Auto Trait Implementations§
impl Freeze for Attrs
impl RefUnwindSafe for Attrs
impl Send for Attrs
impl Sync for Attrs
impl Unpin for Attrs
impl UnsafeUnpin for Attrs
impl UnwindSafe for Attrs
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