Skip to content

Commit 8fe3cad

Browse files
committed
mvb
1 parent 8973049 commit 8fe3cad

File tree

5 files changed

+1059
-0
lines changed

5 files changed

+1059
-0
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,16 @@ rustc_queries! {
13731373
remap_env_constness
13741374
}
13751375

1376+
/// Computes the alignment of a type. Note that this implicitly
1377+
/// executes in "reveal all" mode, and will normalize the input type.
1378+
query align_of(
1379+
key: ty::ParamEnvAnd<'tcx, Ty<'tcx>>
1380+
) -> Result<ty::alignment::AbiAndPrefAlign, ty::layout::LayoutError<'tcx>> {
1381+
depth_limit
1382+
desc { "computing alignment of `{}`", key.value }
1383+
remap_env_constness
1384+
}
1385+
13761386
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
13771387
///
13781388
/// NB: this doesn't handle virtual calls - those should use `fn_abi_of_instance`
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub use rustc_target::abi::AbiAndPrefAlign;

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ pub use self::typeck_results::{
108108
pub mod _match;
109109
pub mod abstract_const;
110110
pub mod adjustment;
111+
pub mod alignment;
111112
pub mod binding;
112113
pub mod cast;
113114
pub mod codec;

0 commit comments

Comments
 (0)