File tree Expand file tree Collapse file tree 3 files changed +1
-11
lines changed
src/librustc/middle/borrowck Expand file tree Collapse file tree 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> {
222222 let illegal_if = match loan2. mutbl {
223223 MutableMutability => RESTR_ALIAS | RESTR_FREEZE | RESTR_CLAIM ,
224224 ImmutableMutability => RESTR_ALIAS | RESTR_FREEZE ,
225- ConstMutability => RESTR_ALIAS ,
226225 } ;
227226 debug ! ( "illegal_if={:?}" , illegal_if) ;
228227
@@ -598,8 +597,7 @@ impl<'a> CheckLoanCtxt<'a> {
598597
599598 // Check for a non-const loan of `loan_path`
600599 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 {
603601 this. report_illegal_mutation ( expr,
604602 full_loan_path,
605603 loan) ;
Original file line number Diff line number Diff line change @@ -568,11 +568,6 @@ impl<'a> GatherLoanCtxt<'a> {
568568 //! Implements the M-* rules in doc.rs.
569569
570570 match req_mutbl {
571- ConstMutability => {
572- // Data of any mutability can be lent as const.
573- Ok ( ( ) )
574- }
575-
576571 ImmutableMutability => {
577572 // both imm and mut data can be lent as imm;
578573 // for mutable data, this is a freeze
@@ -596,7 +591,6 @@ impl<'a> GatherLoanCtxt<'a> {
596591 pub fn restriction_set ( & self , req_mutbl : LoanMutability )
597592 -> RestrictionSet {
598593 match req_mutbl {
599- ConstMutability => RESTR_EMPTY ,
600594 ImmutableMutability => RESTR_EMPTY | RESTR_MUTATE | RESTR_CLAIM ,
601595 MutableMutability => {
602596 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 {
214214#[ deriving( Clone , Eq ) ]
215215pub enum LoanMutability {
216216 ImmutableMutability ,
217- ConstMutability ,
218217 MutableMutability ,
219218}
220219
@@ -232,7 +231,6 @@ impl ToStr for LoanMutability {
232231 fn to_str ( & self ) -> ~str {
233232 match * self {
234233 ImmutableMutability => ~"immutable",
235- ConstMutability => ~"read-only",
236234 MutableMutability => ~"mutable",
237235 }
238236 }
You can’t perform that action at this time.
0 commit comments