add naive_layout_of
query
This commit is contained in:
parent
e2a7ba2771
commit
cb8b1d1bc9
19 changed files with 294 additions and 49 deletions
|
@ -1394,6 +1394,17 @@ rustc_queries! {
|
|||
desc { "computing layout of `{}`", key.value }
|
||||
}
|
||||
|
||||
/// Computes the naive layout estimate of a type. Note that this implicitly
|
||||
/// executes in "reveal all" mode, and will normalize the input type.
|
||||
///
|
||||
/// Unlike `layout_of`, this doesn't recurse behind reference types.
|
||||
query naive_layout_of(
|
||||
key: ty::ParamEnvAnd<'tcx, Ty<'tcx>>
|
||||
) -> Result<ty::layout::TyAndNaiveLayout<'tcx>, &'tcx ty::layout::LayoutError<'tcx>> {
|
||||
depth_limit
|
||||
desc { "computing layout (naive) of `{}`", key.value }
|
||||
}
|
||||
|
||||
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
|
||||
///
|
||||
/// NB: this doesn't handle virtual calls - those should use `fn_abi_of_instance`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue