[−][src]Struct rustc_lint::types::ImproperCTypesVisitor
Fields
cx: &'a LateContext<'tcx>mode: CItemKindImplementations
impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx>[src]
pub(in types) fn check_for_array_ty(
&mut self,
sp: Span,
ty: Ty<'tcx>
) -> bool[src]
&mut self,
sp: Span,
ty: Ty<'tcx>
) -> bool
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]
&self,
cache: &mut FxHashSet<Ty<'tcx>>,
field: &FieldDef,
substs: SubstsRef<'tcx>
) -> FfiResult<'tcx>
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]
&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".
pub(in types) fn check_type_for_ffi(
&self,
cache: &mut FxHashSet<Ty<'tcx>>,
ty: Ty<'tcx>
) -> FfiResult<'tcx>[src]
&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).
pub(in types) fn emit_ffi_unsafe_type_lint(
&mut self,
ty: Ty<'tcx>,
sp: Span,
note: &str,
help: Option<&str>
)[src]
&mut self,
ty: Ty<'tcx>,
sp: Span,
note: &str,
help: Option<&str>
)
pub(in types) fn check_for_opaque_ty(
&mut self,
sp: Span,
ty: Ty<'tcx>
) -> bool[src]
&mut self,
sp: Span,
ty: Ty<'tcx>
) -> bool
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]
&mut self,
sp: Span,
ty: Ty<'tcx>,
is_static: bool,
is_return_type: bool
)
pub(in types) fn check_foreign_fn(
&mut self,
id: HirId,
decl: &FnDecl<'_>
)[src]
&mut self,
id: HirId,
decl: &FnDecl<'_>
)
pub(in types) fn check_foreign_static(
&mut self,
id: HirId,
span: Span
)[src]
&mut self,
id: HirId,
span: Span
)
pub(in types) fn is_internal_abi(
&self,
abi: SpecAbi
) -> bool[src]
&self,
abi: SpecAbi
) -> bool
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,
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for ImproperCTypesVisitor<'a, 'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,