Skip to content

Commit 6c75757

Browse files
authored
Rollup merge of #113036 - TaKO8Ki:fix-112094, r=compiler-errors
Accept `ReStatic` for RPITIT Fixes #112094 Regression in 8216b7f If there is a better suggestion, I will go with that.
2 parents d7723f4 + 83722c6 commit 6c75757

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

compiler/rustc_hir_analysis/src/check/wfcheck.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for ImplTraitInTraitFinder<'_, 'tcx> {
15491549
{
15501550
let opaque_ty = tcx.fold_regions(unshifted_opaque_ty, |re, _depth| {
15511551
match re.kind() {
1552-
ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReError(_) => re,
1552+
ty::ReEarlyBound(_) | ty::ReFree(_) | ty::ReError(_) | ty::ReStatic => re,
15531553
r => bug!("unexpected region: {r:?}"),
15541554
}
15551555
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// check-pass
2+
3+
#![allow(incomplete_features)]
4+
#![feature(adt_const_params, return_position_impl_trait_in_trait)]
5+
6+
pub struct Element;
7+
8+
pub trait Node {
9+
fn elements<const T: &'static str>(&self) -> impl Iterator<Item = Element>;
10+
}
11+
12+
fn main() {}

0 commit comments

Comments
 (0)