[−][src]Function rustc_trait_selection::traits::coherence::contained_non_local_types
pub(in traits::coherence) fn contained_non_local_types<'tcx>(
tcx: TyCtxt<'tcx>,
ty: Ty<'tcx>,
in_crate: InCrate
) -> Vec<Ty<'tcx>>
Returns a list of relevant non-local types for ty.
This is just ty itself unless ty is #[fundamental],
in which case we recursively look into this type.
If ty is local itself, this method returns an empty Vec.
Examples
u32is not local, so this returns[u32].- for
Foo<u32>, whereFoois a local type, this returns[]. &mut u32returns[u32], as&mutis a fundamental type, similar toBox.Box<Foo<u32>>returns[], asBoxis a fundamental type andFoois local.