Skip to content

DOCS: update reference about paths #30224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2015
Merged

Conversation

matklad
Copy link
Member

@matklad matklad commented Dec 5, 2015

Make clear that super may be included in the path several times.

r? @steveklabnik

@matklad
Copy link
Member Author

matklad commented Dec 5, 2015

wait, the rules are different: you can have any number of supers, but only at the beginning of the path

@matklad
Copy link
Member Author

matklad commented Dec 5, 2015

Should be correct now, but it's better to double check: the only thing worse than a missing reference is an incorrect reference :)


* Paths starting with the keyword `super` begin resolution relative to the
parent module. Each further identifier must resolve to an item.
parent module. Each further identifier must resolve to an item.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have one space after the period.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks. Fixed.

@matklad
Copy link
Member Author

matklad commented Dec 5, 2015

@matklad matklad force-pushed the super-docs branch 2 times, most recently from 3badbea to c8b7e24 Compare December 5, 2015 20:23
@matklad
Copy link
Member Author

matklad commented Dec 5, 2015

I hope this is correct and complete now ;)

@tshepang
Copy link
Member

tshepang commented Dec 6, 2015

Can you extend example by inserting foo() in all modules and calling them, so that it's more clear how this works.

@matklad
Copy link
Member Author

matklad commented Dec 6, 2015

Can you extend example by inserting foo() in all modules and calling them, so that it's more clear how this works.

Are you sure this is necessary? There are such examples just before this point. My idea is that in previous bullets we discuss simple common cases, and that then we give a separate more complicated example with several supers.

@tshepang
Copy link
Member

tshepang commented Dec 7, 2015

Sorry, I didn't read the context. Ignore my comment.

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 9, 2015

📌 Commit c8b7e24 has been approved by steveklabnik

steveklabnik added a commit to steveklabnik/rust that referenced this pull request Dec 9, 2015
Make clear that `super` may be included in the path several times.

r? @steveklabnik
bors added a commit that referenced this pull request Dec 9, 2015
@bors bors merged commit c8b7e24 into rust-lang:master Dec 9, 2015
@matklad matklad deleted the super-docs branch July 9, 2019 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants