Skip to content

Commit c915474

Browse files
name and tests
1 parent e8cc6d4 commit c915474

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+123
-92
lines changed

compiler/rustc_hir_analysis/src/astconv/bounds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
712712
ast_bounds.iter(),
713713
bounds,
714714
projection_ty.bound_vars(),
715-
projection_ty.skip_binder_predicates(),
715+
projection_ty.skip_binder_with_predicates().1,
716716
only_self_bounds,
717717
);
718718
}

compiler/rustc_infer/src/infer/higher_ranked/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<'tcx> InferCtxt<'tcx> {
7474
where
7575
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
7676
{
77-
assert_eq!(binder.skip_binder_predicates(), ty::List::empty());
77+
assert_eq!(binder.skip_binder_with_predicates().1, ty::List::empty());
7878

7979
if let Some(inner) = binder.no_bound_vars() {
8080
return inner;

compiler/rustc_infer/src/infer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1401,7 +1401,7 @@ impl<'tcx> InferCtxt<'tcx> {
14011401
where
14021402
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
14031403
{
1404-
assert_eq!(value.skip_binder_predicates(), ty::List::empty());
1404+
assert_eq!(value.skip_binder_with_predicates().1, ty::List::empty());
14051405

14061406
if let Some(inner) = value.no_bound_vars() {
14071407
return inner;

compiler/rustc_infer/src/infer/nll_relate/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ where
263263
where
264264
T: ty::TypeFoldable<TyCtxt<'tcx>> + Copy,
265265
{
266-
assert_eq!(binder.skip_binder_predicates(), ty::List::empty());
266+
assert_eq!(binder.skip_binder_with_predicates().1, ty::List::empty());
267267

268268
if let Some(inner) = binder.no_bound_vars() {
269269
return inner;
@@ -313,7 +313,7 @@ where
313313
where
314314
T: ty::TypeFoldable<TyCtxt<'tcx>> + Copy,
315315
{
316-
assert_eq!(binder.skip_binder_predicates(), ty::List::empty());
316+
assert_eq!(binder.skip_binder_with_predicates().1, ty::List::empty());
317317

318318
if let Some(inner) = binder.no_bound_vars() {
319319
return inner;

compiler/rustc_middle/src/ty/fold.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,7 @@ impl<'tcx> TyCtxt<'tcx> {
322322
value: Binder<'tcx, T>,
323323
delegate: impl BoundVarReplacerDelegate<'tcx>,
324324
) -> (T, &'tcx ty::List<ty::Clause<'tcx>>) {
325-
let preds = value.skip_binder_predicates();
326-
self.replace_escaping_bound_vars_uncached((value.skip_binder(), preds), delegate)
325+
self.replace_escaping_bound_vars_uncached(value.skip_binder_with_predicates(), delegate)
327326
}
328327

329328
/// Replaces any late-bound regions bound in `value` with

compiler/rustc_middle/src/ty/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ impl<'tcx> Clause<'tcx> {
811811
// 1) Self: Bar1<'a, '^0.0> -> Self: Bar1<'a, '^0.1>
812812
let (shifted_pred, shifted_bound_clauses) = tcx.shift_bound_var_indices(
813813
trait_bound_vars.len(),
814-
(bound_pred.skip_binder(), bound_pred.skip_binder_predicates()),
814+
bound_pred.skip_binder_with_predicates(),
815815
);
816816
// 2) Self: Bar1<'a, '^0.1> -> T: Bar1<'^0.0, '^0.1>
817817
let new = EarlyBinder::bind(shifted_pred).instantiate(tcx, trait_ref.skip_binder().args);
@@ -820,7 +820,7 @@ impl<'tcx> Clause<'tcx> {
820820
tcx.mk_bound_variable_kinds_from_iter(trait_bound_vars.iter().chain(pred_bound_vars));
821821

822822
let binder_predicates = tcx.mk_clauses_from_iter(
823-
trait_ref.skip_binder_predicates().into_iter().chain(shifted_bound_clauses),
823+
trait_ref.skip_binder_with_predicates().1.into_iter().chain(shifted_bound_clauses),
824824
);
825825

826826
// FIXME: Is it really perf sensitive to use reuse_or_mk_predicate here?

compiler/rustc_middle/src/ty/sty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,8 +1043,8 @@ where
10431043
}
10441044

10451045
impl<'tcx, T> Binder<'tcx, T> {
1046-
pub fn skip_binder_predicates(&self) -> &'tcx List<ty::Clause<'tcx>> {
1047-
self.bound_predicates
1046+
pub fn skip_binder_with_predicates(self) -> (T, &'tcx List<ty::Clause<'tcx>>) {
1047+
(self.value, self.bound_predicates)
10481048
}
10491049

10501050
/// Skips the binder and returns the "bound" value. This is a

tests/ui/symbol-names/basic.legacy.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: symbol-name(_ZN5basic4main17h6fc0c8d27b1a289fE)
1+
error: symbol-name(_ZN5basic4main17hdee412beae90c5afE)
22
--> $DIR/basic.rs:8:1
33
|
44
LL | #[rustc_symbol_name]
55
| ^^^^^^^^^^^^^^^^^^^^
66

7-
error: demangling(basic::main::h6fc0c8d27b1a289f)
7+
error: demangling(basic::main::hdee412beae90c5af)
88
--> $DIR/basic.rs:8:1
99
|
1010
LL | #[rustc_symbol_name]

tests/ui/symbol-names/issue-60925.legacy.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17hab58a402db4ebf3aE)
1+
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h97d1f70c8b91235cE)
22
--> $DIR/issue-60925.rs:21:9
33
|
44
LL | #[rustc_symbol_name]
55
| ^^^^^^^^^^^^^^^^^^^^
66

7-
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::hab58a402db4ebf3a)
7+
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h97d1f70c8b91235c)
88
--> $DIR/issue-60925.rs:21:9
99
|
1010
LL | #[rustc_symbol_name]

tests/ui/traits/cache-reached-depth-ice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ fn test<X: ?Sized + Send>() {}
4141

4242
fn main() {
4343
test::<A>();
44-
//~^ ERROR evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
44+
//~^ ERROR evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
4545
}

0 commit comments

Comments
 (0)