File tree 3 files changed +1
-11
lines changed
src/librustc/middle/borrowck
3 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,6 @@ impl<'a> CheckLoanCtxt<'a> {
222
222
let illegal_if = match loan2. mutbl {
223
223
MutableMutability => RESTR_ALIAS | RESTR_FREEZE | RESTR_CLAIM ,
224
224
ImmutableMutability => RESTR_ALIAS | RESTR_FREEZE ,
225
- ConstMutability => RESTR_ALIAS ,
226
225
} ;
227
226
debug ! ( "illegal_if={:?}" , illegal_if) ;
228
227
@@ -598,8 +597,7 @@ impl<'a> CheckLoanCtxt<'a> {
598
597
599
598
// Check for a non-const loan of `loan_path`
600
599
let cont = this. each_in_scope_loan ( expr. id , |loan| {
601
- if loan. loan_path == loan_path &&
602
- loan. mutbl != ConstMutability {
600
+ if loan. loan_path == loan_path {
603
601
this. report_illegal_mutation ( expr,
604
602
full_loan_path,
605
603
loan) ;
Original file line number Diff line number Diff line change @@ -568,11 +568,6 @@ impl<'a> GatherLoanCtxt<'a> {
568
568
//! Implements the M-* rules in doc.rs.
569
569
570
570
match req_mutbl {
571
- ConstMutability => {
572
- // Data of any mutability can be lent as const.
573
- Ok ( ( ) )
574
- }
575
-
576
571
ImmutableMutability => {
577
572
// both imm and mut data can be lent as imm;
578
573
// for mutable data, this is a freeze
@@ -596,7 +591,6 @@ impl<'a> GatherLoanCtxt<'a> {
596
591
pub fn restriction_set ( & self , req_mutbl : LoanMutability )
597
592
-> RestrictionSet {
598
593
match req_mutbl {
599
- ConstMutability => RESTR_EMPTY ,
600
594
ImmutableMutability => RESTR_EMPTY | RESTR_MUTATE | RESTR_CLAIM ,
601
595
MutableMutability => {
602
596
RESTR_EMPTY | RESTR_MUTATE | RESTR_CLAIM | RESTR_FREEZE
Original file line number Diff line number Diff line change @@ -214,7 +214,6 @@ pub enum PartialTotal {
214
214
#[ deriving( Clone , Eq ) ]
215
215
pub enum LoanMutability {
216
216
ImmutableMutability ,
217
- ConstMutability ,
218
217
MutableMutability ,
219
218
}
220
219
@@ -232,7 +231,6 @@ impl ToStr for LoanMutability {
232
231
fn to_str ( & self ) -> ~str {
233
232
match * self {
234
233
ImmutableMutability => ~"immutable",
235
- ConstMutability => ~"read-only",
236
234
MutableMutability => ~"mutable",
237
235
}
238
236
}
You can’t perform that action at this time.
0 commit comments