]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Remove obsolete error_out_of_root_scope variant
authorFlavio Percoco <flaper87@gmail.com>
Wed, 16 Apr 2014 23:00:00 +0000 (01:00 +0200)
committerFlavio Percoco <flaper87@gmail.com>
Wed, 23 Apr 2014 16:19:40 +0000 (18:19 +0200)
src/librustc/middle/borrowck/mod.rs

index cadb3a3fea447f42c1fe3a8d163a165878319ca6..47aa7907b5ab0986db14dd0becede8a6a0c82f99 100644 (file)
@@ -334,7 +334,6 @@ fn repr(&self, _tcx: &ty::ctxt) -> ~str {
 #[deriving(Eq)]
 pub enum bckerr_code {
     err_mutbl,
-    err_out_of_root_scope(ty::Region, ty::Region), // superscope, subscope
     err_out_of_scope(ty::Region, ty::Region), // superscope, subscope
     err_borrowed_pointer_too_short(
         ty::Region, ty::Region, RestrictionSet), // loan, ptr
@@ -616,9 +615,6 @@ pub fn bckerr_to_str(&self, err: &BckError) -> ~str {
                     }
                 }
             }
-            err_out_of_root_scope(..) => {
-                format!("cannot root managed value long enough")
-            }
             err_out_of_scope(..) => {
                 let msg = match opt_loan_path(&err.cmt) {
                     None => format!("borrowed value"),
@@ -694,19 +690,6 @@ pub fn note_and_explain_bckerr(&self, err: BckError) {
         match code {
             err_mutbl(..) => { }
 
-            err_out_of_root_scope(super_scope, sub_scope) => {
-                note_and_explain_region(
-                    self.tcx,
-                    "managed value would have to be rooted for ",
-                    sub_scope,
-                    "...");
-                note_and_explain_region(
-                    self.tcx,
-                    "...but can only be rooted for ",
-                    super_scope,
-                    "");
-            }
-
             err_out_of_scope(super_scope, sub_scope) => {
                 note_and_explain_region(
                     self.tcx,