Skip to content

Commit ae0dadf

Browse files
committed
rustc stage2 bootstrap cleanup: Remove unused imports and bindings.
As a drive-by, fix the prefix used for the emitted message when `explain_region_and_span` encounters a `DestructionScope`.
1 parent 700cf12 commit ae0dadf

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

src/librustc/middle/typeck/check/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ use middle::{const_eval, def, traits};
8787
use middle::lang_items::IteratorItem;
8888
use middle::mem_categorization::{mod, McResult};
8989
use middle::pat_util::{mod, pat_id_map};
90-
use middle::region::{mod, CodeExtent};
90+
use middle::region::{CodeExtent};
9191
use middle::subst::{mod, Subst, Substs, VecPerParamSpace, ParamSpace};
9292
use middle::ty::{FnSig, VariantInfo, Polytype};
9393
use middle::ty::{Disr, ParamTy, ParameterEnvironment};

src/librustc/middle/typeck/check/regionck.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ and report an error, and it just seems like more mess in the end.)
121121
use middle::def;
122122
use middle::mem_categorization as mc;
123123
use middle::region::CodeExtent;
124-
use middle::subst;
125124
use middle::traits;
126125
use middle::ty::{ReScope};
127126
use middle::ty::{mod, Ty};

src/librustc/middle/typeck/check/wf.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
use middle::region;
12-
use middle::subst;
1312
use middle::subst::{Subst};
1413
use middle::traits;
1514
use middle::ty::{mod, Ty};
@@ -23,7 +22,6 @@ use util::ppaux::Repr;
2322
use std::collections::HashSet;
2423
use syntax::ast;
2524
use syntax::ast_util::{local_def};
26-
use syntax::attr;
2725
use syntax::codemap::Span;
2826
use syntax::visit;
2927
use syntax::visit::Visitor;

src/librustc/util/ppaux.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ pub fn explain_region_and_span(cx: &ctxt, region: ty::Region)
8989
ReScope(scope @ CodeExtent::Closure(_)) |
9090
ReScope(scope @ CodeExtent::DestructionScope(_)) => {
9191
let node_id = scope.node_id();
92-
let prefix = if let CodeExtent::DestructionScope(dtor_id) = scope {
93-
"destruction scope surrounding"
92+
let prefix = if let CodeExtent::DestructionScope(_) = scope {
93+
"destruction scope surrounding "
9494
} else {
9595
""
9696
};
@@ -925,7 +925,7 @@ impl<'tcx> Repr<'tcx> for ty::FreeRegion {
925925
}
926926

927927
impl<'tcx> Repr<'tcx> for region::CodeExtent {
928-
fn repr(&self, tcx: &ctxt) -> String {
928+
fn repr(&self, _: &ctxt) -> String {
929929
match *self {
930930
region::CodeExtent::Misc(node_id) =>
931931
format!("Misc({})", node_id),

0 commit comments

Comments
 (0)