mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
review + fix CI
This commit is contained in:
parent
15f21562e6
commit
8fcbd1991f
@ -87,8 +87,8 @@ impl<'tcx> FreeRegionMap<'tcx> {
|
||||
r_b: Region<'tcx>,
|
||||
) -> Region<'tcx> {
|
||||
debug!("lub_param_regions(r_a={:?}, r_b={:?})", r_a, r_b);
|
||||
assert!(r_a.is_late_or_early_param());
|
||||
assert!(r_b.is_late_or_early_param());
|
||||
assert!(r_a.is_param());
|
||||
assert!(r_b.is_param());
|
||||
let result = if r_a == r_b {
|
||||
r_a
|
||||
} else {
|
||||
|
@ -1858,7 +1858,7 @@ impl<'tcx> Region<'tcx> {
|
||||
}
|
||||
|
||||
/// 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(_))
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user