Don't use compat versions of implied bounds in ImpliedOutlivesBounds query
This commit is contained in:
parent
acab76573f
commit
a9e30e6cdf
@ -48,14 +48,14 @@ fn perform_query(
|
||||
param_env.and(ty)
|
||||
});
|
||||
|
||||
tcx.implied_outlives_bounds_compat(canonicalized)
|
||||
tcx.implied_outlives_bounds(canonicalized)
|
||||
}
|
||||
|
||||
fn perform_locally_with_next_solver(
|
||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||
key: ParamEnvAnd<'tcx, Self>,
|
||||
) -> Result<Self::QueryResponse, NoSolution> {
|
||||
compute_implied_outlives_bounds_compat_inner(ocx, key.param_env, key.value.ty)
|
||||
compute_implied_outlives_bounds_inner(ocx, key.param_env, key.value.ty)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,5 +10,6 @@ impl<'a> Foo<fn(&'a ())> {
|
||||
fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
|
||||
//~^ ERROR higher-ranked subtype error
|
||||
//~| ERROR higher-ranked subtype error
|
||||
//~| ERROR higher-ranked subtype error
|
||||
|
||||
fn main() {}
|
||||
|
@ -12,5 +12,13 @@ LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-111404-1.rs:10:1
|
||||
|
|
||||
LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
error: lifetime may not live long enough
|
||||
--> $DIR/normalization-nested.rs:38:5
|
||||
|
|
||||
LL | pub fn test_borrowck<'x>(_: Map<Vec<&'x ()>>, s: &'x str) -> &'static str {
|
||||
| -- lifetime `'x` defined here
|
||||
LL | s
|
||||
| ^ returning this value requires that `'x` must outlive `'static`
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
@ -1,11 +1,8 @@
|
||||
// Test for normalization of projections that appear in the item bounds
|
||||
// (versus those that appear directly in the input types).
|
||||
// Both revisions should pass. `lifetime` revision is a bug.
|
||||
//
|
||||
// revisions: param_ty lifetime
|
||||
// [param_ty] check-pass
|
||||
// [lifetime] check-fail
|
||||
// [lifetime] known-bug: #109799
|
||||
// check-pass
|
||||
|
||||
pub trait Iter {
|
||||
type Item;
|
||||
|
@ -1,4 +1,12 @@
|
||||
// check-pass
|
||||
// This should not pass, because `usize: Fsm` does not hold. However, it currently ICEs.
|
||||
|
||||
// check-fail
|
||||
// known-bug: #80409
|
||||
// failure-status: 101
|
||||
// normalize-stderr-test "note: .*\n\n" -> ""
|
||||
// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
|
||||
// normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
|
||||
// rustc-env:RUST_BACKTRACE=0
|
||||
|
||||
#![allow(unreachable_code, unused)]
|
||||
|
||||
|
6
tests/ui/inference/issue-80409.stderr
Normal file
6
tests/ui/inference/issue-80409.stderr
Normal file
@ -0,0 +1,6 @@
|
||||
error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ImpliedOutlivesBounds { ty: &'?2 mut StateContext<'?3, usize> } }
|
||||
|
|
||||
= query stack during panic:
|
||||
end of query stack
|
||||
error: aborting due to 1 previous error
|
||||
|
Loading…
Reference in New Issue
Block a user