pub struct NotConstant {
pub at: ExprId,
pub poisoned: bool,
}Expand description
Why an expression is not a constant.
Fields§
§at: ExprIdThe node the folding stopped at, which is what a diagnostic should point at. It is the
subexpression and not the whole thing, so that case 1 + f(): underlines the call.
poisoned: boolWhether that node had already been diagnosed before the folding reached it.
The poisoning rule of spec/06-lexer-and-parser.md section 6.8: a caller says nothing
about one of these, because something has already been said about the same source. It is
not the same as the folding having warned, which it does about a division by zero and
which gcc still follows with the caller’s message.
Trait Implementations§
Source§impl Clone for NotConstant
impl Clone for NotConstant
Source§fn clone(&self) -> NotConstant
fn clone(&self) -> NotConstant
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 NotConstant
Source§impl Debug for NotConstant
impl Debug for NotConstant
impl Eq for NotConstant
Source§impl PartialEq for NotConstant
impl PartialEq for NotConstant
impl StructuralPartialEq for NotConstant
Auto Trait Implementations§
impl Freeze for NotConstant
impl RefUnwindSafe for NotConstant
impl Send for NotConstant
impl Sync for NotConstant
impl Unpin for NotConstant
impl UnsafeUnpin for NotConstant
impl UnwindSafe for NotConstant
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