-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Refactor ops.rs #42523
Refactor ops.rs #42523
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
Codegen failed. [00:49:17] ---- [codegen-units] codegen-units/item-collection/function-as-argument.rs stdout ----
[00:49:17]
[00:49:17] These items should have been contained but were not:
[00:49:17]
[00:49:17] TRANS_ITEM fn core::ops[0]::FnOnce[0]::call_once[0]<fn(char, f64), (char, f64)>
[00:49:17] TRANS_ITEM fn core::ops[0]::FnOnce[0]::call_once[0]<fn(u32, &str), (u32, &str)>
[00:49:17]
[00:49:17]
[00:49:17]
[00:49:17] These items were contained but should not have been:
[00:49:17]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::FnOnce[0]::call_once[0]<fn(char, f64), (char, f64)> @@ function_as_argument.cgu-0[Internal]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::FnOnce[0]::call_once[0]<fn(u32, &str), (u32, &str)> @@ function_as_argument.cgu-0[Internal]
[00:49:17]
[00:49:17]
[00:49:17] thread '[codegen-units] codegen-units/item-collection/function-as-argument.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:1979
[00:49:17] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:49:17]
[00:49:17] ---- [codegen-units] codegen-units/item-collection/trait-method-as-argument.rs stdout ----
[00:49:17]
[00:49:17] These items should have been contained but were not:
[00:49:17]
[00:49:17] TRANS_ITEM fn core::ops[0]::FnMut[0]::call_mut[0]<fn(char) -> char, (char)>
[00:49:17] TRANS_ITEM fn core::ops[0]::FnMut[0]::call_mut[0]<fn(u32) -> u32, (u32)>
[00:49:17] TRANS_ITEM fn core::ops[0]::FnOnce[0]::call_once[0]<fn(char) -> char, (char)>
[00:49:17] TRANS_ITEM fn core::ops[0]::FnOnce[0]::call_once[0]<fn(u32) -> u32, (u32)>
[00:49:17] TRANS_ITEM fn core::ops[0]::Fn[0]::call[0]<fn(char) -> char, (char)>
[00:49:17] TRANS_ITEM fn core::ops[0]::Fn[0]::call[0]<fn(u32) -> u32, (u32)>
[00:49:17]
[00:49:17]
[00:49:17]
[00:49:17] These items were contained but should not have been:
[00:49:17]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::FnMut[0]::call_mut[0]<fn(char) -> char, (char)> @@ trait_method_as_argument.cgu-0[Internal]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::FnMut[0]::call_mut[0]<fn(u32) -> u32, (u32)> @@ trait_method_as_argument.cgu-0[Internal]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::FnOnce[0]::call_once[0]<fn(char) -> char, (char)> @@ trait_method_as_argument.cgu-0[Internal]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::FnOnce[0]::call_once[0]<fn(u32) -> u32, (u32)> @@ trait_method_as_argument.cgu-0[Internal]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::Fn[0]::call[0]<fn(char) -> char, (char)> @@ trait_method_as_argument.cgu-0[Internal]
[00:49:17] TRANS_ITEM fn core::ops[0]::function[0]::Fn[0]::call[0]<fn(u32) -> u32, (u32)> @@ trait_method_as_argument.cgu-0[Internal]
[00:49:17]
[00:49:17]
[00:49:17] thread '[codegen-units] codegen-units/item-collection/trait-method-as-argument.rs' panicked at 'explicit panic', /checkout/src/tools/compiletest/src/runtest.rs:1979
[00:49:17]
[00:49:17]
[00:49:17] failures:
[00:49:17] [codegen-units] codegen-units/item-collection/function-as-argument.rs
[00:49:17] [codegen-units] codegen-units/item-collection/trait-method-as-argument.rs |
I updated the tests, so, it should work now. |
Latest Travis run has more codegen errors. |
take_foo_once(Trait::foo, 0u32); | ||
|
||
//~ TRANS_ITEM fn trait_method_as_argument::take_foo_once[0]<char, fn(char) -> char> | ||
//~ TRANS_ITEM fn trait_method_as_argument::take_foo_once[0]<char, fn(char) -> chr> |
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.
Typo 😅
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 got rid of the typo, so, it should work now. |
@bors r+ |
📌 Commit f8d5f90 has been approved by |
⌛ Testing commit f8d5f90 with merge f7111f9... |
💔 Test failed - status-travis |
@bors: retry |
Refactor ops.rs This refactors ops.rs into several different modules internally, as the file has gotten quite big. None of these modules are actually exported, but this should make maintaining it much easier. I've avoided the ambition of exporting the modules because they can more easily be rearranged after this commit goes through, even though it'd be cool to potentially export the modules in the future. I've separated the creation of each file into a separate commit so that this is easier to read. Redone version of #42269 with the movement of `RangeArgument` moved.
☀️ Test successful - status-appveyor, status-travis |
Refactor core::iter module A while back, I refactored `core::ops` in #42523 because the module had become a giant mess and was difficult to modify. Now, I'm doing the same with the `core::iter` module. Like the `core::ops` refactor, things have been split up into multiple commits to make rebasing easier, and so that you can follow changes. Although the diffs are hard to decipher, the only actual code changes I've made in the first few commits are to modify exports and imports. I save all of the actual code refactoring, e.g. modifying what methods are called, for the end.
This refactors ops.rs into several different modules internally, as the file has gotten quite big. None of these modules are actually exported, but this should make maintaining it much easier. I've avoided the ambition of exporting the modules because they can more easily be rearranged after this commit goes through, even though it'd be cool to potentially export the modules in the future.
I've separated the creation of each file into a separate commit so that this is easier to read.
Redone version of #42269 with the movement of
RangeArgument
moved.