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

distinguish overflow and unimplemented in Step::steps_between #130867

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michirakara
Copy link

@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
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling llvm-bitcode-linker v0.0.1 (/checkout/src/tools/llvm-bitcode-linker)
    Finished `release` profile [optimized] target(s) in 5.92s
##[endgroup]
##[group]Building stage1 library artifacts (x86_64-unknown-linux-gnu)
error: process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc /checkout/obj/build/bootstrap/debug/rustc -vV` (exit status: 254)
error: rustc interrupted by SIGSEGV, printing backtrace


/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-a1b8689b027a25d5.so(+0xb500c3)[0x7f7bd73820c3]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f7bd64e1520]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-a1b8689b027a25d5.so(+0xb97590)[0x7f7bd73c9590]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-a1b8689b027a25d5.so(+0xab6501)[0x7f7bd72e8501]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-a1b8689b027a25d5.so(_RNvCskxAl5tAjtnG_17rustc_driver_impl14handle_options+0xf7)[0x7f7bd73693d7]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-a1b8689b027a25d5.so(+0xb2c12e)[0x7f7bd735e12e]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/librustc_driver-a1b8689b027a25d5.so(_RNvCskxAl5tAjtnG_17rustc_driver_impl4main+0x30e)[0x7f7bd736b64e]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc(+0x1167)[0x55ea71829167]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc(+0x1133)[0x55ea71829133]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc(+0x1149)[0x55ea71829149]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/lib/libstd-0c7268aa146b0081.so(_RNvNtCsaxe4SnUHES6_3std2rt19lang_start_internal+0x4af)[0x7f7bd674440f]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc(+0x1198)[0x55ea71829198]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f7bd64c8d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f7bd64c8e40]
/checkout/obj/build/x86_64-unknown-linux-gnu/stage1/bin/rustc(+0x1065)[0x55ea71829065]
note: we would appreciate a report at https://github.com/rust-lang/rust
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
rustc exited with signal: 11 (SIGSEGV) (core dumped)
Build completed unsuccessfully in 0:05:02
  local time: Thu Sep 26 02:45:41 UTC 2024
  network time: Thu, 26 Sep 2024 02:45:41 GMT
##[error]Process completed with exit code 1.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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.

5 participants