de-non_const Iterator trait methods#153708
de-non_const Iterator trait methods#153708Lars-Schumann wants to merge 1 commit intorust-lang:mainfrom
Iterator trait methods#153708Conversation
|
r? @scottmcm rustbot has assigned @scottmcm. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Iterator trait methods
5e438b4 to
2960e3a
Compare
| { | ||
| default fn spec_advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>> { | ||
| for i in 0..n { | ||
| // FIXME(const-hack): this should be `for i in 0..n` |
There was a problem hiding this comment.
Maybe we should figure that one out first 😅
There was a problem hiding this comment.
As far as const-hacks go, this is very tame, and I didn't want to make this pr too big by constifying the Range Iterator impl as well (if that's even possible right now)
There was a problem hiding this comment.
yea, def don't do range iterators this in this one, I was wondering if we'd just delay on touching this one. But it is tame, and I do worry that by not doing progress here we end up in a deadlock somewhere with other iterator constifications.
|
@bors r+ rollup |
…r-trait-methods, r=oli-obk de-non_const `Iterator` trait methods rust-lang#92476 constifying Iterators methods that don't immediately or transitively need const closures or ugly hacks.
Rollup of 11 pull requests Successful merges: - #153726 (Add optional CI job to build the compiler with the parallel frontend) - #153763 (Don't add empty target features for target-cpu=native on macOS) - #153432 (Fix some comments about dataflow analysis.) - #153529 (Fix LegacyKeyValueFormat report from docker build: pr) - #153694 (fix(query): Pass Query Key to `value_from_cycle_error`) - #153708 (de-non_const `Iterator` trait methods) - #153717 (unused_macro_rules switched used and unused comments) - #153736 (add test that an incomplete feature emits a warning) - #153748 (editorconfig: css uses tabs) - #153750 (rustc-dev-guide subtree update) - #153762 (actually make the is-fn test test what it says it tests)
@bors try jobs=x86_64-rust-for-linux |
This comment has been minimized.
This comment has been minimized.
…hods, r=<try> de-non_const `Iterator` trait methods try-job: x86_64-rust-for-linux
|
On closer inspection the error mentions Iterator, so I’ll assume that this PR Is the most likely cause. @bors r- |
|
This pull request was unapproved. This PR was contained in a rollup (#153767), which was unapproved. |
|
@bors r- |
This comment has been minimized.
This comment has been minimized.
…hods, r=<try> de-non_const `Iterator` trait methods try-job: x86_64-rust-for-linux
|
💔 Test for 4b830c9 failed: CI. Failed job:
|
|
The job Click to see the possible cause of the failure (guessed by this bot)For more information how to resolve CI failures of this job, visit this link. |
#92476
constifying Iterators methods that don't immediately or transitively need const closures or ugly hacks.