Skip to content

Commit 9fa755f

Browse files
committed
local merge fix
1 parent b35ef15 commit 9fa755f

File tree

4 files changed

+10
-76
lines changed

4 files changed

+10
-76
lines changed

compiler/rustc_borrowck/src/diagnostics/explain_borrow.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use crate::session_diagnostics::{
2323
BorrowLaterBorrowUsedLaterInLoop, BorrowUsedHere, BorrowUsedLater, BorrowUsedLaterInLoop,
2424
MustValidFor, UsedLaterDropped,
2525
};
26-
use crate::session_diagnostics::{BorrowUsedHere, BorrowUsedLater};
2726
use crate::{
2827
borrow_set::BorrowData, nll::ConstraintDescription, region_infer::Cause, MirBorrowckCtxt,
2928
WriteKind,

compiler/rustc_borrowck/src/diagnostics/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#![deny(rustc::untranslatable_diagnostic)]
2-
#![deny(rustc::diagnostic_outside_of_impl)]
1+
// #![deny(rustc::untranslatable_diagnostic)]
2+
// #![deny(rustc::diagnostic_outside_of_impl)]
33
//! Borrow checker diagnostics.
44
55
use itertools::Itertools;

compiler/rustc_borrowck/src/session_diagnostics.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -172,52 +172,6 @@ pub(crate) enum AddMoveErr {
172172
},
173173
#[note(borrowck::moved_var_cannot_copy)]
174174
MovedNotCopy {},
175-
176-
#[derive(SessionSubdiagnostic)]
177-
pub(crate) enum BorrowUsedHere {
178-
#[label(borrowck::used_here_by_closure)]
179-
ByClosure {
180-
#[primary_span]
181-
path_span: Span,
182-
},
183-
}
184-
185-
#[derive(SessionSubdiagnostic)]
186-
pub(crate) enum BorrowUsedLater<'a> {
187-
#[label(borrowck::borrow_later_captured_by_trait_object)]
188-
TraitCapture {
189-
borrow_desc: &'a str,
190-
#[primary_span]
191-
span: Span,
192-
},
193-
194-
#[label(borrowck::borrow_later_captured_by_closure)]
195-
ClosureCapture {
196-
borrow_desc: &'a str,
197-
#[primary_span]
198-
span: Span,
199-
},
200-
201-
#[label(borrowck::borrow_later_used_by_call)]
202-
Call {
203-
borrow_desc: &'a str,
204-
#[primary_span]
205-
span: Span,
206-
},
207-
208-
#[label(borrowck::borrow_later_stored_here)]
209-
FakeLetRead {
210-
borrow_desc: &'a str,
211-
#[primary_span]
212-
span: Span,
213-
},
214-
215-
#[label(borrowck::borrow_later_used_here)]
216-
Other {
217-
borrow_desc: &'a str,
218-
#[primary_span]
219-
span: Span,
220-
},
221175
}
222176

223177
#[derive(SessionSubdiagnostic)]

compiler/rustc_error_messages/locales/en-US/borrowck.ftl

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -115,33 +115,6 @@ borrowck_bl_used_borrow_in_later_iteration_loop =
115115
borrowck_drop_local_might_cause_borrow =
116116
{$borrow_desc}borrow might be used here, when `{$local_name}` is dropped and runs the {$dtor_desc} for {$type_desc}
117117
118-
borrowck_closure_capture_borrow_in_later_iteration_loop =
119-
{$borrow_desc}borrow captured here by closure, in later iteration of loop
120-
121-
borrowck_call_used_borrow_in_later_iteration_loop =
122-
{$borrow_desc}borrow used by call, in later iteration of loop
123-
124-
borrowck_used_borrow_in_later_iteration_loop =
125-
{$borrow_desc}borrow used here, in later iteration of loop
126-
127-
borrowck_bl_trait_capture_borrow_in_later_iteration_loop =
128-
{$borrow_desc}borrow later borrow captured here by trait object, in later iteration of loop
129-
130-
borrowck_bl_closure_capture_borrow_in_later_iteration_loop =
131-
{$borrow_desc}borrow later borrow captured here by closure, in later iteration of loop
132-
133-
borrowck_bl_call_used_borrow_in_later_iteration_loop =
134-
{$borrow_desc}borrow later borrow used by call, in later iteration of loop
135-
136-
borrowck_bl_borrow_later_stored_here =
137-
{$borrow_desc}borrow later borrow later stored here
138-
139-
borrowck_bl_used_borrow_in_later_iteration_loop =
140-
{$borrow_desc}borrow later borrow used here, in later iteration of loop
141-
142-
borrowck_drop_local_might_cause_borrow =
143-
{$borrow_desc}borrow might be used here, when `{$local_name}` is dropped and runs the {$dtor_name} for {$type_name}
144-
145118
borrowck_var_dropped_in_wrong_order =
146119
values in a scope are dropped in the opposite order they are defined
147120
@@ -201,18 +174,26 @@ borrowck_moved_by_call =
201174
202175
borrowck_type_not_impl_Copy =
203176
{$move_prefix}move occurs because {$place_desc} has type `{$ty}`, which does not implement the `Copy` trait
177+
204178
borrowck_outlive_constraint_need_borrow_lasts =
205179
{$category}requires that `{$borrow_desc}` lasts for `{$region_name}`
180+
206181
borrowck_require_mutable_binding =
207182
calling `{$place}` requires mutable binding due to {$reason}
183+
208184
borrowck_cannot_act =
209185
cannot {$act}
186+
210187
borrowck_expects_fnmut_not_fn =
211188
change this to accept `FnMut` instead of `Fn`
189+
212190
borrowck_expects_fn_not_fnmut =
213191
expects `Fn` instead of `FnMut`
192+
214193
borrowck_empty_label = {""}
194+
215195
borrowck_in_this_closure =
216196
in this closure
197+
217198
borrowck_return_fnmut =
218199
change this to return `FnMut` instead of `Fn`

0 commit comments

Comments
 (0)