diff --git a/src/librustc_trans/save/mod.rs b/src/librustc_trans/save/mod.rs index 7e7176d661c6..8e6e5590bbb3 100644 --- a/src/librustc_trans/save/mod.rs +++ b/src/librustc_trans/save/mod.rs @@ -44,7 +44,7 @@ use syntax::codemap::*; use syntax::parse::token::{self, get_ident, keywords}; use syntax::owned_slice::OwnedSlice; use syntax::visit::{self, Visitor}; -use syntax::print::pprust::{path_to_string,ty_to_string}; +use syntax::print::pprust::{path_to_string, ty_to_string}; use syntax::ptr::P; use self::span_utils::SpanUtils; @@ -123,7 +123,6 @@ impl <'l, 'tcx> DxrVisitor<'l, 'tcx> { let mut result: Vec<(Span, String)> = vec!(); - let mut segs = vec!(); for (seg, span) in path.segments.iter().zip(spans.iter()) { segs.push(seg.clone()); @@ -1568,8 +1567,7 @@ pub fn process_crate(sess: &Session, SpanUtils { sess: sess, err_count: Cell::new(0) - }, - cratename.clone()), + }), span: SpanUtils { sess: sess, err_count: Cell::new(0) diff --git a/src/librustc_trans/save/recorder.rs b/src/librustc_trans/save/recorder.rs index ef1eb3cb8048..0fb249eb6603 100644 --- a/src/librustc_trans/save/recorder.rs +++ b/src/librustc_trans/save/recorder.rs @@ -50,7 +50,6 @@ impl Recorder { pub struct FmtStrs<'a> { pub recorder: Box, span: SpanUtils<'a>, - krate: String, } macro_rules! s { ($e:expr) => { format!("{}", $e) }} @@ -92,11 +91,10 @@ pub enum Row { } impl<'a> FmtStrs<'a> { - pub fn new(rec: Box, span: SpanUtils<'a>, krate: String) -> FmtStrs<'a> { + pub fn new(rec: Box, span: SpanUtils<'a>) -> FmtStrs<'a> { FmtStrs { recorder: rec, span: span, - krate: krate, } } @@ -177,16 +175,7 @@ impl<'a> FmtStrs<'a> { }); let pairs = fields.iter().zip(values); - let strs = pairs.map(|(f, v)| format!(",{},\"{}\"", f, escape( - if *f == "qualname" && v.len() > 0 { - let mut n = self.krate.clone(); - n.push_str("::"); - n.push_str(v); - n - } else { - String::from_str(v) - } - ))); + let strs = pairs.map(|(f, v)| format!(",{},\"{}\"", f, escape(String::from_str(v)))); Some(strs.fold(String::new(), |mut s, ss| { s.push_str(&ss[]); s