about summary refs log tree commit diff
path: root/src/librustdoc
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-08-18 08:29:44 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-08-18 09:19:10 -0700
commit67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7 (patch)
tree37fe9cab468b9f6757ca415f42a072a59012ee1e /src/librustdoc
parent7074592ee1ad1a155919268229b6464f2acc576e (diff)
downloadrust-67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7.tar.gz
rust-67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7.zip
libsyntax: Remove the `use foo = bar` syntax from the language in favor
of `use bar as foo`.

Change all uses of `use foo = bar` to `use bar as foo`.

Implements RFC #47.

Closes #16461.

[breaking-change]
Diffstat (limited to 'src/librustdoc')
-rw-r--r--src/librustdoc/html/format.rs2
-rw-r--r--src/librustdoc/html/highlight.rs10
-rw-r--r--src/librustdoc/plugins.rs2
3 files changed, 6 insertions, 8 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 {
diff --git a/src/librustdoc/plugins.rs b/src/librustdoc/plugins.rs
index c5ac9416fa0..b2edf5d6a2b 100644
--- a/src/librustdoc/plugins.rs
+++ b/src/librustdoc/plugins.rs
@@ -10,7 +10,7 @@
 
 use clean;
 
-use dl = std::dynamic_lib;
+use std::dynamic_lib as dl;
 use serialize::json;
 use std::mem;
 use std::string::String;