Skip to content

Commit

Permalink
name and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Sep 4, 2023
1 parent e8cc6d4 commit c915474
Show file tree
Hide file tree
Showing 48 changed files with 123 additions and 92 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/astconv/bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
ast_bounds.iter(),
bounds,
projection_ty.bound_vars(),
projection_ty.skip_binder_predicates(),
projection_ty.skip_binder_with_predicates().1,
only_self_bounds,
);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/higher_ranked/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl<'tcx> InferCtxt<'tcx> {
where
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
{
assert_eq!(binder.skip_binder_predicates(), ty::List::empty());
assert_eq!(binder.skip_binder_with_predicates().1, ty::List::empty());

if let Some(inner) = binder.no_bound_vars() {
return inner;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_infer/src/infer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1401,7 +1401,7 @@ impl<'tcx> InferCtxt<'tcx> {
where
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
{
assert_eq!(value.skip_binder_predicates(), ty::List::empty());
assert_eq!(value.skip_binder_with_predicates().1, ty::List::empty());

if let Some(inner) = value.no_bound_vars() {
return inner;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_infer/src/infer/nll_relate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ where
where
T: ty::TypeFoldable<TyCtxt<'tcx>> + Copy,
{
assert_eq!(binder.skip_binder_predicates(), ty::List::empty());
assert_eq!(binder.skip_binder_with_predicates().1, ty::List::empty());

if let Some(inner) = binder.no_bound_vars() {
return inner;
Expand Down Expand Up @@ -313,7 +313,7 @@ where
where
T: ty::TypeFoldable<TyCtxt<'tcx>> + Copy,
{
assert_eq!(binder.skip_binder_predicates(), ty::List::empty());
assert_eq!(binder.skip_binder_with_predicates().1, ty::List::empty());

if let Some(inner) = binder.no_bound_vars() {
return inner;
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_middle/src/ty/fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ impl<'tcx> TyCtxt<'tcx> {
value: Binder<'tcx, T>,
delegate: impl BoundVarReplacerDelegate<'tcx>,
) -> (T, &'tcx ty::List<ty::Clause<'tcx>>) {
let preds = value.skip_binder_predicates();
self.replace_escaping_bound_vars_uncached((value.skip_binder(), preds), delegate)
self.replace_escaping_bound_vars_uncached(value.skip_binder_with_predicates(), delegate)
}

/// Replaces any late-bound regions bound in `value` with
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ impl<'tcx> Clause<'tcx> {
// 1) Self: Bar1<'a, '^0.0> -> Self: Bar1<'a, '^0.1>
let (shifted_pred, shifted_bound_clauses) = tcx.shift_bound_var_indices(
trait_bound_vars.len(),
(bound_pred.skip_binder(), bound_pred.skip_binder_predicates()),
bound_pred.skip_binder_with_predicates(),
);
// 2) Self: Bar1<'a, '^0.1> -> T: Bar1<'^0.0, '^0.1>
let new = EarlyBinder::bind(shifted_pred).instantiate(tcx, trait_ref.skip_binder().args);
Expand All @@ -820,7 +820,7 @@ impl<'tcx> Clause<'tcx> {
tcx.mk_bound_variable_kinds_from_iter(trait_bound_vars.iter().chain(pred_bound_vars));

let binder_predicates = tcx.mk_clauses_from_iter(
trait_ref.skip_binder_predicates().into_iter().chain(shifted_bound_clauses),
trait_ref.skip_binder_with_predicates().1.into_iter().chain(shifted_bound_clauses),
);

// FIXME: Is it really perf sensitive to use reuse_or_mk_predicate here?
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,8 @@ where
}

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

/// Skips the binder and returns the "bound" value. This is a
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/symbol-names/basic.legacy.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error: symbol-name(_ZN5basic4main17h6fc0c8d27b1a289fE)
error: symbol-name(_ZN5basic4main17hdee412beae90c5afE)
--> $DIR/basic.rs:8:1
|
LL | #[rustc_symbol_name]
| ^^^^^^^^^^^^^^^^^^^^

error: demangling(basic::main::h6fc0c8d27b1a289f)
error: demangling(basic::main::hdee412beae90c5af)
--> $DIR/basic.rs:8:1
|
LL | #[rustc_symbol_name]
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/symbol-names/issue-60925.legacy.stderr
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17hab58a402db4ebf3aE)
error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h97d1f70c8b91235cE)
--> $DIR/issue-60925.rs:21:9
|
LL | #[rustc_symbol_name]
| ^^^^^^^^^^^^^^^^^^^^

error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::hab58a402db4ebf3a)
error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h97d1f70c8b91235c)
--> $DIR/issue-60925.rs:21:9
|
LL | #[rustc_symbol_name]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/cache-reached-depth-ice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ fn test<X: ?Sized + Send>() {}

fn main() {
test::<A>();
//~^ ERROR evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
//~^ ERROR evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
}
2 changes: 1 addition & 1 deletion tests/ui/traits/cache-reached-depth-ice.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
error: evaluate(Binder { value: TraitPredicate(<A as std::marker::Send>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
--> $DIR/cache-reached-depth-ice.rs:43:5
|
LL | fn test<X: ?Sized + Send>() {}
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/traits/issue-83538-tainted-cache-after-cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ fn main() {
// Key is that Vec<First> is "ok" and Third<'_, Ty> is "ok modulo regions":

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

reverse();
//~^ ERROR evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
//~| ERROR evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
//~^ ERROR evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
//~| ERROR evaluate(Binder { value: TraitPredicate(<Third<'_, Ty> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
}
8 changes: 4 additions & 4 deletions tests/ui/traits/issue-83538-tainted-cache-after-cycle.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
--> $DIR/issue-83538-tainted-cache-after-cycle.rs:59:5
|
LL | Vec<First>: Unpin,
Expand All @@ -7,7 +7,7 @@ LL | Vec<First>: Unpin,
LL | forward();
| ^^^^^^^

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

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

error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
error: evaluate(Binder { value: TraitPredicate(<std::vec::Vec<First> as std::marker::Unpin>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
--> $DIR/issue-83538-tainted-cache-after-cycle.rs:63:5
|
LL | Vec<First>: Unpin,
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/traits/issue-85360-eval-obligation-ice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use core::marker::PhantomData;

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

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

#[rustc_evaluate_where_clauses]
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/traits/issue-85360-eval-obligation-ice.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOk)
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOk)
--> $DIR/issue-85360-eval-obligation-ice.rs:9:5
|
LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
Expand All @@ -7,7 +7,7 @@ LL | test::<MaskedStorage<GenericComp<Pos>>>(make());
LL | fn test<T: Sized>(_: T) {}
| - predicate

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

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

error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [] }) = Ok(EvaluatedToOkModuloRegions)
error: evaluate(Binder { value: TraitPredicate(<MaskedStorage<GenericComp2<Pos>> as std::marker::Sized>, polarity:Positive), bound_vars: [], bound_predicates: [] }) = Ok(EvaluatedToOkModuloRegions)
--> $DIR/issue-85360-eval-obligation-ice.rs:13:5
|
LL | test::<MaskedStorage<GenericComp2<Pos>>>(make());
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/traits/non_lifetime_binders/bad-copy-cond.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

Expand Down
2 changes: 2 additions & 0 deletions tests/ui/traits/non_lifetime_binders/bad-sized-cond.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

#![feature(non_lifetime_binders)]
//~^ WARN is incomplete and may not be safe

Expand Down
4 changes: 3 additions & 1 deletion tests/ui/traits/non_lifetime_binders/basic.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

// check-pass
// Basic test that show's we can succesfully typeck a `for<T>` where clause.

Expand All @@ -6,7 +8,7 @@

trait Trait {}

impl<T: ?Sized> Trait for T {}
impl<T> Trait for T {}

fn foo()
where
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/traits/non_lifetime_binders/basic.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/basic.rs:4:12
--> $DIR/basic.rs:6:12
|
LL | #![feature(non_lifetime_binders)]
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

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

error: cannot capture late-bound const parameter in a constant
--> $DIR/capture-late-ct-in-anon.rs:6:30
--> $DIR/capture-late-ct-in-anon.rs:8:30
|
LL | for<const C: usize> [(); C]: Copy,
| -------------- ^
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/drop-impl-pred.rs:6:12
--> $DIR/drop-impl-pred.rs:7:12
|
LL | #![feature(non_lifetime_binders)]
| ^^^^^^^^^^^^^^^^^^^^
Expand All @@ -8,13 +8,13 @@ LL | #![feature(non_lifetime_binders)]
= note: `#[warn(incomplete_features)]` on by default

error[E0367]: `Drop` impl requires `H: Foo` but the struct it is implemented for does not
--> $DIR/drop-impl-pred.rs:19:15
--> $DIR/drop-impl-pred.rs:20:15
|
LL | for<H> H: Foo,
| ^^^
|
note: the implementor must specify the same requirement
--> $DIR/drop-impl-pred.rs:12:1
--> $DIR/drop-impl-pred.rs:13:1
|
LL | struct Bar<T>(T) where T: Foo;
| ^^^^^^^^^^^^^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// compile-flags: -Ztrait-solver=next
// revisions: no yes
//[yes] check-pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
--> $DIR/drop-impl-pred.rs:6:12
--> $DIR/drop-impl-pred.rs:7:12
|
LL | #![feature(non_lifetime_binders)]
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/traits/non_lifetime_binders/fail.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

// Error reporting for where `for<T> T: Trait` doesn't hold

#![feature(non_lifetime_binders)]
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/traits/non_lifetime_binders/foreach-partial-eq.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

Expand Down
2 changes: 2 additions & 0 deletions tests/ui/traits/non_lifetime_binders/late-bound-in-anon-ct.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

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

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

error: cannot capture late-bound type parameter in a constant
--> $DIR/late-bound-in-anon-ct.rs:7:27
--> $DIR/late-bound-in-anon-ct.rs:9:27
|
LL | for<T> [i32; { let _: T = todo!(); 0 }]:,
| - ^
Expand Down
1 change: 1 addition & 0 deletions tests/ui/traits/non_lifetime_binders/method-probe.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// compile-flags: -Ztrait-solver=next
// check-pass

#![feature(non_lifetime_binders)]
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/traits/non_lifetime_binders/missing-assoc-item.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

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

error[E0223]: ambiguous associated type
--> $DIR/missing-assoc-item.rs:6:12
--> $DIR/missing-assoc-item.rs:8:12
|
LL | for<B> B::Item: Send,
| ^^^^^^^
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// compile-flags: -Ztrait-solver=next

#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete

Expand Down
Loading

0 comments on commit c915474

Please sign in to comment.