-
Notifications
You must be signed in to change notification settings - Fork 498
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
Canonical Paths #132
Canonical Paths #132
Conversation
src/paths.md
Outdated
pub struct Struct; // ::a::Struct | ||
|
||
pub trait Trait { // ::a::Trait | ||
fn f(&self); // <::a::Trait>::f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<::a::Trait>::f
-> ::a::Trait::f
.
<::a::Trait>::f
has another meaning - inherent associated item on the trait object type ::a::Trait
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going with the assumption you are right, but I thought ::a::Trait::f
was syntactic sugar for <::a::Trait>::f
.
4517fbc
to
a45231e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overall but one small note.
src/paths.md
Outdated
the path component the item itself defines. | ||
|
||
[Implementations] and [use declarations] do not have canonical paths, although | ||
the associated items that implementations define do have them. Items defined in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if "associated items" is too overloaded a term here, it made me do a double-take at first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's technically extraneous, as implementations only define associated items. I removed it; does it flow better that way?
src/paths.md
Outdated
The path prefix for modules is the canonical path to that module. For bare | ||
implementations, it is the canonical path of the item being implemented | ||
surrounded by angle (`<>`) brackets. For trait implementations, it is the | ||
cananonical path of the item being implemented followed by `as` followed by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cananonical -> canonical
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
a45231e
to
36aee27
Compare
36aee27
to
e675bb9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks! ❤️
Defines canonical paths, as part of #129.
Note to reviewer(s): There's also two commits that just change the location of links and change where newlines are, so just focus on the giant green blob in the paths file.