Function rustc_query_impl::make_query::opt_const_param_of [−][src]
pub fn opt_const_param_of<'tcx>(
tcx: QueryCtxt<'tcx>,
key: opt_const_param_of<'tcx>
) -> QueryStackFrame
Computes the DefId of the corresponding const parameter in case the key is a
const argument and returns None otherwise.
ⓘ
let a = foo::<7>(); // ^ Calling `opt_const_param_of` for this argument, fn foo<const N: usize>() // ^ returns this `DefId`. fn bar() { // ^ While calling `opt_const_param_of` for other bodies returns `None`. }