Skip to content

Commit 9a0f289

Browse files
committed
Add Symbol to UnstableFeature ClauseKind
1 parent 52120c8 commit 9a0f289

File tree

26 files changed

+38
-30
lines changed

26 files changed

+38
-30
lines changed

compiler/rustc_hir_analysis/src/collect/predicates_of.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>(
747747
ty::ClauseKind::RegionOutlives(_)
748748
| ty::ClauseKind::ConstArgHasType(_, _)
749749
| ty::ClauseKind::WellFormed(_)
750-
| ty::ClauseKind::UnstableFeature
750+
| ty::ClauseKind::UnstableFeature(_)
751751
| ty::ClauseKind::ConstEvaluatable(_) => {
752752
bug!(
753753
"unexpected non-`Self` predicate when computing \
@@ -775,7 +775,7 @@ pub(super) fn assert_only_contains_predicates_from<'tcx>(
775775
| ty::ClauseKind::ConstArgHasType(_, _)
776776
| ty::ClauseKind::WellFormed(_)
777777
| ty::ClauseKind::ConstEvaluatable(_)
778-
| ty::ClauseKind::UnstableFeature
778+
| ty::ClauseKind::UnstableFeature(_)
779779
| ty::ClauseKind::HostEffect(..) => {
780780
bug!(
781781
"unexpected non-`Self` predicate when computing \

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ fn trait_specialization_kind<'tcx>(
499499
| ty::ClauseKind::ConstArgHasType(..)
500500
| ty::ClauseKind::WellFormed(_)
501501
| ty::ClauseKind::ConstEvaluatable(..)
502-
| ty::ClauseKind::UnstableFeature
502+
| ty::ClauseKind::UnstableFeature(_)
503503
| ty::ClauseKind::HostEffect(..) => None,
504504
}
505505
}

compiler/rustc_hir_analysis/src/outlives/explicit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl<'tcx> ExplicitPredicatesMap<'tcx> {
5454
| ty::ClauseKind::ConstArgHasType(_, _)
5555
| ty::ClauseKind::WellFormed(_)
5656
| ty::ClauseKind::ConstEvaluatable(_)
57-
| ty::ClauseKind::UnstableFeature
57+
| ty::ClauseKind::UnstableFeature(_)
5858
| ty::ClauseKind::HostEffect(..) => {}
5959
}
6060
}

compiler/rustc_hir_typeck/src/fn_ctxt/inspect_obligations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
5353
| ty::PredicateKind::Clause(ty::ClauseKind::ConstEvaluatable(..))
5454
| ty::PredicateKind::ConstEquate(..)
5555
| ty::PredicateKind::Clause(ty::ClauseKind::HostEffect(..))
56-
| ty::PredicateKind::Clause(ty::ClauseKind::UnstableFeature)
56+
| ty::PredicateKind::Clause(ty::ClauseKind::UnstableFeature(_))
5757
| ty::PredicateKind::Ambiguous => false,
5858
}
5959
}

compiler/rustc_hir_typeck/src/method/probe.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
926926
| ty::ClauseKind::ConstArgHasType(_, _)
927927
| ty::ClauseKind::WellFormed(_)
928928
| ty::ClauseKind::ConstEvaluatable(_)
929-
| ty::ClauseKind::UnstableFeature
929+
| ty::ClauseKind::UnstableFeature(_)
930930
| ty::ClauseKind::HostEffect(..) => None,
931931
}
932932
});

compiler/rustc_lint/src/builtin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,7 +1568,7 @@ impl<'tcx> LateLintPass<'tcx> for TrivialConstraints {
15681568
ClauseKind::TypeOutlives(..) |
15691569
ClauseKind::RegionOutlives(..) => "lifetime",
15701570

1571-
ClauseKind::UnstableFeature
1571+
ClauseKind::UnstableFeature(_)
15721572
// `ConstArgHasType` is never global as `ct` is always a param
15731573
| ClauseKind::ConstArgHasType(..)
15741574
// Ignore projections, as they can only be global

compiler/rustc_middle/src/ty/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
129129
type FnInputTys = &'tcx [Ty<'tcx>];
130130
type ParamTy = ParamTy;
131131
type BoundTy = ty::BoundTy;
132+
type Symbol = Symbol;
132133

133134
type PlaceholderTy = ty::PlaceholderType;
134135
type ErrorGuaranteed = ErrorGuaranteed;

compiler/rustc_middle/src/ty/flags.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ impl FlagComputation {
309309
ty::PredicateKind::Clause(ty::ClauseKind::WellFormed(arg)) => {
310310
self.add_args(slice::from_ref(&arg));
311311
}
312-
ty::PredicateKind::Clause(ty::ClauseKind::UnstableFeature) => {}
312+
ty::PredicateKind::Clause(ty::ClauseKind::UnstableFeature(_)) => {}
313313
ty::PredicateKind::DynCompatible(_def_id) => {}
314314
ty::PredicateKind::Clause(ty::ClauseKind::ConstEvaluatable(uv)) => {
315315
self.add_const(uv);

compiler/rustc_middle/src/ty/predicate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<'tcx> Predicate<'tcx> {
131131
| PredicateKind::Clause(ClauseKind::TypeOutlives(_))
132132
| PredicateKind::Clause(ClauseKind::Projection(_))
133133
| PredicateKind::Clause(ClauseKind::ConstArgHasType(..))
134-
| PredicateKind::Clause(ClauseKind::UnstableFeature)
134+
| PredicateKind::Clause(ClauseKind::UnstableFeature(_))
135135
| PredicateKind::DynCompatible(_)
136136
| PredicateKind::Subtype(_)
137137
| PredicateKind::Coerce(_)
@@ -648,7 +648,7 @@ impl<'tcx> Predicate<'tcx> {
648648
PredicateKind::Clause(ClauseKind::Projection(..))
649649
| PredicateKind::Clause(ClauseKind::HostEffect(..))
650650
| PredicateKind::Clause(ClauseKind::ConstArgHasType(..))
651-
| PredicateKind::Clause(ClauseKind::UnstableFeature)
651+
| PredicateKind::Clause(ClauseKind::UnstableFeature(_))
652652
| PredicateKind::NormalizesTo(..)
653653
| PredicateKind::AliasRelate(..)
654654
| PredicateKind::Subtype(..)
@@ -670,7 +670,7 @@ impl<'tcx> Predicate<'tcx> {
670670
PredicateKind::Clause(ClauseKind::Trait(..))
671671
| PredicateKind::Clause(ClauseKind::HostEffect(..))
672672
| PredicateKind::Clause(ClauseKind::ConstArgHasType(..))
673-
| PredicateKind::Clause(ClauseKind::UnstableFeature)
673+
| PredicateKind::Clause(ClauseKind::UnstableFeature(_))
674674
| PredicateKind::NormalizesTo(..)
675675
| PredicateKind::AliasRelate(..)
676676
| PredicateKind::Subtype(..)

compiler/rustc_middle/src/ty/print/pretty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3250,7 +3250,7 @@ define_print! {
32503250
ty::ClauseKind::ConstEvaluatable(ct) => {
32513251
p!("the constant `", print(ct), "` can be evaluated")
32523252
}
3253-
ty::ClauseKind::UnstableFeature => p!("unstable impl"),
3253+
ty::ClauseKind::UnstableFeature(_) => p!("unstable impl"), // TODO: fix this later
32543254
}
32553255
}
32563256

0 commit comments

Comments
 (0)