Struct rustc_lint::types::ImproperCTypesVisitor
source · [−]struct ImproperCTypesVisitor<'a, 'tcx> {
cx: &'a LateContext<'tcx>,
mode: CItemKind,
}Fields
cx: &'a LateContext<'tcx>mode: CItemKindImplementations
Check if the type is array and emit an unsafe type lint.
Checks if the given field’s type is “ffi-safe”.
fn check_variant_for_ffi(
&self,
cache: &mut FxHashSet<Ty<'tcx>>,
ty: Ty<'tcx>,
def: &AdtDef,
variant: &VariantDef,
substs: SubstsRef<'tcx>
) -> FfiResult<'tcx>
fn check_variant_for_ffi(
&self,
cache: &mut FxHashSet<Ty<'tcx>>,
ty: Ty<'tcx>,
def: &AdtDef,
variant: &VariantDef,
substs: SubstsRef<'tcx>
) -> FfiResult<'tcx>
Checks if the given VariantDef’s field types are “ffi-safe”.
fn check_type_for_ffi(
&self,
cache: &mut FxHashSet<Ty<'tcx>>,
ty: Ty<'tcx>
) -> FfiResult<'tcx>
fn check_type_for_ffi(
&self,
cache: &mut FxHashSet<Ty<'tcx>>,
ty: Ty<'tcx>
) -> FfiResult<'tcx>
Checks if the given type is “ffi-safe” (has a stable, well-defined representation which can be exported to C code).
fn check_type_for_ffi_and_report_errors(
&mut self,
sp: Span,
ty: Ty<'tcx>,
is_static: bool,
is_return_type: bool
)
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for ImproperCTypesVisitor
impl<'a, 'tcx> !Send for ImproperCTypesVisitor
impl<'a, 'tcx> !Sync for ImproperCTypesVisitor
impl<'a, 'tcx> Unpin for ImproperCTypesVisitor where
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for ImproperCTypesVisitor
Blanket Implementations
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: 16 bytes