Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d7cf428

Browse files
committedApr 1, 2025·
rarw
1 parent 1ca1154 commit d7cf428

File tree

141 files changed

+1185
-1046
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1185
-1046
lines changed
 

‎compiler/rustc_borrowck/messages.ftl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,6 @@ borrowck_opaque_type_lifetime_mismatch =
162162
.prev_lifetime_label = lifetime `{$prev}` previously used here
163163
.note = if all non-lifetime generic parameters are the same, but the lifetime parameters differ, it is not possible to differentiate the opaque types
164164
165-
borrowck_opaque_type_non_generic_param =
166-
expected generic {$kind} parameter, found `{$ty}`
167-
.label = {STREQ($ty, "'static") ->
168-
[true] cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
169-
*[other] this generic parameter must be used with a generic {$kind} parameter
170-
}
171-
172165
borrowck_partial_var_move_by_use_in_closure =
173166
variable {$is_partial ->
174167
[true] partially moved

‎compiler/rustc_borrowck/src/consumers.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! This file provides API for compiler consumers.
22
33
use rustc_hir::def_id::LocalDefId;
4-
use rustc_index::{IndexSlice, IndexVec};
4+
use rustc_index::IndexVec;
55
use rustc_middle::mir::{Body, Promoted};
66
use rustc_middle::ty::TyCtxt;
77

@@ -100,8 +100,5 @@ pub fn get_body_with_borrowck_facts(
100100
def: LocalDefId,
101101
options: ConsumerOptions,
102102
) -> BodyWithBorrowckFacts<'_> {
103-
let (input_body, promoted) = tcx.mir_promoted(def);
104-
let input_body: &Body<'_> = &input_body.borrow();
105-
let promoted: &IndexSlice<_, _> = &promoted.borrow();
106-
*super::do_mir_borrowck(tcx, input_body, promoted, Some(options)).1.unwrap()
103+
*super::do_mir_borrowck(tcx, def, Some(options)).1.unwrap()
107104
}

0 commit comments

Comments
 (0)
Please sign in to comment.