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

Stabilize is_partitioned #80085

Closed
wants to merge 4 commits into from
Closed

Stabilize is_partitioned #80085

wants to merge 4 commits into from

Conversation

TheWastl
Copy link
Contributor

Closes #62544

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 16, 2020
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-9 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
[command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
##[endgroup]
##[group]Fetching the repository
[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +73d05dfcf8c2036697eacb0514a57f49bb3c1491:refs/remotes/pull/80085/merge
---
   Compiling libc v0.2.79
   Compiling std v0.0.0 (/checkout/library/std)
   Compiling compiler_builtins v0.1.36
   Compiling unwind v0.0.0 (/checkout/library/unwind)
error[E0541]: unknown meta item 'since'
     |
     |
1808 |     #[unstable(feature = "iter_is_partitioned", since = "1.49.0")]
     |                                                 ^^^^^^^^^^^^^^^^ expected one of `feature`, `reason`, `issue`, `soft`
error: aborting due to previous error

For more information about this error, try `rustc --explain E0541`.
error: could not compile `core`

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@rust-log-analyzer
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[command]/usr/bin/git submodule foreach --recursive git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :
[command]/usr/bin/git config --local http.https://github.com/.extraheader AUTHORIZATION: basic ***
##[endgroup]
##[group]Fetching the repository
[command]/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=2 origin +ea3c925217c562b5bbfc5911172edc93a1bfbaed:refs/remotes/pull/80085/merge
---
    Checking rustc_ast_lowering v0.0.0 (/checkout/compiler/rustc_ast_lowering)
    Checking chalk-engine v0.36.0
    Checking rustc_middle v0.0.0 (/checkout/compiler/rustc_middle)
    Checking rustc_ast_passes v0.0.0 (/checkout/compiler/rustc_ast_passes)
error: the feature `iter_is_partitioned` has been stable since 1.49.0 and no longer requires an attribute to enable
  |
8 | #![feature(iter_is_partitioned)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  |
  = note: `-D stable-features` implied by `-D warnings`
error: aborting due to previous error

error: could not compile `rustc_ast_passes`


To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "16" "--release" "--color" "always" "--features" " llvm max_level_info" "--manifest-path" "/checkout/compiler/rustc/Cargo.toml" "-p" "rustc-main" "-p" "rustc_codegen_ssa" "-p" "rustc_incremental" "-p" "rustc_graphviz" "-p" "rustc_target" "-p" "rustc_errors" "-p" "rustc_lint_defs" "-p" "rustc_data_structures" "-p" "rustc_macros" "-p" "rustc_symbol_mangling" "-p" "rustc_fs_util" "-p" "rustc_middle" "-p" "rustc_type_ir" "-p" "rustc_arena" "-p" "rustc_feature" "-p" "rustc_query_system" "-p" "rustc_index" "-p" "rustc_apfloat" "-p" "rustc_hir" "-p" "rustc_attr" "-p" "rustc_ast_pretty" "-p" "rustc_lexer" "-p" "rustc_span" "-p" "rustc_ast" "-p" "rustc_serialize" "-p" "rustc_session" "-p" "rustc_driver" "-p" "rustc_save_analysis" "-p" "rustc_metadata" "-p" "rustc_expand" "-p" "rustc_ast_passes" "-p" "rustc_plugin_impl" "-p" "rustc_error_codes" "-p" "rustc_lint" "-p" "rustc_parse_format" "-p" "rustc_trait_selection" "-p" "rustc_infer" "-p" "rustc_interface" "-p" "rustc_ty_utils" "-p" "rustc_typeck" "-p" "rustc_passes" "-p" "rustc_ast_lowering" "-p" "rustc_codegen_llvm" "-p" "rustc_llvm" "-p" "rustc_builtin_macros" "-p" "rustc_resolve" "-p" "rustc_mir_build" "-p" "rustc_traits" "-p" "rustc_privacy" "-p" "rustc_mir" "-p" "coverage_test_macros" "-p" "rustc_hir_pretty" "-p" "rustc_parse" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:02:42
== clock drift check ==
  local time: Wed Dec 16 18:29:10 UTC 2020

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

/// assert!("Iterator".chars().is_partitioned(char::is_uppercase));
/// assert!(!"IntoIterator".chars().is_partitioned(char::is_uppercase));
/// ```
#[unstable(feature = "iter_is_partitioned", reason = "new API", issue = "62544")]
#[stable(feature = "iter_is_partitioned", since = "1.49.0")]
Copy link
Member

Choose a reason for hiding this comment

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

1.49 is already in beta and 1.50 is going to be in beta soon, so this should probably be 1.51.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

@m-ou-se m-ou-se added A-iterators Area: Iterators T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Dec 16, 2020
@m-ou-se
Copy link
Member

m-ou-se commented Dec 16, 2020

@rfcbot merge

@rfcbot
Copy link

rfcbot commented Dec 16, 2020

Team member @m-ou-se has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Dec 16, 2020
@BurntSushi
Copy link
Member

I've looked at the various linked issues but didn't see any motivating use cases for this routine. cc @cuviper

@cuviper
Copy link
Member

cuviper commented Dec 16, 2020

My own motivation was just that someone asked for partitioning like C++ <algorithm>, and it was easy enough to emulate std::is_partitioned at the same time. I don't personally need it though.

@TheWastl
Copy link
Contributor Author

I don't personally need it either. My motivation for this PR was also someone else. They were wondering why it was not stabilized, as there had been no activity on the tracking issue for almost 1.5 years. I've told the person to comment here.

@m-ou-se
Copy link
Member

m-ou-se commented Dec 16, 2020

Thinking a bit more about this, I suppose that pretty much all use cases of this function are also covered by is_sorted_by_key .

@m-ou-se
Copy link
Member

m-ou-se commented Dec 20, 2020

I've added the unresolved questions to the tracking issue. Cancelling the FCP for now, as we first need to discuss/resolve those.

@rfcbot cancel

@rfcbot
Copy link

rfcbot commented Dec 20, 2020

@m-ou-se proposal cancelled.

@rfcbot rfcbot removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Dec 20, 2020
@m-ou-se
Copy link
Member

m-ou-se commented Dec 20, 2020

Let's continue the discussion on the tracking issue. Thanks!

@m-ou-se m-ou-se closed this Dec 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-iterators Area: Iterators S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for Iterator::is_partitioned
7 participants