[][src]Function rustc_typeck::collect::is_param

fn is_param(tcx: TyCtxt, ast_ty: &Ty, param_id: HirId) -> bool
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Tests whether this is the AST for a reference to the type parameter with ID param_id. We use this so as to avoid running ast_ty_to_ty, because we want to avoid triggering an all-out conversion of the type to avoid inducing unnecessary cycles.