pub(super) struct ExternSpecCollector<'a, 'sess, 'tcx> {
inner: &'a mut SpecCollector<'sess, 'tcx>,
block: &'tcx Block<'tcx>,
}
Fields§
§inner: &'a mut SpecCollector<'sess, 'tcx>
§block: &'tcx Block<'tcx>
The block corresponding to the const _: () = { ... }
annotated with flux::extern_spec
Implementations§
Source§impl<'a, 'sess, 'tcx> ExternSpecCollector<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> ExternSpecCollector<'a, 'sess, 'tcx>
pub(super) fn collect( inner: &'a mut SpecCollector<'sess, 'tcx>, body_id: BodyId, ) -> Result<(), ErrorGuaranteed>
fn new( inner: &'a mut SpecCollector<'sess, 'tcx>, body_id: BodyId, ) -> Result<Self, ErrorGuaranteed>
fn run(self) -> Result<(), ErrorGuaranteed>
fn collect_extern_fn( &mut self, item: &Item<'_>, attrs: FluxAttrs, ) -> Result<(), ErrorGuaranteed>
fn collect_extern_struct( &mut self, struct_id: OwnerId, variant: &VariantData<'_>, attrs: FluxAttrs, ) -> Result<(), ErrorGuaranteed>
fn collect_extern_enum( &mut self, enum_id: OwnerId, enum_def: &EnumDef<'_>, attrs: FluxAttrs, ) -> Result<(), ErrorGuaranteed>
fn collect_extern_impl( &mut self, impl_id: OwnerId, impl_: &Impl<'_>, attrs: FluxAttrs, ) -> Result<(), ErrorGuaranteed>
fn collect_extern_impl_fn( &mut self, impl_of_trait: Option<DefId>, item: &ImplItemRef, attrs: FluxAttrs, ) -> Result<ExternImplItem, ErrorGuaranteed>
fn collect_extern_trait( &mut self, trait_id: OwnerId, bounds: &GenericBounds<'_>, items: &[TraitItemRef], attrs: FluxAttrs, ) -> Result<(), ErrorGuaranteed>
fn collect_extern_trait_fn( &mut self, extern_trait_id: DefId, item: &TraitItemRef, attrs: FluxAttrs, ) -> Result<(), ErrorGuaranteed>
fn extract_extern_id_from_struct( &self, item: &Item<'_>, ) -> Result<DefId, ErrorGuaranteed>
fn extract_extern_id_from_fn( &self, item: &Item<'_>, ) -> Result<DefId, ErrorGuaranteed>
fn extract_extern_id_from_impl_fn( &self, impl_of_trait: Option<DefId>, item: &ImplItemRef, ) -> Result<ExternImplItem, ErrorGuaranteed>
fn extract_extern_id_from_trait( &self, bounds: &GenericBounds<'_>, ) -> Result<DefId, ErrorGuaranteed>
fn extract_extern_id_from_trait_fn( &self, trait_id: DefId, item: &TraitItemRef, ) -> Result<DefId, ErrorGuaranteed>
fn extract_extern_id_from_impl( &self, impl_id: OwnerId, impl_: &Impl<'_>, ) -> Result<DefId, ErrorGuaranteed>
fn extract_callee_from_body( &self, body_id: BodyId, ) -> Result<DefId, ErrorGuaranteed>
Sourcefn item_at(&self, i: usize) -> Result<&'tcx Item<'tcx>, ErrorGuaranteed>
fn item_at(&self, i: usize) -> Result<&'tcx Item<'tcx>, ErrorGuaranteed>
Returns the item inside the const block at position i
starting from the end.
fn insert_extern_id( &mut self, local_id: LocalDefId, extern_id: DefId, ) -> Result<(), ErrorGuaranteed>
fn check_generics( &mut self, local_id: OwnerId, extern_id: DefId, ) -> Result<(), ErrorGuaranteed>
fn malformed(&self) -> ErrorGuaranteed
fn item_not_in_trait_impl( &self, local_id: OwnerId, extern_id: DefId, extern_impl_id: DefId, ) -> ErrorGuaranteed
fn invalid_item_in_inherent_impl( &self, local_id: OwnerId, extern_id: DefId, ) -> ErrorGuaranteed
fn invalid_impl_block(&self) -> ErrorGuaranteed
fn cannot_resolve_trait_impl(&self) -> ErrorGuaranteed
fn item_not_in_trait( &self, local_id: OwnerId, extern_id: DefId, extern_trait_id: DefId, ) -> ErrorGuaranteed
fn emit<'b>(&'b self, err: impl Diagnostic<'b>) -> ErrorGuaranteed
fn tcx(&self) -> TyCtxt<'tcx>
Auto Trait Implementations§
impl<'a, 'sess, 'tcx> Freeze for ExternSpecCollector<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !RefUnwindSafe for ExternSpecCollector<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !Send for ExternSpecCollector<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !Sync for ExternSpecCollector<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> Unpin for ExternSpecCollector<'a, 'sess, 'tcx>
impl<'a, 'sess, 'tcx> !UnwindSafe for ExternSpecCollector<'a, 'sess, '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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more