Skip to content

Conversation

michirakara
Copy link
Contributor

@michirakara michirakara commented Sep 26, 2024

This PR implemented enhancement of Step::steps_between in #48117 , with hint-like return type, returning (usize, Option<usize>).

When &a <= &b and steps between a and b is less than or equal to usize::MAX, steps_between(&a, &b) == (n, Some(n)).

When &a <= &b and steps between a and b is greater than usize::MAX, steps_between(&a, &b) == (usize::MAX, None).

When &a > &b , steps_between(&a, &b) == (0, None).

@rustbot
Copy link
Collaborator

rustbot commented Sep 26, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joboet (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 26, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@joboet
Copy link
Member

joboet commented Oct 1, 2024

r? libs-api

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Oct 1, 2024
@rustbot rustbot assigned BurntSushi and unassigned joboet Oct 1, 2024
@dtolnay dtolnay assigned dtolnay and unassigned BurntSushi Nov 3, 2024
@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 7, 2024
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2024

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@calebcartwright
Copy link
Member

The most recent changes look like they contain a large diff related to some formatting version conflicts (the rustc repo uses a pinned, slightly older version of rustfmt), perhaps it's related to the merge commit or running rustfmt manually/editor as opposed to ./x fmt?

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 8, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@dtolnay
Copy link
Member

dtolnay commented Nov 21, 2024

I squashed these 7 commits into one:

  • 0cdca2c distinguish overflow and unimplemented in Step::steps_between
  • 7b3dc62 Fixed bug
  • 4ab4aa8 actually fixed bug
  • 7e3d4c3 fixed format
  • f63f5f3 fixed the link of docs
  • 67b0560 fixed tests
  • 921451d fixed format manually since x.py fmt did not work

There is one other piece of formatting I'll fix in the next push.

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thank you!

@dtolnay
Copy link
Member

dtolnay commented Nov 21, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 21, 2024

📌 Commit de741d2 has been approved by dtolnay

It is now in the queue for this repository.

@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 21, 2024
@dtolnay dtolnay removed the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Nov 21, 2024
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Nov 22, 2024
distinguish overflow and unimplemented in Step::steps_between
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2024
…mpiler-errors

Rollup of 9 pull requests

Successful merges:

 - rust-lang#129238 (Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local`)
 - rust-lang#130867 (distinguish overflow and unimplemented in Step::steps_between)
 - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin)
 - rust-lang#132090 (Stop being so bail-y in candidate assembly)
 - rust-lang#133159 (Don't allow `-Zunstable-options` to take a value )
 - rust-lang#133215 (Fix missing submodule in `./x vendor`)
 - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns)
 - rust-lang#133301 (Add code example for `wrapping_neg` method for signed integers)
 - rust-lang#133313 (Use arc4random of libc for RTEMS target)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2024
…mpiler-errors

Rollup of 9 pull requests

Successful merges:

 - rust-lang#129238 (Stabilize `Ipv6Addr::is_unique_local` and `Ipv6Addr::is_unicast_link_local`)
 - rust-lang#130867 (distinguish overflow and unimplemented in Step::steps_between)
 - rust-lang#131505 (use `confstr(_CS_DARWIN_USER_TEMP_DIR, ...)` as a `TMPDIR` fallback on Darwin)
 - rust-lang#132090 (Stop being so bail-y in candidate assembly)
 - rust-lang#133159 (Don't allow `-Zunstable-options` to take a value )
 - rust-lang#133215 (Fix missing submodule in `./x vendor`)
 - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns)
 - rust-lang#133301 (Add code example for `wrapping_neg` method for signed integers)
 - rust-lang#133313 (Use arc4random of libc for RTEMS target)

r? `@ghost`
`@rustbot` modify labels: rollup
jhpratt added a commit to jhpratt/rust that referenced this pull request Nov 22, 2024
distinguish overflow and unimplemented in Step::steps_between
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2024
Rollup of 13 pull requests

Successful merges:

 - rust-lang#130867 (distinguish overflow and unimplemented in Step::steps_between)
 - rust-lang#131859 (Update TRPL to add new Chapter 17: Async and Await)
 - rust-lang#132090 (Stop being so bail-y in candidate assembly)
 - rust-lang#132658 (Detect const in pattern with typo)
 - rust-lang#133041 (Print name of env var in `--print=deployment-target`)
 - rust-lang#133102 (aarch64 softfloat target: always pass floats in int registers)
 - rust-lang#133159 (Don't allow `-Zunstable-options` to take a value )
 - rust-lang#133217 ([AIX] Add option -X32_64 to the "strip" command)
 - rust-lang#133237 (Minimally constify `Add`)
 - rust-lang#133238 (re-export `is_loongarch_feature_detected`)
 - rust-lang#133286 (Re-delay a resolve `bug` related to `Self`-ctor in patterns)
 - rust-lang#133301 (Add code example for `wrapping_neg` method for signed integers)
 - rust-lang#133313 (Use arc4random of libc for RTEMS target)

Failed merges:

 - rust-lang#133215 (Fix missing submodule in `./x vendor`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Collaborator

bors commented Nov 22, 2024

⌛ Testing commit de741d2 with merge f1e0752...

@bors
Copy link
Collaborator

bors commented Nov 22, 2024

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing f1e0752 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 22, 2024
@bors bors merged commit f1e0752 into rust-lang:master Nov 22, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 22, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f1e0752): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.0%, secondary -3.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.4% [-4.6%, -2.5%] 3
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) -2.0% [-4.6%, 2.2%] 4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results (primary 0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.1%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [-0.0%, 0.1%] 10

Bootstrap: 796.948s -> 794.896s (-0.26%)
Artifact size: 335.99 MiB -> 336.03 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue. 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.

9 participants