@@ -880,6 +880,7 @@ rustc_queries! {
880
880
key: ty:: ParamEnvAnd <' tcx, ConstAlloc <' tcx>>
881
881
) -> Option <ty:: ValTree <' tcx>> {
882
882
desc { "destructure constant" }
883
+ remap_env_constness
883
884
}
884
885
885
886
/// Destructure a constant ADT or array into its variant index and its
@@ -888,6 +889,7 @@ rustc_queries! {
888
889
key: ty:: ParamEnvAnd <' tcx, & ' tcx ty:: Const <' tcx>>
889
890
) -> mir:: DestructuredConst <' tcx> {
890
891
desc { "destructure constant" }
892
+ remap_env_constness
891
893
}
892
894
893
895
/// Dereference a constant reference or raw pointer and turn the result into a constant
@@ -896,6 +898,7 @@ rustc_queries! {
896
898
key: ty:: ParamEnvAnd <' tcx, & ' tcx ty:: Const <' tcx>>
897
899
) -> & ' tcx ty:: Const <' tcx> {
898
900
desc { "deref constant" }
901
+ remap_env_constness
899
902
}
900
903
901
904
query const_caller_location( key: ( rustc_span:: Symbol , u32 , u32 ) ) -> ConstValue <' tcx> {
@@ -1100,26 +1103,32 @@ rustc_queries! {
1100
1103
/// `ty.is_copy()`, etc, since that will prune the environment where possible.
1101
1104
query is_copy_raw( env: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1102
1105
desc { "computing whether `{}` is `Copy`" , env. value }
1106
+ remap_env_constness
1103
1107
}
1104
1108
/// Query backing `TyS::is_sized`.
1105
1109
query is_sized_raw( env: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1106
1110
desc { "computing whether `{}` is `Sized`" , env. value }
1111
+ remap_env_constness
1107
1112
}
1108
1113
/// Query backing `TyS::is_freeze`.
1109
1114
query is_freeze_raw( env: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1110
1115
desc { "computing whether `{}` is freeze" , env. value }
1116
+ remap_env_constness
1111
1117
}
1112
1118
/// Query backing `TyS::is_unpin`.
1113
1119
query is_unpin_raw( env: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1114
1120
desc { "computing whether `{}` is `Unpin`" , env. value }
1121
+ remap_env_constness
1115
1122
}
1116
1123
/// Query backing `TyS::needs_drop`.
1117
1124
query needs_drop_raw( env: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1118
1125
desc { "computing whether `{}` needs drop" , env. value }
1126
+ remap_env_constness
1119
1127
}
1120
1128
/// Query backing `TyS::has_significant_drop_raw`.
1121
1129
query has_significant_drop_raw( env: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1122
1130
desc { "computing whether `{}` has a significant drop" , env. value }
1131
+ remap_env_constness
1123
1132
}
1124
1133
1125
1134
/// Query backing `TyS::is_structural_eq_shallow`.
@@ -1158,6 +1167,7 @@ rustc_queries! {
1158
1167
key: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>
1159
1168
) -> Result <ty:: layout:: TyAndLayout <' tcx>, ty:: layout:: LayoutError <' tcx>> {
1160
1169
desc { "computing layout of `{}`" , key. value }
1170
+ remap_env_constness
1161
1171
}
1162
1172
1163
1173
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
@@ -1168,6 +1178,7 @@ rustc_queries! {
1168
1178
key: ty:: ParamEnvAnd <' tcx, ( ty:: PolyFnSig <' tcx>, & ' tcx ty:: List <Ty <' tcx>>) >
1169
1179
) -> Result <& ' tcx abi:: call:: FnAbi <' tcx, Ty <' tcx>>, ty:: layout:: FnAbiError <' tcx>> {
1170
1180
desc { "computing call ABI of `{}` function pointers" , key. value. 0 }
1181
+ remap_env_constness
1171
1182
}
1172
1183
1173
1184
/// Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for
@@ -1179,6 +1190,7 @@ rustc_queries! {
1179
1190
key: ty:: ParamEnvAnd <' tcx, ( ty:: Instance <' tcx>, & ' tcx ty:: List <Ty <' tcx>>) >
1180
1191
) -> Result <& ' tcx abi:: call:: FnAbi <' tcx, Ty <' tcx>>, ty:: layout:: FnAbiError <' tcx>> {
1181
1192
desc { "computing call ABI of `{}`" , key. value. 0 }
1193
+ remap_env_constness
1182
1194
}
1183
1195
1184
1196
query dylib_dependency_formats( _: CrateNum )
@@ -1463,6 +1475,7 @@ rustc_queries! {
1463
1475
key: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>
1464
1476
) -> ty:: inhabitedness:: DefIdForest {
1465
1477
desc { "computing the inhabitedness of `{:?}`" , key }
1478
+ remap_env_constness
1466
1479
}
1467
1480
1468
1481
query dep_kind( _: CrateNum ) -> CrateDepKind {
@@ -1654,27 +1667,31 @@ rustc_queries! {
1654
1667
goal: ParamEnvAnd <' tcx, GenericArg <' tcx>>
1655
1668
) -> GenericArg <' tcx> {
1656
1669
desc { "normalizing `{}`" , goal. value }
1670
+ remap_env_constness
1657
1671
}
1658
1672
1659
1673
/// Do not call this query directly: invoke `normalize_erasing_regions` instead.
1660
1674
query normalize_mir_const_after_erasing_regions(
1661
1675
goal: ParamEnvAnd <' tcx, mir:: ConstantKind <' tcx>>
1662
1676
) -> mir:: ConstantKind <' tcx> {
1663
1677
desc { "normalizing `{}`" , goal. value }
1678
+ remap_env_constness
1664
1679
}
1665
1680
1666
1681
/// Do not call this query directly: invoke `try_normalize_erasing_regions` instead.
1667
1682
query try_normalize_generic_arg_after_erasing_regions(
1668
1683
goal: ParamEnvAnd <' tcx, GenericArg <' tcx>>
1669
1684
) -> Result <GenericArg <' tcx>, NoSolution > {
1670
1685
desc { "normalizing `{}`" , goal. value }
1686
+ remap_env_constness
1671
1687
}
1672
1688
1673
1689
/// Do not call this query directly: invoke `try_normalize_erasing_regions` instead.
1674
1690
query try_normalize_mir_const_after_erasing_regions(
1675
1691
goal: ParamEnvAnd <' tcx, mir:: ConstantKind <' tcx>>
1676
1692
) -> Result <mir:: ConstantKind <' tcx>, NoSolution > {
1677
1693
desc { "normalizing `{}`" , goal. value }
1694
+ remap_env_constness
1678
1695
}
1679
1696
1680
1697
query implied_outlives_bounds(
@@ -1836,6 +1853,7 @@ rustc_queries! {
1836
1853
key: ty:: ParamEnvAnd <' tcx, ( DefId , SubstsRef <' tcx>) >
1837
1854
) -> Result <Option <ty:: Instance <' tcx>>, ErrorReported > {
1838
1855
desc { "resolving instance `{}`" , ty:: Instance :: new( key. value. 0 , key. value. 1 ) }
1856
+ remap_env_constness
1839
1857
}
1840
1858
1841
1859
query resolve_instance_of_const_arg(
@@ -1845,6 +1863,7 @@ rustc_queries! {
1845
1863
"resolving instance of the const argument `{}`" ,
1846
1864
ty:: Instance :: new( key. value. 0 . to_def_id( ) , key. value. 2 ) ,
1847
1865
}
1866
+ remap_env_constness
1848
1867
}
1849
1868
1850
1869
query normalize_opaque_types( key: & ' tcx ty:: List <ty:: Predicate <' tcx>>) -> & ' tcx ty:: List <ty:: Predicate <' tcx>> {
@@ -1859,6 +1878,7 @@ rustc_queries! {
1859
1878
/// size, to account for partial initialisation. See #49298 for details.)
1860
1879
query conservative_is_privately_uninhabited( key: ty:: ParamEnvAnd <' tcx, Ty <' tcx>>) -> bool {
1861
1880
desc { "conservatively checking if {:?} is privately uninhabited" , key }
1881
+ remap_env_constness
1862
1882
}
1863
1883
1864
1884
query limits( key: ( ) ) -> Limits {
0 commit comments