mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
rustc: Remove obsolete error_out_of_root_scope variant
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user