Skip to content

Commit a9e30e6

Browse files
committed
Don't use compat versions of implied bounds in ImpliedOutlivesBounds query
1 parent acab765 commit a9e30e6

File tree

7 files changed

+28
-18
lines changed

7 files changed

+28
-18
lines changed

compiler/rustc_trait_selection/src/traits/query/type_op/implied_outlives_bounds.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ImpliedOutlivesBounds<'tcx> {
4848
param_env.and(ty)
4949
});
5050

51-
tcx.implied_outlives_bounds_compat(canonicalized)
51+
tcx.implied_outlives_bounds(canonicalized)
5252
}
5353

5454
fn perform_locally_with_next_solver(
5555
ocx: &ObligationCtxt<'_, 'tcx>,
5656
key: ParamEnvAnd<'tcx, Self>,
5757
) -> Result<Self::QueryResponse, NoSolution> {
58-
compute_implied_outlives_bounds_compat_inner(ocx, key.param_env, key.value.ty)
58+
compute_implied_outlives_bounds_inner(ocx, key.param_env, key.value.ty)
5959
}
6060
}
6161

tests/ui/associated-inherent-types/issue-111404-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ impl<'a> Foo<fn(&'a ())> {
1010
fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
1111
//~^ ERROR higher-ranked subtype error
1212
//~| ERROR higher-ranked subtype error
13+
//~| ERROR higher-ranked subtype error
1314

1415
fn main() {}

tests/ui/associated-inherent-types/issue-111404-1.stderr

+9-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,13 @@ LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
1212
|
1313
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1414

15-
error: aborting due to 2 previous errors
15+
error: higher-ranked subtype error
16+
--> $DIR/issue-111404-1.rs:10:1
17+
|
18+
LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
19+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20+
|
21+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
22+
23+
error: aborting due to 3 previous errors
1624

tests/ui/implied-bounds/normalization-nested.lifetime.stderr

-10
This file was deleted.

tests/ui/implied-bounds/normalization-nested.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
// Test for normalization of projections that appear in the item bounds
22
// (versus those that appear directly in the input types).
3-
// Both revisions should pass. `lifetime` revision is a bug.
43
//
54
// revisions: param_ty lifetime
6-
// [param_ty] check-pass
7-
// [lifetime] check-fail
8-
// [lifetime] known-bug: #109799
5+
// check-pass
96

107
pub trait Iter {
118
type Item;

tests/ui/inference/issue-80409.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
// check-pass
1+
// This should not pass, because `usize: Fsm` does not hold. However, it currently ICEs.
2+
3+
// check-fail
4+
// known-bug: #80409
5+
// failure-status: 101
6+
// normalize-stderr-test "note: .*\n\n" -> ""
7+
// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
8+
// normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
9+
// rustc-env:RUST_BACKTRACE=0
210

311
#![allow(unreachable_code, unused)]
412

tests/ui/inference/issue-80409.stderr

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ImpliedOutlivesBounds { ty: &'?2 mut StateContext<'?3, usize> } }
2+
|
3+
= query stack during panic:
4+
end of query stack
5+
error: aborting due to 1 previous error
6+

0 commit comments

Comments
 (0)