Uh oh!
There was an error while loading. Please reload this page.
Speed up the inherent impl overlap check - #68911
Conversation
jonas-schievink
commented
Feb 7, 2020
@bors try @rust-timer queue |
rust-timer
commented
Feb 7, 2020
Awaiting bors try build completion |
bors
commented
Feb 7, 2020
Speed up the inherent impl overlap check This gives a ~7% improvement in compile times for the stm32f0(x2) crate. Also addresses @eddyb's comment in #68837 (comment).
bors
commented
Feb 7, 2020
☀️ Try build successful - checks-azure |
rust-timer
commented
Feb 7, 2020
Queued a5b4dc5 with parent 442ae7f, future comparison URL. |
| // The `Future` trait has only one associted item, `Output`, | ||
| // so check that this is what we see. | ||
| let output_assoc_item = self.tcx.associated_items(future_trait).nth(0).unwrap().def_id; | ||
| let output_assoc_item = self.tcx.associated_items(future_trait)[0].def_id; |
There was a problem hiding this comment.
I think this pattern (or worse, looking things up by name) should be replaced with lang items.
There was a problem hiding this comment.
Yeah, definintely. This was a huge pain when working on generators, since the declaration order of the assoc. types is significant. Not something I'll try to fit in this PR though.
Uh oh!
There was an error while loading. Please reload this page.
jonas-schievink
commented
Feb 7, 2020
Looks like this made |
bors
commented
Feb 8, 2020
☔ The latest upstream changes (presumably #65232) made this pull request unmergeable. Please resolve the merge conflicts. |
petrochenkov
commented
Feb 8, 2020
r=me after rebase |
This reduces the number of `associated_item` queries done here.
Quickly skip impls that do not define any items with the same name
jonas-schievink
commented
Feb 8, 2020
@bors r=petrochenkov |
bors
commented
Feb 8, 2020
📌 Commit 58a9284 has been approved by |
…=petrochenkov Speed up the inherent impl overlap check This gives a ~7% improvement in compile times for the stm32f0(x2) crate. Also addresses @eddyb's comment in rust-lang#68837 (comment).
…=petrochenkov Speed up the inherent impl overlap check This gives a ~7% improvement in compile times for the stm32f0(x2) crate. Also addresses @eddyb's comment in rust-lang#68837 (comment).
…=petrochenkov Speed up the inherent impl overlap check This gives a ~7% improvement in compile times for the stm32f0(x2) crate. Also addresses @eddyb's comment in rust-lang#68837 (comment).
Rollup of 5 pull requests Successful merges: - #68738 (Derive Clone + Eq for std::string::FromUtf8Error) - #68742 (implement AsMut<str> for String) - #68881 (rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables) - #68911 (Speed up the inherent impl overlap check) - #68913 (Pretty-print generic params and where clauses on associated types) Failed merges: r? @ghost
Rustup to rust-lang/rust#68911 changelog: none
This gives a ~7% improvement in compile times for the stm32f0(x2) crate.
Also addresses @eddyb's comment in #68837 (comment).