]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #65421 - estebank:variants, r=petrochenkov
authorbors <bors@rust-lang.org>
Mon, 28 Oct 2019 13:41:13 +0000 (13:41 +0000)
committerbors <bors@rust-lang.org>
Mon, 28 Oct 2019 13:41:13 +0000 (13:41 +0000)
Point at local similarly named element and tweak references to variants

Partially address #65386.

1  2 
src/librustc_resolve/build_reduced_graph.rs
src/librustc_resolve/diagnostics.rs
src/librustc_resolve/late.rs
src/librustc_resolve/late/diagnostics.rs
src/test/ui/privacy/privacy-ns2.rs
src/test/ui/privacy/privacy-ns2.stderr

Simple merge
Simple merge
Simple merge
index 58671addecdedbb32c46f24b4510e1b97f4f4fc5,48e06821cd61c579d7a7ea90403cf08fbe5ae497..6f54259f91867fe1cb3ce9127e0c0eaaa29c0a65
@@@ -48,27 -51,11 +51,30 @@@ LL | use foo3::Bar
     |
  
  error[E0573]: expected type, found function `Bar`
 -  --> $DIR/privacy-ns2.rs:47:17
 +  --> $DIR/privacy-ns2.rs:42:14
 +   |
 +LL |     let _x : Bar();
 +   |              ^^^^^ not a type
 +   |
 +help: use `=` if you meant to assign
 +   |
 +LL |     let _x = Bar();
 +   |            ^
 +help: possible better candidates are found in other modules, you can import them into scope
 +   |
 +LL | use foo1::Bar;
 +   |
 +LL | use foo2::Bar;
 +   |
 +LL | use foo3::Bar;
 +   |
 +
 +error[E0573]: expected type, found function `Bar`
 +  --> $DIR/privacy-ns2.rs:48:17
     |
+ LL |     pub struct Baz;
+    |     --------------- similarly named struct `Baz` defined here
+ ...
  LL |     let _x: Box<Bar>;
     |                 ^^^
     |