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

+1-1
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

+1-1
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

+1-1
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

+2-2
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

+1-2
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+1-1
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
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
1+
error: evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
22
--> $DIR/cache-reached-depth-ice.rs:43:5
33
|
44
LL | fn test<X: ?Sized + Send>() {}

tests/ui/traits/issue-83538-tainted-cache-after-cycle.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ fn main() {
5757
// Key is that Vec<First> is "ok" and Third<'_, Ty> is "ok modulo regions":
5858

5959
forward();
60-
//~^ ERROR evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
61-
//~| ERROR evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
60+
//~^ ERROR evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
61+
//~| ERROR evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
6262

6363
reverse();
64-
//~^ ERROR evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
65-
//~| ERROR evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
64+
//~^ ERROR evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
65+
//~| ERROR evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
6666
}

tests/ui/traits/issue-83538-tainted-cache-after-cycle.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
1+
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
22
--> $DIR/issue-83538-tainted-cache-after-cycle.rs:59:5
33
|
44
LL | Vec<First>: Unpin,
@@ -7,7 +7,7 @@ LL | Vec<First>: Unpin,
77
LL | forward();
88
| ^^^^^^^
99

10-
error: evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
10+
error: evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
1111
--> $DIR/issue-83538-tainted-cache-after-cycle.rs:59:5
1212
|
1313
LL | Third<'a, Ty>: Unpin,
@@ -16,7 +16,7 @@ LL | Third<'a, Ty>: Unpin,
1616
LL | forward();
1717
| ^^^^^^^
1818

19-
error: evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
19+
error: evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
2020
--> $DIR/issue-83538-tainted-cache-after-cycle.rs:63:5
2121
|
2222
LL | Third<'a, Ty>: Unpin,
@@ -25,7 +25,7 @@ LL | Third<'a, Ty>: Unpin,
2525
LL | reverse();
2626
| ^^^^^^^
2727

28-
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
28+
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
2929
--> $DIR/issue-83538-tainted-cache-after-cycle.rs:63:5
3030
|
3131
LL | Vec<First>: Unpin,

tests/ui/traits/issue-85360-eval-obligation-ice.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ use core::marker::PhantomData;
77

88
fn main() {
99
test::<MaskedStorage<GenericComp<Pos>>>(make());
10-
//~^ ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
11-
//~| ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
10+
//~^ ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
11+
//~| ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
1212

1313
test::<MaskedStorage<GenericComp2<Pos>>>(make());
14-
//~^ ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
15-
//~| ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
14+
//~^ ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
15+
//~| ERROR evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
1616
}
1717

1818
#[rustc_evaluate_where_clauses]

tests/ui/traits/issue-85360-eval-obligation-ice.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
1+
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
22
--> $DIR/issue-85360-eval-obligation-ice.rs:9:5
33
|
44
LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
@@ -7,7 +7,7 @@ LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
77
LL | fn test<T: Sized>(_: T) {}
88
| - predicate
99

10-
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
10+
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
1111
--> $DIR/issue-85360-eval-obligation-ice.rs:9:5
1212
|
1313
LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
@@ -16,7 +16,7 @@ LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
1616
LL | fn test<T: Sized>(_: T) {}
1717
| ----- predicate
1818

19-
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
19+
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
2020
--> $DIR/issue-85360-eval-obligation-ice.rs:13:5
2121
|
2222
LL | test::<MaskedStorage<GenericComp2<Pos>>>(make());
@@ -25,7 +25,7 @@ LL | test::<MaskedStorage<GenericComp2<Pos>>>(make());
2525
LL | fn test<T: Sized>(_: T) {}
2626
| - predicate
2727

28-
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
28+
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
2929
--> $DIR/issue-85360-eval-obligation-ice.rs:13:5
3030
|
3131
LL | test::<MaskedStorage<GenericComp2<Pos>>>(make());

tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders)]
24
//~^ WARN the feature `non_lifetime_binders` is incomplete
35

tests/ui/traits/non_lifetime_binders/bad-sized-cond.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders)]
24
//~^ WARN is incomplete and may not be safe
35

tests/ui/traits/non_lifetime_binders/basic.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
// check-pass
24
// Basic test that show's we can succesfully typeck a `for<T>` where clause.
35

@@ -6,7 +8,7 @@
68

79
trait Trait {}
810

9-
impl<T: ?Sized> Trait for T {}
11+
impl<T> Trait for T {}
1012

1113
fn foo()
1214
where

tests/ui/traits/non_lifetime_binders/basic.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/basic.rs:4:12
2+
--> $DIR/basic.rs:6:12
33
|
44
LL | #![feature(non_lifetime_binders)]
55
| ^^^^^^^^^^^^^^^^^^^^

tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders)]
24
//~^ WARN the feature `non_lifetime_binders` is incomplete
35

tests/ui/traits/non_lifetime_binders/capture-late-ct-in-anon.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/capture-late-ct-in-anon.rs:1:12
2+
--> $DIR/capture-late-ct-in-anon.rs:3:12
33
|
44
LL | #![feature(non_lifetime_binders)]
55
| ^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #![feature(non_lifetime_binders)]
88
= note: `#[warn(incomplete_features)]` on by default
99

1010
error: cannot capture late-bound const parameter in a constant
11-
--> $DIR/capture-late-ct-in-anon.rs:6:30
11+
--> $DIR/capture-late-ct-in-anon.rs:8:30
1212
|
1313
LL | for<const C: usize> [(); C]: Copy,
1414
| -------------- ^

tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/drop-impl-pred.rs:6:12
2+
--> $DIR/drop-impl-pred.rs:7:12
33
|
44
LL | #![feature(non_lifetime_binders)]
55
| ^^^^^^^^^^^^^^^^^^^^
@@ -8,13 +8,13 @@ LL | #![feature(non_lifetime_binders)]
88
= note: `#[warn(incomplete_features)]` on by default
99

1010
error[E0367]: `Drop` impl requires `H: Foo` but the struct it is implemented for does not
11-
--> $DIR/drop-impl-pred.rs:19:15
11+
--> $DIR/drop-impl-pred.rs:20:15
1212
|
1313
LL | for<H> H: Foo,
1414
| ^^^
1515
|
1616
note: the implementor must specify the same requirement
17-
--> $DIR/drop-impl-pred.rs:12:1
17+
--> $DIR/drop-impl-pred.rs:13:1
1818
|
1919
LL | struct Bar<T>(T) where T: Foo;
2020
| ^^^^^^^^^^^^^

tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// compile-flags: -Ztrait-solver=next
12
// revisions: no yes
23
//[yes] check-pass
34

tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/drop-impl-pred.rs:6:12
2+
--> $DIR/drop-impl-pred.rs:7:12
33
|
44
LL | #![feature(non_lifetime_binders)]
55
| ^^^^^^^^^^^^^^^^^^^^

tests/ui/traits/non_lifetime_binders/fail.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
// Error reporting for where `for<T> T: Trait` doesn't hold
24

35
#![feature(non_lifetime_binders)]

tests/ui/traits/non_lifetime_binders/foreach-partial-eq.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders)]
24
//~^ WARN the feature `non_lifetime_binders` is incomplete
35

tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders, generic_const_exprs)]
24
//~^ WARN the feature `non_lifetime_binders` is incomplete
35
//~| WARN the feature `generic_const_exprs` is incomplete

tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/late-bound-in-anon-ct.rs:1:12
2+
--> $DIR/late-bound-in-anon-ct.rs:3:12
33
|
44
LL | #![feature(non_lifetime_binders, generic_const_exprs)]
55
| ^^^^^^^^^^^^^^^^^^^^
@@ -8,15 +8,15 @@ LL | #![feature(non_lifetime_binders, generic_const_exprs)]
88
= note: `#[warn(incomplete_features)]` on by default
99

1010
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
11-
--> $DIR/late-bound-in-anon-ct.rs:1:34
11+
--> $DIR/late-bound-in-anon-ct.rs:3:34
1212
|
1313
LL | #![feature(non_lifetime_binders, generic_const_exprs)]
1414
| ^^^^^^^^^^^^^^^^^^^
1515
|
1616
= note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
1717

1818
error: cannot capture late-bound type parameter in a constant
19-
--> $DIR/late-bound-in-anon-ct.rs:7:27
19+
--> $DIR/late-bound-in-anon-ct.rs:9:27
2020
|
2121
LL | for<T> [i32; { let _: T = todo!(); 0 }]:,
2222
| - ^

tests/ui/traits/non_lifetime_binders/method-probe.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// compile-flags: -Ztrait-solver=next
12
// check-pass
23

34
#![feature(non_lifetime_binders)]

tests/ui/traits/non_lifetime_binders/missing-assoc-item.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders)]
24
//~^ WARN the feature `non_lifetime_binders` is incomplete
35

tests/ui/traits/non_lifetime_binders/missing-assoc-item.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
2-
--> $DIR/missing-assoc-item.rs:1:12
2+
--> $DIR/missing-assoc-item.rs:3:12
33
|
44
LL | #![feature(non_lifetime_binders)]
55
| ^^^^^^^^^^^^^^^^^^^^
@@ -8,7 +8,7 @@ LL | #![feature(non_lifetime_binders)]
88
= note: `#[warn(incomplete_features)]` on by default
99

1010
error[E0223]: ambiguous associated type
11-
--> $DIR/missing-assoc-item.rs:6:12
11+
--> $DIR/missing-assoc-item.rs:8:12
1212
|
1313
LL | for<B> B::Item: Send,
1414
| ^^^^^^^

tests/ui/traits/non_lifetime_binders/nested-apit-mentioning-outer-bound-var.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// compile-flags: -Ztrait-solver=next
2+
13
#![feature(non_lifetime_binders)]
24
//~^ WARN the feature `non_lifetime_binders` is incomplete
35

0 commit comments

Comments
 (0)