[−][src]Struct rustc_lint::types::ImproperCTypesVisitor

pub(in types) struct ImproperCTypesVisitor<'a, 'tcx> {
    cx: &'a LateContext<'tcx>,
    mode: CItemKind,
}

Fields

cx: &'a LateContext<'tcx>mode: CItemKind

Implementations

impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx>[src]

pub(in types) fn check_for_array_ty(
    &mut self,
    sp: Span,
    ty: Ty<'tcx>
) -> bool
[src]

Check if the type is array and emit an unsafe type lint.

pub(in types) fn check_field_type_for_ffi(
    &self,
    cache: &mut FxHashSet<Ty<'tcx>>,
    field: &FieldDef,
    substs: SubstsRef<'tcx>
) -> FfiResult<'tcx>
[src]

Checks if the given field's type is "ffi-safe".

pub(in types) fn check_variant_for_ffi(
    &self,
    cache: &mut FxHashSet<Ty<'tcx>>,
    ty: Ty<'tcx>,
    def: &AdtDef,
    variant: &VariantDef,
    substs: SubstsRef<'tcx>
) -> FfiResult<'tcx>
[src]

Checks if the given VariantDef's field types are "ffi-safe".

pub(in types) fn check_type_for_ffi(
    &self,
    cache: &mut FxHashSet<Ty<'tcx>>,
    ty: Ty<'tcx>
) -> FfiResult<'tcx>
[src]

Checks if the given type is "ffi-safe" (has a stable, well-defined representation which can be exported to C code).

pub(in types) fn emit_ffi_unsafe_type_lint(
    &mut self,
    ty: Ty<'tcx>,
    sp: Span,
    note: &str,
    help: Option<&str>
)
[src]

pub(in types) fn check_for_opaque_ty(
    &mut self,
    sp: Span,
    ty: Ty<'tcx>
) -> bool
[src]

pub(in types) fn check_type_for_ffi_and_report_errors(
    &mut self,
    sp: Span,
    ty: Ty<'tcx>,
    is_static: bool,
    is_return_type: bool
)
[src]

pub(in types) fn check_foreign_fn(
    &mut self,
    id: HirId,
    decl: &FnDecl<'_>
)
[src]

pub(in types) fn check_foreign_static(
    &mut self,
    id: HirId,
    span: Span
)
[src]

pub(in types) fn is_internal_abi(
    &self,
    abi: SpecAbi
) -> bool
[src]

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for ImproperCTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> !Send for ImproperCTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> !Sync for ImproperCTypesVisitor<'a, 'tcx>

impl<'a, 'tcx> Unpin for ImproperCTypesVisitor<'a, 'tcx> where
    'tcx: 'a, 

impl<'a, 'tcx> !UnwindSafe for ImproperCTypesVisitor<'a, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.