-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
RustDoc: Fix bounds linking trait.Foo instead of traitalias.Foo #84811
Conversation
My review todo list:
|
108e69f
to
34bf237
Compare
34bf237
to
fe540ae
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.
I haven't had time to do all the things on #84811 (comment), but I think we can land this in the meantime. Just a couple nits.
} | ||
} | ||
clean::PrimitiveItem(..) => { | ||
self.cache.paths.insert(item.def_id, (self.cache.stack.clone(), item.type_())); | ||
} | ||
|
||
_ => {} | ||
clean::ExternCrateItem { .. } |
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.
_ => {} | ||
clean::ExternCrateItem { .. } | ||
| clean::ImportItem(..) | ||
| clean::OpaqueTyItem(..) |
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.
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.
Oh, is this one TAIT? I would have guessed https://doc.rust-lang.org/nightly/unstable-book/language-features/extern-types.html
But overall, I'd like to leave the match as-is for this PR, if that's ok. Then someone else can audit them later and move them to different sections with comments about why they're ok to be skipped, or whatever.
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.
Yup, that seems good to me.
This comment has been minimized.
This comment has been minimized.
1c7136e
to
40ffa94
Compare
@bors r+ |
📌 Commit 40ffa94 has been approved by |
Rollup of 6 pull requests Successful merges: - rust-lang#84072 (Allow setting `target_family` to multiple values, and implement `target_family="wasm"`) - rust-lang#84744 (Add ErrorKind::OutOfMemory) - rust-lang#84784 (Add help message to suggest const for unused type param) - rust-lang#84811 (RustDoc: Fix bounds linking trait.Foo instead of traitalias.Foo) - rust-lang#84818 (suggestion for unit enum variant when matched with a patern) - rust-lang#84832 (Do not print visibility in external traits) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Implement the new desugaring from `try_trait_v2` ~~Currently blocked on rust-lang#84782, which has a PR in rust-lang#84811 Rebased atop that fix. `try_trait_v2` tracking issue: rust-lang#84277 Unfortunately this is already touching a ton of things, so if you have suggestions for good ways to split it up, I'd be happy to hear them. (The combination between the use in the library, the compiler changes, the corresponding diagnostic differences, even MIR tests mean that I don't really have a great plan for it other than trying to have decently-readable commits. r? `@ghost` ~~(This probably shouldn't go in during the last week before the fork anyway.)~~ Fork happened.
Implement the new desugaring from `try_trait_v2` ~~Currently blocked on rust-lang/rust#84782, which has a PR in rust-lang/rust#84811 Rebased atop that fix. `try_trait_v2` tracking issue: rust-lang/rust#84277 Unfortunately this is already touching a ton of things, so if you have suggestions for good ways to split it up, I'd be happy to hear them. (The combination between the use in the library, the compiler changes, the corresponding diagnostic differences, even MIR tests mean that I don't really have a great plan for it other than trying to have decently-readable commits. r? `@ghost` ~~(This probably shouldn't go in during the last week before the fork anyway.)~~ Fork happened.
Fixes #84782
The code was assuming
Trait
when adding bounds to the cache, so add a check on the DefId to see what its kind really is.r? @jyn514
Before:
After: