]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #55281 - alexcrichton:revert-demote, r=petrochenkov
authorbors <bors@rust-lang.org>
Tue, 23 Oct 2018 10:56:41 +0000 (10:56 +0000)
committerbors <bors@rust-lang.org>
Tue, 23 Oct 2018 10:56:41 +0000 (10:56 +0000)
Revert "rustc: Fix (again) simd vectors by-val in ABI"

This reverts commit 3cc8f738d4247a9b475d8e074b621e602ac2b7be.

57 files changed:
src/librustc_resolve/build_reduced_graph.rs
src/librustc_resolve/check_unused.rs
src/librustc_resolve/lib.rs
src/librustc_resolve/resolve_imports.rs
src/test/ui/blind/blind-item-block-item-shadow.stderr
src/test/ui/blind/blind-item-item-shadow.stderr
src/test/ui/double-import.stderr
src/test/ui/double-type-import.stderr
src/test/ui/duplicate/duplicate-check-macro-exports.stderr
src/test/ui/error-codes/E0252.stderr
src/test/ui/error-codes/E0254.stderr
src/test/ui/error-codes/E0255.stderr
src/test/ui/error-codes/E0259.stderr
src/test/ui/error-codes/E0260.stderr
src/test/ui/error-codes/E0430.stderr
src/test/ui/extern/extern-crate-rename.stderr
src/test/ui/imports/duplicate.stderr
src/test/ui/issues/issue-19498.stderr
src/test/ui/issues/issue-24081.stderr
src/test/ui/issues/issue-25396.stderr
src/test/ui/issues/issue-26886.stderr
src/test/ui/issues/issue-32354-suggest-import-rename.stderr
src/test/ui/issues/issue-45799-bad-extern-crate-rename-suggestion-formatting.stderr
src/test/ui/issues/issue-45829/auxiliary/issue_45829_a.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/auxiliary/issue_45829_b.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/import-self.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/import-self.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/import-twice.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/import-twice.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/issue-45829.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/issue-45829.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-extern-vs-use.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-extern-vs-use.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-extern-with-tab.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-extern-with-tab.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-extern.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-extern.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-use-vs-extern.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-use-vs-extern.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-use-with-tabs.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-use-with-tabs.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-with-path.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename-with-path.stderr [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename.rs [new file with mode: 0644]
src/test/ui/issues/issue-45829/rename.stderr [new file with mode: 0644]
src/test/ui/issues/issue-8640.stderr
src/test/ui/no-std-inject.stderr
src/test/ui/resolve/resolve-conflict-extern-crate-vs-extern-crate.stderr
src/test/ui/resolve/resolve-conflict-import-vs-extern-crate.stderr
src/test/ui/resolve/resolve-conflict-import-vs-import.stderr
src/test/ui/resolve/resolve-conflict-item-vs-extern-crate.stderr
src/test/ui/resolve/resolve-conflict-item-vs-import.stderr
src/test/ui/resolve/resolve-conflict-type-vs-import.stderr
src/test/ui/unresolved/unresolved-extern-mod-suggestion.stderr
src/test/ui/use/use-mod.stderr
src/test/ui/use/use-paths-as-items.stderr
src/test/ui/variants/variant-namespacing.stderr

index e2f5829d14ff7ae3cab5698fdd7d8ede62a745b3..5222dd27d34d61b83f153eedc674cb0983685ea8 100644 (file)
@@ -449,7 +449,10 @@ fn build_reduced_graph_for_item(&mut self, item: &Item, expansion: Mark) {
                     id: item.id,
                     parent,
                     imported_module: Cell::new(Some(ModuleOrUniformRoot::Module(module))),
-                    subclass: ImportDirectiveSubclass::ExternCrate(orig_name),
+                    subclass: ImportDirectiveSubclass::ExternCrate {
+                        source: orig_name,
+                        target: ident,
+                    },
                     root_span: item.span,
                     span: item.span,
                     module_path: Vec::new(),
index 6f3135b37cf05746dd3e9d5b903d3972f1a10ae7..ddcaf128bf5bbfad9ece862a83c0f3bca10f3b86 100644 (file)
@@ -144,7 +144,7 @@ pub fn check_crate(resolver: &mut Resolver, krate: &ast::Crate) {
                     }
                 }
             }
-            ImportDirectiveSubclass::ExternCrate(_) => {
+            ImportDirectiveSubclass::ExternCrate { .. } => {
                 resolver.maybe_unused_extern_crates.push((directive.id, directive.span));
             }
             ImportDirectiveSubclass::MacroUse => {
index 0f96ee6a688f1c6b0518e562584b96209e9d110a..2c09ae7b7d2a58f1eec47575d171c7b16eebc026 100644 (file)
@@ -1234,7 +1234,7 @@ fn is_extern_crate(&self) -> bool {
         match self.kind {
             NameBindingKind::Import {
                 directive: &ImportDirective {
-                    subclass: ImportDirectiveSubclass::ExternCrate(_), ..
+                    subclass: ImportDirectiveSubclass::ExternCrate { .. }, ..
                 }, ..
             } => true,
             _ => false,
@@ -1248,15 +1248,6 @@ fn is_import(&self) -> bool {
         }
     }
 
-    fn is_renamed_extern_crate(&self) -> bool {
-        if let NameBindingKind::Import { directive, ..} = self.kind {
-            if let ImportDirectiveSubclass::ExternCrate(Some(_)) = directive.subclass {
-                return true;
-            }
-        }
-        false
-    }
-
     fn is_glob_import(&self) -> bool {
         match self.kind {
             NameBindingKind::Import { directive, .. } => directive.is_glob(),
@@ -3812,7 +3803,7 @@ fn lint_if_path_starts_with_module(
             if let NameBindingKind::Import { directive: d, .. } = binding.kind {
                 // Careful: we still want to rewrite paths from
                 // renamed extern crates.
-                if let ImportDirectiveSubclass::ExternCrate(None) = d.subclass {
+                if let ImportDirectiveSubclass::ExternCrate { source: None, .. } = d.subclass {
                     return
                 }
             }
@@ -4782,10 +4773,17 @@ fn report_conflict<'b>(&mut self,
             };
 
             let cm = self.session.source_map();
-            let rename_msg = "You can use `as` to change the binding name of the import";
-
-            if let (Ok(snippet), false) = (cm.span_to_snippet(binding.span),
-                                           binding.is_renamed_extern_crate()) {
+            let rename_msg = "you can use `as` to change the binding name of the import";
+
+            if let (
+                Ok(snippet),
+                NameBindingKind::Import { directive, ..},
+                _dummy @ false,
+            ) = (
+                cm.span_to_snippet(binding.span),
+                binding.kind.clone(),
+                binding.span.is_dummy(),
+            ) {
                 let suggested_name = if name.as_str().chars().next().unwrap().is_uppercase() {
                     format!("Other{}", name)
                 } else {
@@ -4794,13 +4792,30 @@ fn report_conflict<'b>(&mut self,
 
                 err.span_suggestion_with_applicability(
                     binding.span,
-                    rename_msg,
-                    if snippet.ends_with(';') {
-                        format!("{} as {};", &snippet[..snippet.len() - 1], suggested_name)
-                    } else {
-                        format!("{} as {}", snippet, suggested_name)
+                    &rename_msg,
+                    match (&directive.subclass, snippet.as_ref()) {
+                        (ImportDirectiveSubclass::SingleImport { .. }, "self") =>
+                            format!("self as {}", suggested_name),
+                        (ImportDirectiveSubclass::SingleImport { source, .. }, _) =>
+                            format!(
+                                "{} as {}{}",
+                                &snippet[..((source.span.hi().0 - binding.span.lo().0) as usize)],
+                                suggested_name,
+                                if snippet.ends_with(";") {
+                                    ";"
+                                } else {
+                                    ""
+                                }
+                            ),
+                        (ImportDirectiveSubclass::ExternCrate { source, target, .. }, _) =>
+                            format!(
+                                "extern crate {} as {};",
+                                source.unwrap_or(target.name),
+                                suggested_name,
+                            ),
+                        (_, _) => unreachable!(),
                     },
-                    Applicability::MachineApplicable,
+                    Applicability::MaybeIncorrect,
                 );
             } else {
                 err.span_label(binding.span, rename_msg);
index c217e9a6f4a6e0fd2f1d2dc3a6a385d9007a6871..27ba1ced74985dfc073fb09d585c8e6f23e41c08 100644 (file)
@@ -52,7 +52,10 @@ pub enum ImportDirectiveSubclass<'a> {
         max_vis: Cell<ty::Visibility>, // The visibility of the greatest re-export.
         // n.b. `max_vis` is only used in `finalize_import` to check for re-export errors.
     },
-    ExternCrate(Option<Name>),
+    ExternCrate {
+        source: Option<Name>,
+        target: Ident,
+    },
     MacroUse,
 }
 
@@ -1336,7 +1339,7 @@ fn import_directive_subclass_to_string(subclass: &ImportDirectiveSubclass) -> St
     match *subclass {
         SingleImport { source, .. } => source.to_string(),
         GlobImport { .. } => "*".to_string(),
-        ExternCrate(_) => "<extern crate>".to_string(),
+        ExternCrate { .. } => "<extern crate>".to_string(),
         MacroUse => "#[macro_use]".to_string(),
     }
 }
index 5adc953e4058ec7466645730d260bdbdfc2bce74..a24ba5d97b11c9cd7e6696ec553f400849e81562 100644 (file)
@@ -7,7 +7,7 @@ LL |         use foo::Bar;
    |             ^^^^^^^^ `Bar` reimported here
    |
    = note: `Bar` must be defined only once in the type namespace of this block
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL |         use foo::Bar as OtherBar;
    |             ^^^^^^^^^^^^^^^^^^^^
index 240ea6061b9752dd534a4790f2ea7ed5b494e0a4..7874189534403ae5064759bdea0ddff664b01832 100644 (file)
@@ -8,7 +8,7 @@ LL | use foo::foo;
    |     ^^^^^^^^ `foo` reimported here
    |
    = note: `foo` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use foo::foo as other_foo;
    |     ^^^^^^^^^^^^^^^^^^^^^
index df6463a7e2880be25871614cea5f390a397655c7..436d594921b0795960a54ab8e39b8def132f4beb 100644 (file)
@@ -7,7 +7,7 @@ LL | use sub2::foo; //~ ERROR the name `foo` is defined multiple times
    |     ^^^^^^^^^ `foo` reimported here
    |
    = note: `foo` must be defined only once in the value namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use sub2::foo as other_foo; //~ ERROR the name `foo` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^
index d5d977da4aa4cd94e980496285d95079f605b5cd..f1d6e63c713af763a51a32196886f1e151a84b82 100644 (file)
@@ -7,7 +7,7 @@ LL |     use self::bar::X;
    |         ^^^^^^^^^^^^ `X` reimported here
    |
    = note: `X` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL |     use self::bar::X as OtherX;
    |         ^^^^^^^^^^^^^^^^^^^^^^
index e2119efbd3db5b2d572a47195fb0ed2fb1dfcbf1..eced6b303e8537c297a6a5033ea35aa0d651a18b 100644 (file)
@@ -8,7 +8,7 @@ LL | macro_rules! panic { () => {} } //~ ERROR the name `panic` is defined multi
    | ^^^^^^^^^^^^^^^^^^ `panic` redefined here
    |
    = note: `panic` must be defined only once in the macro namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use std::panic as other_panic;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^
index a4271bf3a4dff2108158cb8481aea87293586056..0d112a4f02ea9543a99f2ff2ec018c54133d2525 100644 (file)
@@ -7,7 +7,7 @@ LL | use bar::baz; //~ ERROR E0252
    |     ^^^^^^^^ `baz` reimported here
    |
    = note: `baz` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use bar::baz as other_baz; //~ ERROR E0252
    |     ^^^^^^^^^^^^^^^^^^^^^
index a52215df0bbca0e21759832a612a9c8863f54b85..5e833f1ee3901cc7f0fa539b59e88f4bd82f6d8b 100644 (file)
@@ -8,7 +8,7 @@ LL | use foo::alloc;
    |     ^^^^^^^^^^ `alloc` reimported here
    |
    = note: `alloc` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use foo::alloc as other_alloc;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
index a077a43c152f0147d125ae8d168ed41413cd54c3..d01a4c002e76f0f51fcc99c73357ace1af7d3c6f 100644 (file)
@@ -8,7 +8,7 @@ LL | fn foo() {} //~ ERROR E0255
    | ^^^^^^^^ `foo` redefined here
    |
    = note: `foo` must be defined only once in the value namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use bar::foo as other_foo;
    |     ^^^^^^^^^^^^^^^^^^^^^
index 24a73544a35f0ffa228134f0d3499ef836cb05f5..8c3e3f851aed70ad24505509cfb0cfb926e5884b 100644 (file)
@@ -5,12 +5,13 @@ LL | extern crate alloc;
    | ------------------- previous import of the extern crate `alloc` here
 LL | 
 LL | extern crate libc as alloc;
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   | |
-   | `alloc` reimported here
-   | You can use `as` to change the binding name of the import
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `alloc` reimported here
    |
    = note: `alloc` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | extern crate libc as other_alloc;
+   |
 
 error: aborting due to previous error
 
index 437794432b0827716be0bd148e077f7b2bdbc514..08792a33921040c447c557887ae76e463f03ccb0 100644 (file)
@@ -8,7 +8,7 @@ LL | mod alloc {
    | ^^^^^^^^^ `alloc` redefined here
    |
    = note: `alloc` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | extern crate alloc as other_alloc;
    |
index c50ed4ea5de8b83863c48e523ccc14413ca358b9..32198acec772647055854cf7f3c7b4975996a856 100644 (file)
@@ -15,7 +15,7 @@ LL | use std::fmt::{self, self}; //~ ERROR E0430
    |                previous import of the module `fmt` here
    |
    = note: `fmt` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::fmt::{self, self as other_fmt}; //~ ERROR E0430
    |                      ^^^^^^^^^^^^^^^^^
index 2c2723fe4c5c8575e311132b256f07f4d05ecc01..f8a5de3654cdcaee9cb85504e011297a1b7e73d3 100644 (file)
@@ -4,12 +4,13 @@ error[E0259]: the name `m1` is defined multiple times
 LL | extern crate m1;
    | ---------------- previous import of the extern crate `m1` here
 LL | extern crate m2 as m1; //~ ERROR is defined multiple times
-   | ^^^^^^^^^^^^^^^^^^^^^^
-   | |
-   | `m1` reimported here
-   | You can use `as` to change the binding name of the import
+   | ^^^^^^^^^^^^^^^^^^^^^^ `m1` reimported here
    |
    = note: `m1` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | extern crate m2 as other_m1; //~ ERROR is defined multiple times
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 9cdd7aa88f18e497be985f0dfdb471801434be8f..5d51981e8afa9599aeb0a1305f8a18292f37050f 100644 (file)
@@ -7,7 +7,7 @@ LL |     use a::foo; //~ ERROR the name `foo` is defined multiple times
    |         ^^^^^^ `foo` reimported here
    |
    = note: `foo` must be defined only once in the value namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL |     use a::foo as other_foo; //~ ERROR the name `foo` is defined multiple times
    |         ^^^^^^^^^^^^^^^^^^^
index 839ab778061c260073ede9d9423f9f6c0a53fe61..e4cefe9d7a4da634a4e0b0e2ea3be543b90ad831 100644 (file)
@@ -8,7 +8,7 @@ LL | mod A {} //~ ERROR the name `A` is defined multiple times
    | ^^^^^ `A` redefined here
    |
    = note: `A` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use self::A as OtherA;
    |     ^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | pub mod B {} //~ ERROR the name `B` is defined multiple times
    | ^^^^^^^^^ `B` redefined here
    |
    = note: `B` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use self::B as OtherB;
    |     ^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL |     mod D {} //~ ERROR the name `D` is defined multiple times
    |     ^^^^^ `D` redefined here
    |
    = note: `D` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL |     use C::D as OtherD;
    |         ^^^^^^^^^^^^^^
index 17cd3ec0aa6d30f00c45fdca6822ef0f74def725..f9a97ac7c99c7045ff8c5227026e9a2333b860ea 100644 (file)
@@ -8,7 +8,7 @@ LL | type Add = bool; //~ ERROR the name `Add` is defined multiple times
    | ^^^^^^^^^^^^^^^^ `Add` redefined here
    |
    = note: `Add` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Add as OtherAdd;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | struct Sub { x: f32 } //~ ERROR the name `Sub` is defined multiple times
    | ^^^^^^^^^^ `Sub` redefined here
    |
    = note: `Sub` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Sub as OtherSub;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -38,7 +38,7 @@ LL | enum Mul { A, B } //~ ERROR the name `Mul` is defined multiple times
    | ^^^^^^^^ `Mul` redefined here
    |
    = note: `Mul` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Mul as OtherMul;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -53,7 +53,7 @@ LL | mod Div { } //~ ERROR the name `Div` is defined multiple times
    | ^^^^^^^ `Div` redefined here
    |
    = note: `Div` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Div as OtherDiv;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | trait Rem {  } //~ ERROR the name `Rem` is defined multiple times
    | ^^^^^^^^^ `Rem` redefined here
    |
    = note: `Rem` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::ops::Rem as OtherRem;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
index 1946f39167238f9f434e482ada02b196bbf5997a..33e7c37882180baafe886ef7b6a7ced1504c3974 100644 (file)
@@ -7,7 +7,7 @@ LL | use bar::baz; //~ ERROR the name `baz` is defined multiple times
    |     ^^^^^^^^ `baz` reimported here
    |
    = note: `baz` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use bar::baz as other_baz; //~ ERROR the name `baz` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -21,7 +21,7 @@ LL | use bar::Quux; //~ ERROR the name `Quux` is defined multiple times
    |     ^^^^^^^^^ `Quux` reimported here
    |
    = note: `Quux` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use bar::Quux as OtherQuux; //~ ERROR the name `Quux` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -35,7 +35,7 @@ LL | use bar::blah; //~ ERROR the name `blah` is defined multiple times
    |     ^^^^^^^^^ `blah` reimported here
    |
    = note: `blah` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use bar::blah as other_blah; //~ ERROR the name `blah` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL | use bar::WOMP; //~ ERROR the name `WOMP` is defined multiple times
    |     ^^^^^^^^^ `WOMP` reimported here
    |
    = note: `WOMP` must be defined only once in the value namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use bar::WOMP as OtherWOMP; //~ ERROR the name `WOMP` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^
index 759426239410f51540e61a4676b7acc162c8421a..f2a43b0db798f3c32e04ecc91f6a6b2b96e6b8d7 100644 (file)
@@ -7,7 +7,7 @@ LL | use std::sync::Arc; //~ ERROR the name `Arc` is defined multiple times
    |     ^^^^^^^^^^^^^^ `Arc` reimported here
    |
    = note: `Arc` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::sync::Arc as OtherArc; //~ ERROR the name `Arc` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -22,7 +22,7 @@ LL | use std::sync; //~ ERROR the name `sync` is defined multiple times
    |     ^^^^^^^^^ `sync` reimported here
    |
    = note: `sync` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::sync as other_sync; //~ ERROR the name `sync` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^^
index f45a5f7dd619ba168ec5079af74afb934051afbb..f3acd65e6a269e5b9375f9c781ce4b63be91d43d 100644 (file)
@@ -7,7 +7,7 @@ LL | use extension2::ConstructorExtension; //~ ERROR is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `ConstructorExtension` reimported here
    |
    = note: `ConstructorExtension` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use extension2::ConstructorExtension as OtherConstructorExtension; //~ ERROR is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index ecdfec2b3bfd6aaef1aed023e5f5ebdfd0662d2e..99c15976666e2d4d01e6f6d6209d0dee6656367f 100644 (file)
@@ -5,7 +5,7 @@ LL | extern crate std;
    | ^^^^^^^^^^^^^^^^^ `std` reimported here
    |
    = note: `std` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | extern crate std as other_std;
    |
diff --git a/src/test/ui/issues/issue-45829/auxiliary/issue_45829_a.rs b/src/test/ui/issues/issue-45829/auxiliary/issue_45829_a.rs
new file mode 100644 (file)
index 0000000..56eb154
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-45829/auxiliary/issue_45829_b.rs b/src/test/ui/issues/issue-45829/auxiliary/issue_45829_b.rs
new file mode 100644 (file)
index 0000000..56eb154
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub const FOO: usize = *&0;
diff --git a/src/test/ui/issues/issue-45829/import-self.rs b/src/test/ui/issues/issue-45829/import-self.rs
new file mode 100644 (file)
index 0000000..8b13ffd
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod foo {
+    pub struct A;
+    pub struct B;
+}
+
+use foo::{self};
+
+use foo as self;
+
+use foo::self;
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/import-self.stderr b/src/test/ui/issues/issue-45829/import-self.stderr
new file mode 100644 (file)
index 0000000..985dc4e
--- /dev/null
@@ -0,0 +1,31 @@
+error: expected identifier, found keyword `self`
+  --> $DIR/import-self.rs:18:12
+   |
+LL | use foo as self;
+   |            ^^^^ expected identifier, found keyword
+
+error[E0429]: `self` imports are only allowed within a { } list
+  --> $DIR/import-self.rs:20:5
+   |
+LL | use foo::self;
+   |     ^^^^^^^^^
+
+error[E0255]: the name `foo` is defined multiple times
+  --> $DIR/import-self.rs:16:11
+   |
+LL | mod foo {
+   | ------- previous definition of the module `foo` here
+...
+LL | use foo::{self};
+   |           ^^^^ `foo` reimported here
+   |
+   = note: `foo` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use foo::{self as other_foo};
+   |           ^^^^^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+Some errors occurred: E0255, E0429.
+For more information about an error, try `rustc --explain E0255`.
diff --git a/src/test/ui/issues/issue-45829/import-twice.rs b/src/test/ui/issues/issue-45829/import-twice.rs
new file mode 100644 (file)
index 0000000..785932e
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod foo {
+    pub struct A;
+    pub struct B;
+}
+
+use foo::{A, A};
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/import-twice.stderr b/src/test/ui/issues/issue-45829/import-twice.stderr
new file mode 100644 (file)
index 0000000..566d479
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0252]: the name `A` is defined multiple times
+  --> $DIR/import-twice.rs:16:14
+   |
+LL | use foo::{A, A};
+   |           -  ^ `A` reimported here
+   |           |
+   |           previous import of the type `A` here
+   |
+   = note: `A` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use foo::{A, A as OtherA};
+   |              ^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0252`.
diff --git a/src/test/ui/issues/issue-45829/issue-45829.rs b/src/test/ui/issues/issue-45829/issue-45829.rs
new file mode 100644 (file)
index 0000000..eca4648
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod foo {
+    pub struct A;
+    pub struct B;
+}
+
+use foo::{A, B as A};
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/issue-45829.stderr b/src/test/ui/issues/issue-45829/issue-45829.stderr
new file mode 100644 (file)
index 0000000..872379d
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0252]: the name `A` is defined multiple times
+  --> $DIR/issue-45829.rs:16:14
+   |
+LL | use foo::{A, B as A};
+   |           -  ^^^^^^ `A` reimported here
+   |           |
+   |           previous import of the type `A` here
+   |
+   = note: `A` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use foo::{A, B as OtherA};
+   |              ^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0252`.
diff --git a/src/test/ui/issues/issue-45829/rename-extern-vs-use.rs b/src/test/ui/issues/issue-45829/rename-extern-vs-use.rs
new file mode 100644 (file)
index 0000000..5230cad
--- /dev/null
@@ -0,0 +1,20 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue_45829_b.rs
+
+mod foo {
+    pub mod bar {}
+}
+
+use foo::bar;
+extern crate issue_45829_b as bar;
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/rename-extern-vs-use.stderr b/src/test/ui/issues/issue-45829/rename-extern-vs-use.stderr
new file mode 100644 (file)
index 0000000..6a513e9
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0254]: the name `bar` is defined multiple times
+  --> $DIR/rename-extern-vs-use.rs:18:1
+   |
+LL | use foo::bar;
+   |     -------- previous import of the module `bar` here
+LL | extern crate issue_45829_b as bar;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `bar` reimported here
+   |
+   = note: `bar` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | extern crate issue_45829_b as other_bar;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0254`.
diff --git a/src/test/ui/issues/issue-45829/rename-extern-with-tab.rs b/src/test/ui/issues/issue-45829/rename-extern-with-tab.rs
new file mode 100644 (file)
index 0000000..7066ed6
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue_45829_a.rs
+// aux-build:issue_45829_b.rs
+
+extern crate issue_45829_a;
+extern  crate    issue_45829_b  as  issue_45829_a;
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/rename-extern-with-tab.stderr b/src/test/ui/issues/issue-45829/rename-extern-with-tab.stderr
new file mode 100644 (file)
index 0000000..769be54
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0259]: the name `issue_45829_a` is defined multiple times
+  --> $DIR/rename-extern-with-tab.rs:15:1
+   |
+LL | extern crate issue_45829_a;
+   | --------------------------- previous import of the extern crate `issue_45829_a` here
+LL | extern  crate    issue_45829_b  as  issue_45829_a;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `issue_45829_a` reimported here
+   |
+   = note: `issue_45829_a` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | extern crate issue_45829_b as other_issue_45829_a;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0259`.
diff --git a/src/test/ui/issues/issue-45829/rename-extern.rs b/src/test/ui/issues/issue-45829/rename-extern.rs
new file mode 100644 (file)
index 0000000..7c3d972
--- /dev/null
@@ -0,0 +1,17 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue_45829_a.rs
+// aux-build:issue_45829_b.rs
+
+extern crate issue_45829_a;
+extern crate issue_45829_b as issue_45829_a;
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/rename-extern.stderr b/src/test/ui/issues/issue-45829/rename-extern.stderr
new file mode 100644 (file)
index 0000000..ab77e59
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0259]: the name `issue_45829_a` is defined multiple times
+  --> $DIR/rename-extern.rs:15:1
+   |
+LL | extern crate issue_45829_a;
+   | --------------------------- previous import of the extern crate `issue_45829_a` here
+LL | extern crate issue_45829_b as issue_45829_a;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `issue_45829_a` reimported here
+   |
+   = note: `issue_45829_a` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | extern crate issue_45829_b as other_issue_45829_a;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0259`.
diff --git a/src/test/ui/issues/issue-45829/rename-use-vs-extern.rs b/src/test/ui/issues/issue-45829/rename-use-vs-extern.rs
new file mode 100644 (file)
index 0000000..1cc261e
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:issue_45829_b.rs
+
+extern crate issue_45829_b;
+use std as issue_45829_b;
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/rename-use-vs-extern.stderr b/src/test/ui/issues/issue-45829/rename-use-vs-extern.stderr
new file mode 100644 (file)
index 0000000..1395fbe
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0254]: the name `issue_45829_b` is defined multiple times
+  --> $DIR/rename-use-vs-extern.rs:14:5
+   |
+LL | extern crate issue_45829_b;
+   | --------------------------- previous import of the extern crate `issue_45829_b` here
+LL | use std as issue_45829_b;
+   |     ^^^^^^^^^^^^^^^^^^^^ `issue_45829_b` reimported here
+   |
+   = note: `issue_45829_b` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use std as other_issue_45829_b;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0254`.
diff --git a/src/test/ui/issues/issue-45829/rename-use-with-tabs.rs b/src/test/ui/issues/issue-45829/rename-use-with-tabs.rs
new file mode 100644 (file)
index 0000000..c1e4d90
--- /dev/null
@@ -0,0 +1,21 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+mod foo {
+    pub struct A;
+
+    pub mod bar {
+        pub struct B;
+    }
+}
+
+use foo::{A, bar::B    as    A};
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/rename-use-with-tabs.stderr b/src/test/ui/issues/issue-45829/rename-use-with-tabs.stderr
new file mode 100644 (file)
index 0000000..b80a692
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0252]: the name `A` is defined multiple times
+  --> $DIR/rename-use-with-tabs.rs:19:14
+   |
+LL | use foo::{A, bar::B    as    A};
+   |           -  ^^^^^^^^^^^^^^^^^ `A` reimported here
+   |           |
+   |           previous import of the type `A` here
+   |
+   = note: `A` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use foo::{A, bar::B as OtherA};
+   |              ^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0252`.
diff --git a/src/test/ui/issues/issue-45829/rename-with-path.rs b/src/test/ui/issues/issue-45829/rename-with-path.rs
new file mode 100644 (file)
index 0000000..dbe8733
--- /dev/null
@@ -0,0 +1,13 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use std::{collections::HashMap as A, sync::Arc as A};
+
+fn main() {}
diff --git a/src/test/ui/issues/issue-45829/rename-with-path.stderr b/src/test/ui/issues/issue-45829/rename-with-path.stderr
new file mode 100644 (file)
index 0000000..2bc45f0
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0252]: the name `A` is defined multiple times
+  --> $DIR/rename-with-path.rs:11:38
+   |
+LL | use std::{collections::HashMap as A, sync::Arc as A};
+   |           -------------------------  ^^^^^^^^^^^^^^ `A` reimported here
+   |           |
+   |           previous import of the type `A` here
+   |
+   = note: `A` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use std::{collections::HashMap as A, sync::Arc as OtherA};
+   |                                      ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0252`.
diff --git a/src/test/ui/issues/issue-45829/rename.rs b/src/test/ui/issues/issue-45829/rename.rs
new file mode 100644 (file)
index 0000000..7c6d87b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use core;
+use std as core;
+
+fn main() {
+    1 + 1;
+}
diff --git a/src/test/ui/issues/issue-45829/rename.stderr b/src/test/ui/issues/issue-45829/rename.stderr
new file mode 100644 (file)
index 0000000..ce13b45
--- /dev/null
@@ -0,0 +1,17 @@
+error[E0252]: the name `core` is defined multiple times
+  --> $DIR/rename.rs:12:5
+   |
+LL | use core;
+   |     ---- previous import of the module `core` here
+LL | use std as core;
+   |     ^^^^^^^^^^^ `core` reimported here
+   |
+   = note: `core` must be defined only once in the type namespace of this module
+help: you can use `as` to change the binding name of the import
+   |
+LL | use std as other_core;
+   |     ^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0252`.
index 68fdea6e22805cf1d5e3b98fd094bb481a159a4b..029f76d152a37356bfb291e57421bd5c8f5b52d8 100644 (file)
@@ -7,7 +7,7 @@ LL |     mod bar {}
    |     ^^^^^^^ `bar` redefined here
    |
    = note: `bar` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL |     use baz::bar as other_bar;
    |         ^^^^^^^^^^^^^^^^^^^^^
index c1ea823a9bda084cc18004e412e0441c9d39570d..fbc54124a088d772d888631e23e52e6caae4d2f3 100644 (file)
@@ -5,7 +5,7 @@ LL | extern crate core; //~ ERROR: the name `core` is defined multiple times
    | ^^^^^^^^^^^^^^^^^^ `core` reimported here
    |
    = note: `core` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | extern crate core as other_core; //~ ERROR: the name `core` is defined multiple times
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index 5f21b4413e71ba6a9408b3b60f9acaf84f1ac8cb..83577b245b78ddfaaf7d6e8e4642e6499a336589 100644 (file)
@@ -5,7 +5,7 @@ LL | extern crate std;
    | ^^^^^^^^^^^^^^^^^ `std` reimported here
    |
    = note: `std` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | extern crate std as other_std;
    |
index 9978e75af30b786c4dc2698077b48994bb74df42..adb66b994db69bbde96f95269e1a1255885c1a4a 100644 (file)
@@ -5,10 +5,10 @@ LL | use std::slice as std; //~ ERROR the name `std` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^ `std` reimported here
    |
    = note: `std` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
-LL | use std::slice as std as other_std; //~ ERROR the name `std` is defined multiple times
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | use std::slice as other_std; //~ ERROR the name `std` is defined multiple times
+   |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 80ccb9aa2b3c32235bb1f312d1c3432aad21f21e..15f826305bf386a3c4c95e5505896576592fff99 100644 (file)
@@ -7,7 +7,7 @@ LL | use std::mem::transmute;
    |     ^^^^^^^^^^^^^^^^^^^ `transmute` reimported here
    |
    = note: `transmute` must be defined only once in the value namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::mem::transmute as other_transmute;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index d9ad248c01337893de625885d13a51f9a05ac9e6..0b082c1105f15874853faf16101e07c6dcdfa47d 100644 (file)
@@ -5,10 +5,6 @@ LL | mod std {}    //~ ERROR the name `std` is defined multiple times
    | ^^^^^^^ `std` redefined here
    |
    = note: `std` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
-   |
-LL |  as other_std// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
-   |  ^^^^^^^^^^^^
 
 error: aborting due to previous error
 
index 5ef4bdf4aadd315891aad8351600bbe7954cd9df..5305ddbd2ef6d6b0c8254119f9dacfbf46f7b879 100644 (file)
@@ -8,7 +8,7 @@ LL | fn transmute() {}
    | ^^^^^^^^^^^^^^ `transmute` redefined here
    |
    = note: `transmute` must be defined only once in the value namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::mem::transmute as other_transmute;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index 1e8df8f8ea78cf29f3a3e470af64ab70e0727126..e5cafa3ac986fde5078f4c7ee029d1f39da64d23 100644 (file)
@@ -8,7 +8,7 @@ LL | struct Iter;
    | ^^^^^^^^^^^^ `Iter` redefined here
    |
    = note: `Iter` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::slice::Iter as OtherIter;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
index 4e3ea573d2795c0c78d37ac2714caabe751c815c..86ea348ac47b7d924c75fb83043e711b63006020 100644 (file)
@@ -7,7 +7,7 @@ LL | use core;
    |     ^^^^ `core` reimported here
    |
    = note: `core` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use core as other_core;
    |     ^^^^^^^^^^^^^^^^^^
index dcdba6fce9ad9bf9541ba457daa4f7ab4910c8af..adef47ac8fb7969ccc42202b6cc2c6768949e49c 100644 (file)
@@ -23,7 +23,7 @@ LL |     self
    |     ^^^^ `bar` reimported here
    |
    = note: `bar` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL |     self as other_bar
    |
index 200cefc23aff0434626b93f870e89837d63431c0..56db03fd16331c3f48ad8d5a1b5ee3f8bcda5565 100644 (file)
@@ -7,7 +7,7 @@ LL | use std::mem; //~ ERROR the name `mem` is defined multiple times
    |     ^^^^^^^^ `mem` reimported here
    |
    = note: `mem` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | use std::mem as other_mem; //~ ERROR the name `mem` is defined multiple times
    |     ^^^^^^^^^^^^^^^^^^^^^
index 322ea617f34398265f9c1eb8adbaff3accf0d0dd..ce2fb7cb92c5647e123e6999b66aabe76ce624ee 100644 (file)
@@ -8,7 +8,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
    |                                   ^^^^^^^ `XStruct` reimported here
    |
    = note: `XStruct` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct as OtherXStruct, XTuple, XUnit};
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
    |                                            ^^^^^^ `XTuple` reimported here
    |
    = note: `XTuple` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct, XTuple as OtherXTuple, XUnit};
    |                                            ^^^^^^^^^^^^^^^^^^^^^
@@ -38,7 +38,7 @@ LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
    |                                                    ^^^^^ `XUnit` reimported here
    |
    = note: `XUnit` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit as OtherXUnit};
    |                                                    ^^^^^^^^^^^^^^^^^^^
@@ -53,7 +53,7 @@ LL | pub use E::{Struct, Tuple, Unit};
    |             ^^^^^^ `Struct` reimported here
    |
    = note: `Struct` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct as OtherStruct, Tuple, Unit};
    |             ^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | pub use E::{Struct, Tuple, Unit};
    |                     ^^^^^ `Tuple` reimported here
    |
    = note: `Tuple` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct, Tuple as OtherTuple, Unit};
    |                     ^^^^^^^^^^^^^^^^^^^
@@ -83,7 +83,7 @@ LL | pub use E::{Struct, Tuple, Unit};
    |                            ^^^^ `Unit` reimported here
    |
    = note: `Unit` must be defined only once in the type namespace of this module
-help: You can use `as` to change the binding name of the import
+help: you can use `as` to change the binding name of the import
    |
 LL | pub use E::{Struct, Tuple, Unit as OtherUnit};
    |                            ^^^^^^^^^^^^^^^^^