Skip to content

Commit 8fcbd19

Browse files
committed
review + fix CI
1 parent 15f2156 commit 8fcbd19

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_infer/src/infer/free_regions.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ impl<'tcx> FreeRegionMap<'tcx> {
8787
r_b: Region<'tcx>,
8888
) -> Region<'tcx> {
8989
debug!("lub_param_regions(r_a={:?}, r_b={:?})", r_a, r_b);
90-
assert!(r_a.is_late_or_early_param());
91-
assert!(r_b.is_late_or_early_param());
90+
assert!(r_a.is_param());
91+
assert!(r_b.is_param());
9292
let result = if r_a == r_b {
9393
r_a
9494
} else {

compiler/rustc_middle/src/ty/sty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ impl<'tcx> Region<'tcx> {
18581858
}
18591859

18601860
/// True for free regions other than `'static`.
1861-
pub fn is_late_or_early_param(self) -> bool {
1861+
pub fn is_param(self) -> bool {
18621862
matches!(*self, ty::ReEarlyParam(_) | ty::ReLateParam(_))
18631863
}
18641864

tests/ui/nll/ty-outlives/impl-trait-captures.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | x
1111
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
1212
|
1313
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::'_), '_)) {
14-
| ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14+
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1515

1616
error: aborting due to previous error
1717

0 commit comments

Comments
 (0)