Rollup merge of #113036 - TaKO8Ki:fix-112094, r=compiler-errors
Accept `ReStatic` for RPITIT
Fixes #112094
Regression in 8216b7f229
If there is a better suggestion, I will go with that.
This commit is contained in:
commit
6c7575721f
@ -1549,7 +1549,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
|
|||||||
{
|
{
|
||||||
let opaque_ty = tcx.fold_regions(unshifted_opaque_ty, |re, _depth| {
|
let opaque_ty = tcx.fold_regions(unshifted_opaque_ty, |re, _depth| {
|
||||||
match re.kind() {
|
match re.kind() {
|
||||||
ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReError(_) => re,
|
ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReError(_) | ty::ReStatic => re,
|
||||||
r => bug!("unexpected region: {r:?}"),
|
r => bug!("unexpected region: {r:?}"),
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
// check-pass
|
||||||
|
|
||||||
|
#![allow(incomplete_features)]
|
||||||
|
#![feature(adt_const_params, return_position_impl_trait_in_trait)]
|
||||||
|
|
||||||
|
pub struct Element;
|
||||||
|
|
||||||
|
pub trait Node {
|
||||||
|
fn elements<const T: &'static str>(&self) -> impl Iterator<Item = Element>;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {}
|
Loading…
x
Reference in New Issue
Block a user