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! {
1373
1373
remap_env_constness
1374
1374
}
1375
1375
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
+
1376
1386
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
1377
1387
///
1378
1388
/// 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::{
108
108
pub mod _match;
109
109
pub mod abstract_const;
110
110
pub mod adjustment;
111
+ pub mod alignment;
111
112
pub mod binding;
112
113
pub mod cast;
113
114
pub mod codec;
You can’t perform that action at this time.
0 commit comments