review + fix CI

This commit is contained in:
lcnr 2023-11-14 13:41:28 +00:00
parent 15f21562e6
commit 8fcbd1991f
3 changed files with 4 additions and 4 deletions

View File

@ -87,8 +87,8 @@ impl<'tcx> FreeRegionMap<'tcx> {
r_b: Region<'tcx>, r_b: Region<'tcx>,
) -> Region<'tcx> { ) -> Region<'tcx> {
debug!("lub_param_regions(r_a={:?}, r_b={:?})", r_a, r_b); debug!("lub_param_regions(r_a={:?}, r_b={:?})", r_a, r_b);
assert!(r_a.is_late_or_early_param()); assert!(r_a.is_param());
assert!(r_b.is_late_or_early_param()); assert!(r_b.is_param());
let result = if r_a == r_b { let result = if r_a == r_b {
r_a r_a
} else { } else {

View File

@ -1858,7 +1858,7 @@ impl<'tcx> Region<'tcx> {
} }
/// True for free regions other than `'static`. /// True for free regions other than `'static`.
pub fn is_late_or_early_param(self) -> bool { pub fn is_param(self) -> bool {
matches!(*self, ty::ReEarlyParam(_) | ty::ReLateParam(_)) matches!(*self, ty::ReEarlyParam(_) | ty::ReLateParam(_))
} }

View File

@ -11,7 +11,7 @@ LL | x
help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyParam(DefId(0:14 ~ impl_trait_captures[aeb9]::foo::{opaque#0}::'a), 2, 'a)])` captures `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))`, you can add an explicit `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))` lifetime bound help: to declare that `Opaque(DefId(0:13 ~ impl_trait_captures[aeb9]::foo::{opaque#0}), [ReEarlyParam(DefId(0:9 ~ impl_trait_captures[aeb9]::foo::'a), 0, 'a), T, ReEarlyParam(DefId(0:14 ~ impl_trait_captures[aeb9]::foo::{opaque#0}::'a), 2, 'a)])` captures `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))`, you can add an explicit `ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_))` lifetime bound
| |
LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> + ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) { LL | fn foo<'a, T>(x: &T) -> impl Foo<'a> + ReLateParam(DefId(0:8 ~ impl_trait_captures[aeb9]::foo), BrNamed(DefId(0:12 ~ impl_trait_captures[aeb9]::foo::'_), '_)) {
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
error: aborting due to previous error error: aborting due to previous error