-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print visible name for types as well as modules.
This commit extends previous work in #55007 where the name from the visible parent was used for modules. Now, we also print the name from the visible parent for types.
- Loading branch information
Showing
4 changed files
with
37 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub struct S; | ||
mod m { pub struct S; } | ||
pub use crate::m::S as S2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// aux-build:issue-56943.rs | ||
|
||
extern crate issue_56943; | ||
|
||
fn main() { | ||
let _: issue_56943::S = issue_56943::S2; | ||
//~^ ERROR mismatched types [E0308] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0308]: mismatched types | ||
--> $DIR/issue-56943.rs:6:29 | ||
| | ||
LL | let _: issue_56943::S = issue_56943::S2; | ||
| ^^^^^^^^^^^^^^^ expected struct `issue_56943::S`, found struct `issue_56943::S2` | ||
| | ||
= note: expected type `issue_56943::S` | ||
found type `issue_56943::S2` | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0308`. |