Struct rustc_passes::check_const::CheckConstTraitVisitor
source · [−]struct CheckConstTraitVisitor<'tcx> {
tcx: TyCtxt<'tcx>,
}Fields
tcx: TyCtxt<'tcx>Implementations
sourceimpl<'tcx> CheckConstTraitVisitor<'tcx>
impl<'tcx> CheckConstTraitVisitor<'tcx>
Trait Implementations
sourceimpl<'tcx> ItemLikeVisitor<'tcx> for CheckConstTraitVisitor<'tcx>
impl<'tcx> ItemLikeVisitor<'tcx> for CheckConstTraitVisitor<'tcx>
sourcefn visit_item<'hir>(&mut self, item: &'hir Item<'hir>)
fn visit_item<'hir>(&mut self, item: &'hir Item<'hir>)
check for const trait impls, and errors if the impl uses provided/default functions of the trait being implemented; as those provided functions can be non-const.
fn visit_trait_item<'hir>(&mut self, _: &'hir TraitItem<'hir>)
fn visit_impl_item<'hir>(&mut self, _: &'hir ImplItem<'hir>)
fn visit_foreign_item<'hir>(&mut self, _: &'hir ForeignItem<'hir>)
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for CheckConstTraitVisitor<'tcx>
impl<'tcx> !Send for CheckConstTraitVisitor<'tcx>
impl<'tcx> !Sync for CheckConstTraitVisitor<'tcx>
impl<'tcx> Unpin for CheckConstTraitVisitor<'tcx>
impl<'tcx> !UnwindSafe for CheckConstTraitVisitor<'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes