Skip to content
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

ty: return impl Iterator from Predicate::walk_tys #55949

Merged

Conversation

ljedrz
Copy link
Contributor

@ljedrz ljedrz commented Nov 14, 2018

Fixes the lazyboye FIXME by returning a custom Iterator as intended by the original author of the function.

It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.

@rust-highfive
Copy link
Collaborator

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 14, 2018
src/librustc/ty/mod.rs Outdated Show resolved Hide resolved
@ljedrz ljedrz force-pushed the return_impl_Iterator_from_Predicate_walk_tys branch from faf78e0 to daaad75 Compare November 14, 2018 15:36
Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

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

small nit otherwise lgtm

src/librustc/ty/mod.rs Outdated Show resolved Hide resolved
@wesleywiser
Copy link
Member

@bors try

Let's get the perf run started.

@bors
Copy link
Contributor

bors commented Nov 14, 2018

⌛ Trying commit daaad757802bcc25d6f273f0c80305955ff68c0f with merge 2721a905baf123efea5ca0838895ecd9c8ad142b...

@bors
Copy link
Contributor

bors commented Nov 14, 2018

☀️ Test successful - status-travis
State: approved= try=True

@wesleywiser
Copy link
Member

@rust-timer build 2721a905baf123efea5ca0838895ecd9c8ad142b

@rust-timer
Copy link
Collaborator

Insufficient permissions to issue commands to rust-timer.

@ljedrz
Copy link
Contributor Author

ljedrz commented Nov 14, 2018

@kennytm can you help with rust-timer please?

@alexcrichton
Copy link
Member

@rust-timer build 2721a905baf123efea5ca0838895ecd9c8ad142b

@rust-timer
Copy link
Collaborator

Success: Queued 2721a905baf123efea5ca0838895ecd9c8ad142b with parent 6f244c9, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 2721a905baf123efea5ca0838895ecd9c8ad142b

@ljedrz ljedrz force-pushed the return_impl_Iterator_from_Predicate_walk_tys branch from daaad75 to e6e5635 Compare November 15, 2018 08:27
@ljedrz
Copy link
Contributor Author

ljedrz commented Nov 15, 2018

The perf looks pretty innocuous, but nothing too exciting; perhaps the ctfe and stress benchmarks have improved a little bit, as they have pretty consistent instruction count deltas.

@sinkuu
Copy link
Contributor

sinkuu commented Nov 15, 2018

This method is only used by rustdoc, so the perf changes may be noise.

> rg -w walk_tys src
src/librustc/ty/mod.rs
1350:    pub fn walk_tys(&self) -> IntoIter<Ty<'tcx>> {

src/librustc/ty/sty.rs
1855:    /// types reachable from this type via `walk_tys`). This ignores late-bound

src/librustdoc/clean/auto_trait.rs
408:        pred.walk_tys()

@ljedrz
Copy link
Contributor Author

ljedrz commented Nov 15, 2018

Oh; it is entirely possible then 😆.

@oli-obk
Copy link
Contributor

oli-obk commented Nov 15, 2018

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 15, 2018

📌 Commit e6e5635 has been approved by oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 15, 2018
@petrochenkov petrochenkov assigned oli-obk and unassigned petrochenkov Nov 16, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Nov 16, 2018
…edicate_walk_tys, r=oli-obk

ty: return impl Iterator from Predicate::walk_tys

Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function.

It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
kennytm added a commit to kennytm/rust that referenced this pull request Nov 17, 2018
…edicate_walk_tys, r=oli-obk

ty: return impl Iterator from Predicate::walk_tys

Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function.

It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Nov 18, 2018
…edicate_walk_tys, r=oli-obk

ty: return impl Iterator from Predicate::walk_tys

Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function.

It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
bors added a commit that referenced this pull request Nov 19, 2018
Rollup of 25 pull requests

Successful merges:

 - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets)
 - #55564 (test/linkage-visibility: Ignore on musl targets)
 - #55827 (A few tweaks to iterations/collecting)
 - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI)
 - #55857 (remove unused dependency)
 - #55862 (in which the E0618 "expected function" diagnostic gets a makeover)
 - #55867 (do not panic just because cargo failed)
 - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef)
 - #55916 (Make miri value visitor usfeful for mutation)
 - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code)
 - #55923 (reword #[test] attribute error on fn items)
 - #55935 (appveyor: Use VS2017 for all our images)
 - #55949 (ty: return impl Iterator from Predicate::walk_tys)
 - #55952 (Update to Clang 7 on CI.)
 - #55953 (#53488 Refactoring UpvarId)
 - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors)
 - #55963 (Stress test for MPSC)
 - #55968 (Clean up some non-mod-rs stuff.)
 - #55970 (Miri backtrace improvements)
 - #56007 (CTFE: dynamically make sure we do not call non-const-fn)
 - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.)
 - #56012 (avoid shared ref in UnsafeCell::get)
 - #56016 (Add VecDeque::resize_with)
 - #56027 (docs: Add missing backtick in object_safety.rs docs)
 - #56043 (remove "approx env bounds" if we already know from trait)

Failed merges:

r? @ghost
kennytm pushed a commit to pietroalbini/rust that referenced this pull request Nov 19, 2018
…edicate_walk_tys, r=oli-obk

ty: return impl Iterator from Predicate::walk_tys

Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function.

It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
bors added a commit that referenced this pull request Nov 19, 2018
Rollup of 25 pull requests

Successful merges:

 - #55562 (Add powerpc- and powerpc64-unknown-linux-musl targets)
 - #55564 (test/linkage-visibility: Ignore on musl targets)
 - #55827 (A few tweaks to iterations/collecting)
 - #55834 (Forward the ABI of the non-zero sized fields of an union if they have the same ABI)
 - #55857 (remove unused dependency)
 - #55862 (in which the E0618 "expected function" diagnostic gets a makeover)
 - #55867 (do not panic just because cargo failed)
 - #55894 (miri enum discriminant handling: Fix treatment of pointers, better error when it is undef)
 - #55916 (Make miri value visitor useful for mutation)
 - #55919 (core/tests/num: Simplify `test_int_from_str_overflow()` test code)
 - #55923 (reword #[test] attribute error on fn items)
 - #55949 (ty: return impl Iterator from Predicate::walk_tys)
 - #55952 (Update to Clang 7 on CI.)
 - #55953 (#53488 Refactoring UpvarId)
 - #55962 (rustdoc: properly calculate spans for intra-doc link resolution errors)
 - #55963 (Stress test for MPSC)
 - #55968 (Clean up some non-mod-rs stuff.)
 - #55970 (Miri backtrace improvements)
 - #56007 (CTFE: dynamically make sure we do not call non-const-fn)
 - #56011 (Replace data.clone() by Arc::clone(&data) in mutex doc.)
 - #56012 (avoid shared ref in UnsafeCell::get)
 - #56016 (Add VecDeque::resize_with)
 - #56027 (docs: Add missing backtick in object_safety.rs docs)
 - #56043 (remove "approx env bounds" if we already know from trait)
 - #56059 (Increase `Duration` approximate equal threshold to 1us)
@bors bors merged commit e6e5635 into rust-lang:master Nov 19, 2018
@ljedrz ljedrz deleted the return_impl_Iterator_from_Predicate_walk_tys branch November 19, 2018 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants