Rollup merge of #132344 - compiler-errors:same-thing, r=lcnr
Merge `HostPolarity` and `BoundConstness` They're basically the same thing, and I think `BoundConstness` is easier to use. r? fee1-dead or reassign
This commit is contained in:
commit
7b19508abe
16 changed files with 66 additions and 81 deletions
|
@ -76,8 +76,8 @@ use crate::traits::solve::{
|
|||
};
|
||||
use crate::ty::predicate::ExistentialPredicateStableCmpExt as _;
|
||||
use crate::ty::{
|
||||
self, AdtDef, AdtDefData, AdtKind, Binder, Clause, Clauses, Const, GenericArg, GenericArgs,
|
||||
GenericArgsRef, GenericParamDefKind, HostPolarity, ImplPolarity, List, ListWithCachedTypeInfo,
|
||||
self, AdtDef, AdtDefData, AdtKind, Binder, BoundConstness, Clause, Clauses, Const, GenericArg,
|
||||
GenericArgs, GenericArgsRef, GenericParamDefKind, ImplPolarity, List, ListWithCachedTypeInfo,
|
||||
ParamConst, ParamTy, Pattern, PatternKind, PolyExistentialPredicate, PolyFnSig, Predicate,
|
||||
PredicateKind, PredicatePolarity, Region, RegionKind, ReprOptions, TraitObjectVisitor, Ty,
|
||||
TyKind, TyVid, Visibility,
|
||||
|
@ -2205,7 +2205,7 @@ macro_rules! nop_slice_lift {
|
|||
nop_slice_lift! {ty::ValTree<'a> => ty::ValTree<'tcx>}
|
||||
|
||||
TrivialLiftImpls! {
|
||||
ImplPolarity, PredicatePolarity, Promoted, HostPolarity,
|
||||
ImplPolarity, PredicatePolarity, Promoted, BoundConstness,
|
||||
}
|
||||
|
||||
macro_rules! sty_debug_print {
|
||||
|
|
|
@ -267,7 +267,7 @@ impl FlagComputation {
|
|||
}
|
||||
ty::PredicateKind::Clause(ty::ClauseKind::HostEffect(ty::HostEffectPredicate {
|
||||
trait_ref,
|
||||
host: _,
|
||||
constness: _,
|
||||
})) => {
|
||||
self.add_args(trait_ref.args);
|
||||
}
|
||||
|
|
|
@ -1959,7 +1959,7 @@ pub trait PrettyPrinter<'tcx>: Printer<'tcx> + fmt::Write {
|
|||
ty::BoundConstness::Const => {
|
||||
p!("const ");
|
||||
}
|
||||
ty::BoundConstness::ConstIfConst => {
|
||||
ty::BoundConstness::Maybe => {
|
||||
p!("~const ");
|
||||
}
|
||||
}
|
||||
|
@ -3076,9 +3076,9 @@ define_print! {
|
|||
}
|
||||
|
||||
ty::HostEffectPredicate<'tcx> {
|
||||
let constness = match self.host {
|
||||
ty::HostPolarity::Const => { "const" }
|
||||
ty::HostPolarity::Maybe => { "~const" }
|
||||
let constness = match self.constness {
|
||||
ty::BoundConstness::Const => { "const" }
|
||||
ty::BoundConstness::Maybe => { "~const" }
|
||||
};
|
||||
p!(print(self.trait_ref.self_ty()), ": {constness} ");
|
||||
p!(print(self.trait_ref.print_trait_sugared()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue