Struct paralegal_spdg::rustc::mir::Constant
source · pub struct Constant<'tcx> {
pub span: Span,
pub user_ty: Option<UserTypeAnnotationIndex>,
pub literal: ConstantKind<'tcx>,
}
Expand description
Constants
Two constants are equal if they are the same constant. Note that
this does not necessarily mean that they are ==
in Rust. In
particular, one must be wary of NaN
!
Fields§
§span: Span
§user_ty: Option<UserTypeAnnotationIndex>
Optional user-given type: for something like
collect::<Vec<_>>
, this would be present and would
indicate that Vec<_>
was explicitly specified.
Needed for NLL to impose user-given type constraints.
literal: ConstantKind<'tcx>
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for Constant<'tcx>
impl<'tcx> !Send for Constant<'tcx>
impl<'tcx> !Sync for Constant<'tcx>
impl<'tcx> Unpin for Constant<'tcx>
impl<'tcx> !UnwindSafe for Constant<'tcx>
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