Skip to content

Commit

Permalink
Remove unused parameter in borrowck error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjasper committed May 21, 2019
1 parent df5d072 commit 8dc945c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/librustc_mir/borrow_check/conflict_errors.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc::hir;
use rustc::hir::def_id::DefId;
use rustc::middle::region::ScopeTree;
use rustc::mir::{
self, AggregateKind, BindingForm, BorrowKind, ClearCrossCrate, ConstraintCategory, Local,
LocalDecl, LocalKind, Location, Operand, Place, PlaceBase, PlaceProjection,
Expand Down Expand Up @@ -689,7 +688,6 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
);

let drop_span = place_span.1;
let scope_tree = self.infcx.tcx.region_scope_tree(self.mir_def_id);
let root_place = self.prefixes(&borrow.borrowed_place, PrefixSet::All)
.last()
.unwrap();
Expand Down Expand Up @@ -791,15 +789,13 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
(Some(name), explanation) => self.report_local_value_does_not_live_long_enough(
location,
&name,
&scope_tree,
&borrow,
drop_span,
borrow_spans,
explanation,
),
(None, explanation) => self.report_temporary_value_does_not_live_long_enough(
location,
&scope_tree,
&borrow,
drop_span,
borrow_spans,
Expand All @@ -815,17 +811,16 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
&mut self,
location: Location,
name: &str,
scope_tree: &'tcx ScopeTree,
borrow: &BorrowData<'tcx>,
drop_span: Span,
borrow_spans: UseSpans,
explanation: BorrowExplanation,
) -> DiagnosticBuilder<'cx> {
debug!(
"report_local_value_does_not_live_long_enough(\
{:?}, {:?}, {:?}, {:?}, {:?}, {:?}\
{:?}, {:?}, {:?}, {:?}, {:?}\
)",
location, name, scope_tree, borrow, drop_span, borrow_spans
location, name, borrow, drop_span, borrow_spans
);

let borrow_span = borrow_spans.var_or_use();
Expand Down Expand Up @@ -1007,7 +1002,6 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
fn report_temporary_value_does_not_live_long_enough(
&mut self,
location: Location,
scope_tree: &'tcx ScopeTree,
borrow: &BorrowData<'tcx>,
drop_span: Span,
borrow_spans: UseSpans,
Expand All @@ -1016,9 +1010,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
) -> DiagnosticBuilder<'cx> {
debug!(
"report_temporary_value_does_not_live_long_enough(\
{:?}, {:?}, {:?}, {:?}, {:?}\
{:?}, {:?}, {:?}, {:?}\
)",
location, scope_tree, borrow, drop_span, proper_span
location, borrow, drop_span, proper_span
);

if let BorrowExplanation::MustBeValidFor {
Expand Down

0 comments on commit 8dc945c

Please sign in to comment.