Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc: rename multiple imports in a list #27451
Conversation
rust-highfive
assigned
alexcrichton
Aug 1, 2015
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
reviewed
Aug 3, 2015
| @@ -2430,11 +2430,11 @@ pub struct ViewListIdent { | |||
| impl Clean<ViewListIdent> for ast::PathListItem { | |||
| fn clean(&self, cx: &DocContext) -> ViewListIdent { | |||
| match self.node { | |||
| ast::PathListIdent { id, name } => ViewListIdent { | |||
| ast::PathListIdent { id, name, .. } => ViewListIdent { | |||
This comment has been minimized.
This comment has been minimized.
alexcrichton
Aug 3, 2015
Member
I think these cases need to be handled to show reexports correctly, this will probably need to update the ViewListIdent structures here, and can you be sure to add a rustdoc test for this?
This comment has been minimized.
This comment has been minimized.
seanmonstar
Aug 3, 2015
Author
Contributor
OH, I misunderstood what this code did. Re-exports, of course.
alexcrichton
reviewed
Aug 3, 2015
| @@ -1656,14 +1656,14 @@ pub type Variant = Spanned<Variant_>; | |||
|
|
|||
| #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug, Copy)] | |||
| pub enum PathListItem_ { | |||
| PathListIdent { name: Ident, id: NodeId }, | |||
| PathListMod { id: NodeId } | |||
| PathListIdent { name: Ident, rename: Option<Ident>, id: NodeId }, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Can you be sure to add some more exhaustive tests for this? It looks like this only includes "this will parse" tests rather than "this will resolve" tests along with tests for things like error messages (e.g. an item doesn't exist in a module). |
This comment has been minimized.
This comment has been minimized.
|
Ah, you're right, that test doesn't test it resolved the correct item.
@alexcrichton I assumed those tests already exist as normal importing tests. |
This comment has been minimized.
This comment has been minimized.
|
They probably do exist, but new ones should be added for this new feature. This should be as exhaustively tested as possible, basically, because although the implementation may be simple today a later refactoring will benefit from an exhaustive set of tests. |
seanmonstar
force-pushed the
seanmonstar:use-groups-as
branch
6 times, most recently
from
670aaf6
to
e042365
Aug 3, 2015
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton i've fixed up rustdoc and some error tests. some other specific tests you have in mind? I |
This comment has been minimized.
This comment has been minimized.
|
This needs a |
This comment has been minimized.
This comment has been minimized.
|
parser-lalr.y probably needs changing to pass tests too |
Manishearth
referenced this pull request
Aug 7, 2015
Closed
Tracking issue for the `use_group_as` RFC #27578
This comment has been minimized.
This comment has been minimized.
|
@Manishearth a change in In other words, |
This comment has been minimized.
This comment has been minimized.
|
Visit both. visit.rs is for AST visiting, so anything in the AST should get visited |
seanmonstar
force-pushed the
seanmonstar:use-groups-as
branch
from
e042365
to
47d963f
Aug 8, 2015
This comment has been minimized.
This comment has been minimized.
|
@Manishearth like so? |
This comment has been minimized.
This comment has been minimized.
|
Yep! |
seanmonstar
force-pushed the
seanmonstar:use-groups-as
branch
from
47d963f
to
cfcd449
Aug 8, 2015
This comment has been minimized.
This comment has been minimized.
|
All looks good to me, thanks @seanmonstar! |
seanmonstar commentedAug 1, 2015
An implementation of RFC 1219.
The RFC is not merged yet, but once merged, this could be.