Skip to content

Commit c4971f9

Browse files
committed
rename ReLateBound to ReBound
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
1 parent 67cc4b0 commit c4971f9

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

clippy_lints/src/eta_reduction.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ fn check_sig<'tcx>(cx: &LateContext<'tcx>, closure: ClosureArgs<'tcx>, call_sig:
247247
/// This is needed because rustc is unable to late bind early-bound regions in a function signature.
248248
fn has_late_bound_to_non_late_bound_regions(from_sig: FnSig<'_>, to_sig: FnSig<'_>) -> bool {
249249
fn check_region(from_region: Region<'_>, to_region: Region<'_>) -> bool {
250-
matches!(from_region.kind(), RegionKind::ReLateBound(..))
251-
&& !matches!(to_region.kind(), RegionKind::ReLateBound(..))
250+
matches!(from_region.kind(), RegionKind::ReBound(..))
251+
&& !matches!(to_region.kind(), RegionKind::ReBound(..))
252252
}
253253

254254
fn check_subs(from_subs: &[GenericArg<'_>], to_subs: &[GenericArg<'_>]) -> bool {

clippy_lints/src/pass_by_ref_or_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl<'tcx> PassByRefOrValue {
168168
match *ty.skip_binder().kind() {
169169
ty::Ref(lt, ty, Mutability::Not) => {
170170
match lt.kind() {
171-
RegionKind::ReLateBound(index, region)
171+
RegionKind::ReBound(index, region)
172172
if index.as_u32() == 0 && output_regions.contains(&region) =>
173173
{
174174
continue;

clippy_lints/src/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ fn check_fn_args<'cx, 'tcx: 'cx>(
466466
.filter_map(|arg| {
467467
arg.as_region().and_then(|lifetime| match lifetime.kind() {
468468
ty::ReEarlyBound(r) => Some(r.def_id),
469-
ty::ReLateBound(_, r) => r.kind.get_id(),
469+
ty::ReBound(_, r) => r.kind.get_id(),
470470
ty::ReFree(r) => r.bound_region.get_id(),
471471
ty::ReStatic
472472
| ty::ReVar(_)

clippy_utils/src/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ pub fn for_each_top_level_late_bound_region<B>(
890890
impl<'tcx, B, F: FnMut(BoundRegion) -> ControlFlow<B>> TypeVisitor<TyCtxt<'tcx>> for V<F> {
891891
type BreakTy = B;
892892
fn visit_region(&mut self, r: Region<'tcx>) -> ControlFlow<Self::BreakTy> {
893-
if let RegionKind::ReLateBound(idx, bound) = r.kind()
893+
if let RegionKind::ReBound(idx, bound) = r.kind()
894894
&& idx.as_u32() == self.index
895895
{
896896
(self.f)(bound)

0 commit comments

Comments
 (0)