Fix fallout in rustdoc and tests.
This commit is contained in:
@@ -871,6 +871,7 @@ impl CodeMapper for CodeMap {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use symbol::keywords;
|
||||
use std::rc::Rc;
|
||||
|
||||
#[test]
|
||||
@@ -1097,10 +1098,9 @@ mod tests {
|
||||
#[test]
|
||||
fn t11() {
|
||||
// Test span_to_expanded_string works with expansion
|
||||
use ast::Name;
|
||||
let cm = init_code_map();
|
||||
let root = Span { lo: BytePos(0), hi: BytePos(11), expn_id: NO_EXPANSION };
|
||||
let format = ExpnFormat::MacroBang(Name(0u32));
|
||||
let format = ExpnFormat::MacroBang(keywords::Invalid.name());
|
||||
let callee = NameAndSpan { format: format,
|
||||
allow_internal_unstable: false,
|
||||
span: None };
|
||||
@@ -1197,11 +1197,9 @@ mod tests {
|
||||
fn init_expansion_chain(cm: &CodeMap) -> Span {
|
||||
// Creates an expansion chain containing two recursive calls
|
||||
// root -> expA -> expA -> expB -> expB -> end
|
||||
use ast::Name;
|
||||
|
||||
let root = Span { lo: BytePos(0), hi: BytePos(11), expn_id: NO_EXPANSION };
|
||||
|
||||
let format_root = ExpnFormat::MacroBang(Name(0u32));
|
||||
let format_root = ExpnFormat::MacroBang(keywords::Invalid.name());
|
||||
let callee_root = NameAndSpan { format: format_root,
|
||||
allow_internal_unstable: false,
|
||||
span: Some(root) };
|
||||
@@ -1210,7 +1208,7 @@ mod tests {
|
||||
let id_a1 = cm.record_expansion(info_a1);
|
||||
let span_a1 = Span { lo: BytePos(12), hi: BytePos(23), expn_id: id_a1 };
|
||||
|
||||
let format_a = ExpnFormat::MacroBang(Name(1u32));
|
||||
let format_a = ExpnFormat::MacroBang(keywords::As.name());
|
||||
let callee_a = NameAndSpan { format: format_a,
|
||||
allow_internal_unstable: false,
|
||||
span: Some(span_a1) };
|
||||
@@ -1223,7 +1221,7 @@ mod tests {
|
||||
let id_b1 = cm.record_expansion(info_b1);
|
||||
let span_b1 = Span { lo: BytePos(25), hi: BytePos(36), expn_id: id_b1 };
|
||||
|
||||
let format_b = ExpnFormat::MacroBang(Name(2u32));
|
||||
let format_b = ExpnFormat::MacroBang(keywords::Box.name());
|
||||
let callee_b = NameAndSpan { format: format_b,
|
||||
allow_internal_unstable: false,
|
||||
span: None };
|
||||
|
||||
Reference in New Issue
Block a user