Skip to content

Commit 9934759

Browse files
author
Cameron Zwarich
committed
Remove an unused bkcerr_code constructor parameter
The RestrictionSet parameter of the err_borrowed_pointer_too_short constructor isn't actually used, so it can be removed.
1 parent 6849362 commit 9934759

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl<'a> RestrictionsContext<'a> {
133133
cause: self.cause,
134134
cmt: cmt_base,
135135
code: err_borrowed_pointer_too_short(
136-
self.loan_region, lt, restrictions)});
136+
self.loan_region, lt)});
137137
return Safe;
138138
}
139139
Safe
@@ -148,7 +148,7 @@ impl<'a> RestrictionsContext<'a> {
148148
cause: self.cause,
149149
cmt: cmt_base,
150150
code: err_borrowed_pointer_too_short(
151-
self.loan_region, lt, restrictions)});
151+
self.loan_region, lt)});
152152
return Safe;
153153
}
154154

src/librustc/middle/borrowck/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ impl Repr for RestrictionSet {
310310
pub enum bckerr_code {
311311
err_mutbl,
312312
err_out_of_scope(ty::Region, ty::Region), // superscope, subscope
313-
err_borrowed_pointer_too_short(
314-
ty::Region, ty::Region, RestrictionSet), // loan, ptr
313+
err_borrowed_pointer_too_short(ty::Region, ty::Region), // loan, ptr
315314
}
316315

317316
// Combination of an error code and the categorization of the expression
@@ -711,7 +710,7 @@ impl<'a> BorrowckCtxt<'a> {
711710
suggestion);
712711
}
713712

714-
err_borrowed_pointer_too_short(loan_scope, ptr_scope, _) => {
713+
err_borrowed_pointer_too_short(loan_scope, ptr_scope) => {
715714
let descr = match opt_loan_path(&err.cmt) {
716715
Some(lp) => {
717716
format!("`{}`", self.loan_path_to_str(&*lp))

0 commit comments

Comments
 (0)