diff options
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/format.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/highlight.rs | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index a1dd49bbf89..37349388588 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -545,7 +545,7 @@ impl fmt::Show for clean::ViewPath { if *name == src.path.segments.last().unwrap().name { write!(f, "use {};", *src) } else { - write!(f, "use {} = {};", *name, *src) + write!(f, "use {} as {};", *src, *name) } } clean::GlobImport(ref src) => { diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index ecdc736790d..85455b9df9e 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -13,14 +13,12 @@ //! This module uses libsyntax's lexer to provide token-based highlighting for //! the HTML documentation generated by rustdoc. -use std::io; - -use syntax::parse; -use syntax::parse::lexer; - use html::escape::Escape; -use t = syntax::parse::token; +use std::io; +use syntax::parse::lexer; +use syntax::parse::token as t; +use syntax::parse; /// Highlights some source code, returning the HTML output. pub fn highlight(src: &str, class: Option<&str>, id: Option<&str>) -> String { |
