Skip to content

Document PartialOrd behavior for Option<T> where T: PartialOrd - #161804

Merged
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
zepredos:doc-option-partialord-fix
Aug 29, 2026
Merged

Document PartialOrd behavior for Option<T> where T: PartialOrd#161804
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
zepredos:doc-option-partialord-fix

Conversation

@zepredos

Copy link
Copy Markdown
Contributor

Fixes #161746
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
./x test library/core --stage 1
./x.py setup
./x test tidy --bless

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

rustbot commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @nia-e (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Please see the contribution instructions and our LLM policy for more information.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: libs
  • libs expanded to 12 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, nia-e

@rust-log-analyzer

This comment has been minimized.

@zepredos

Copy link
Copy Markdown
Contributor Author

@rustbot label +A-docs

@rustbot rustbot added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Aug 26, 2026
@Oakchris1955

Copy link
Copy Markdown

This is my personal opinion, but I believe in order to prevent unnecessary duplication, perhaps it would be more simple to just link to the relevant section of the docs instead of duplicating them word-by-word.

@zepredos

Copy link
Copy Markdown
Contributor Author

Sure, I'll make the changes and push them.

@nia-e

nia-e commented Aug 28, 2026

Copy link
Copy Markdown
Member

If we're adding docs here, it's worth mentioning that None always compares less than any Some; once that's done we can merge this. Thanks ^^

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 28, 2026
@rustbot

rustbot commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@zepredos

Copy link
Copy Markdown
Contributor Author

Thanks for the review @nia-e ! Sure, let me add and push it real quick :D

@nia-e

nia-e commented Aug 28, 2026

Copy link
Copy Markdown
Member

lgtm ^^

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit d3b2959 has been approved by nia-e

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 28, 2026
@nia-e

nia-e commented Aug 28, 2026

Copy link
Copy Markdown
Member

(also, as a friendly tip to you as the author: don't worry about listing tests ran in the PR description unless it's something really weird; we have pretty thorough CI and also it can get flagged as LLM-speak. nothing wrong with it ofc, just letting you know ^^)

@zepredos

Copy link
Copy Markdown
Contributor Author

I see, that's a useful tip. Thank you so much!! I'll keep that in mind for future contributions :)

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 28, 2026
…, r=nia-e

Document PartialOrd behavior for Option<T> where T: PartialOrd

Fixes [rust-lang#161746]("rust-lang#161746")
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
`./x test library/core --stage 1`
`./x.py setup`
`./x test tidy --bless`
rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #160170 (Refactored docs for `std::fs::set_permissions_nofollow` + fix BSD-based systems to use fchmodat with AT_SYMLINK_NOFOLLOW flag)
 - #160594 (attach global target features to module-level assembly)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161353 (Add test for parallel compiler reproducible build)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161897 (Reject contract attributes without arguments)
 - #161909 (Report the configured Polonius default in -Z help)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 28, 2026
…, r=nia-e

Document PartialOrd behavior for Option<T> where T: PartialOrd

Fixes [rust-lang#161746]("rust-lang#161746")
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
`./x test library/core --stage 1`
`./x.py setup`
`./x test tidy --bless`
rust-bors Bot pushed a commit that referenced this pull request Aug 28, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #160170 (Refactored docs for `std::fs::set_permissions_nofollow` + fix BSD-based systems to use fchmodat with AT_SYMLINK_NOFOLLOW flag)
 - #161945 (std: optimise IO error formatting)
 - #160594 (attach global target features to module-level assembly)
 - #161577 (implement [u8]::split_ascii_whitespace)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161897 (Reject contract attributes without arguments)
 - #161909 (Report the configured Polonius default in -Z help)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 28, 2026
…, r=nia-e

Document PartialOrd behavior for Option<T> where T: PartialOrd

Fixes [rust-lang#161746]("rust-lang#161746")
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
`./x test library/core --stage 1`
`./x.py setup`
`./x test tidy --bless`
rust-bors Bot pushed a commit that referenced this pull request Aug 29, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #161945 (std: optimise IO error formatting)
 - #160594 (attach global target features to module-level assembly)
 - #161577 (implement [u8]::split_ascii_whitespace)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161702 (Use `drop_guard` in some places in {core,alloc,std})
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161897 (Reject contract attributes without arguments)
 - #161909 (Report the configured Polonius default in -Z help)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 29, 2026
…, r=nia-e

Document PartialOrd behavior for Option<T> where T: PartialOrd

Fixes [rust-lang#161746]("rust-lang#161746")
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
`./x test library/core --stage 1`
`./x.py setup`
`./x test tidy --bless`
rust-bors Bot pushed a commit that referenced this pull request Aug 29, 2026
Rollup of 17 pull requests

Successful merges:

 - #161945 (std: optimise IO error formatting)
 - #160594 (attach global target features to module-level assembly)
 - #161577 (implement [u8]::split_ascii_whitespace)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161897 (Reject contract attributes without arguments)
 - #161909 (Report the configured Polonius default in -Z help)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
 - #161924 (Windows: document that `normalize_lexically` converts `/` to `\`)
 - #161927 (Change `rustc_middle/src/hooks/mod.rs` to `hooks.rs`)
rust-bors Bot pushed a commit that referenced this pull request Aug 29, 2026
Rollup of 17 pull requests

Successful merges:

 - #161945 (std: optimise IO error formatting)
 - #160594 (attach global target features to module-level assembly)
 - #161577 (implement [u8]::split_ascii_whitespace)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161897 (Reject contract attributes without arguments)
 - #161909 (Report the configured Polonius default in -Z help)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
 - #161924 (Windows: document that `normalize_lexically` converts `/` to `\`)
 - #161927 (Change `rustc_middle/src/hooks/mod.rs` to `hooks.rs`)
rust-bors Bot pushed a commit that referenced this pull request Aug 29, 2026
Rollup of 17 pull requests

Successful merges:

 - #161945 (std: optimise IO error formatting)
 - #160594 (attach global target features to module-level assembly)
 - #161577 (implement [u8]::split_ascii_whitespace)
 - #161858 (fix ICE in generic_const_parameter_types with inherents)
 - #161377 ([bootstrap] Don't reverse the order of dylib search path entries)
 - #161804 (Document PartialOrd behavior for Option<T> where T: PartialOrd)
 - #161865 (loongarch: support passing `u128`/`i128` to inline assembly)
 - #161877 (Do not load macro metadata for local definitions in rustdoc)
 - #161880 (fix rustc_lint_defs doctest issues)
 - #161883 (better deal with internal features being injected into doctests)
 - #161887 (std: uefi: fix File::seek returning the EOF sentinel)
 - #161888 (compiler: Allow safestack to be togglable via #[sanitize(safestack = "...")])
 - #161897 (Reject contract attributes without arguments)
 - #161910 (Add rustdoc-html regression test for generated macro)
 - #161914 (Retroactively add relnotes for `bool::{ok_or,ok_or_else}` (1.98.0))
 - #161924 (Windows: document that `normalize_lexically` converts `/` to `\`)
 - #161927 (Change `rustc_middle/src/hooks/mod.rs` to `hooks.rs`)
@rust-bors
rust-bors Bot merged commit 631e6c5 into rust-lang:main Aug 29, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 29, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 29, 2026
Rollup merge of #161804 - zepredos:doc-option-partialord-fix, r=nia-e

Document PartialOrd behavior for Option<T> where T: PartialOrd

Fixes [#161746]("#161746")
This is my first time contributing to Rust and all feedback is welcome.
I ran these after making changes.
`./x test library/core --stage 1`
`./x.py setup`
`./x test tidy --bless`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants