File tree Expand file tree Collapse file tree 5 files changed +1059
-0
lines changed Expand file tree Collapse file tree 5 files changed +1059
-0
lines changed Original file line number Diff line number Diff 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`
Original file line number Diff line number Diff line change 1+ pub use rustc_target:: abi:: AbiAndPrefAlign ;
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ pub use self::typeck_results::{
108108pub mod _match;
109109pub mod abstract_const;
110110pub mod adjustment;
111+ pub mod alignment;
111112pub mod binding;
112113pub mod cast;
113114pub mod codec;
You can’t perform that action at this time.
0 commit comments