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

Rollup of 9 pull requests #120666

Closed
wants to merge 41 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift click to select a range
fbaa7fc
std::error::Error -> Trait Implementations: lifetimes consistency imp…
WiktorPrzetacznik Jul 18, 2023
3f1ad47
Update README.md
WiktorPrzetacznik Aug 29, 2023
1da87ee
Revert "Update README.md"
WiktorPrzetacznik Aug 29, 2023
a63880c
PartialEq: handle longer transitive chains
RalfJung Nov 20, 2023
3e389ef
PartialOrd: transitivity and duality are required only if the corresp…
RalfJung Nov 20, 2023
baaf6d7
explain what crates should do when adding comparison with foreign types
RalfJung Dec 26, 2023
60a0819
feat: add LocalWaker type, ContextBuilder type, and LocalWake trait.
tvallotton Nov 30, 2023
0cb5e2f
perf: move null check from local_wake() to build()
tvallotton Nov 30, 2023
232cc2b
refactor: remove in favor of and to make the API infallible.
tvallotton Dec 6, 2023
403718b
feat: add try_waker and From<&mut Context> for ContextBuilder to allo…
tvallotton Dec 6, 2023
2012d4b
fix: make LocalWake available in targets that don't support atomics b…
tvallotton Dec 6, 2023
0cb7a0a
chore: add tracking issue number to local waker feature
tvallotton Dec 15, 2023
f824373
feat: impl AsRef<LocalWaker> for Waker.
tvallotton Dec 15, 2023
093f80b
chore: fix ci failures
tvallotton Dec 15, 2023
ad28f75
fix: change issue number of waker_getters from #87021 to #96992.
tvallotton Dec 15, 2023
3e373f5
chore: add and !Sync impls for LocalWaker as a stability guarantee.
tvallotton Dec 15, 2023
a8e71f2
doc: update thread safety explanation for RawWakerVTable and RawWaker.
tvallotton Dec 15, 2023
c67a446
fix: Apply suggestions from code review
tvallotton Jan 13, 2024
eccb5e7
docs: remove recommendations to use LocalWaker in stable API document…
tvallotton Jan 13, 2024
7c6a9cb
chore: make method order consistent with waker
tvallotton Jan 13, 2024
038c6e0
refactor: make waker mandatory.
tvallotton Jan 13, 2024
180c68b
doc: fix some doctests after rebase
tvallotton Jan 20, 2024
cda3588
make matching on NaN a hard error
RalfJung Sep 30, 2023
1254ee4
remove illegal_floating_point_literal_pattern lint
RalfJung Jan 6, 2024
9f14fc4
add test checking behavior of matching on floats, and NaNs in consts
RalfJung Sep 23, 2023
3f3a153
Use `<T, U>` for array/slice equality `impl`s
wackbyte Jan 26, 2024
471af8c
riscv only supports split_debuginfo=off for now
kxxt Jan 31, 2024
61d1ebe
fix typo
RalfJung Feb 2, 2024
94ee0f1
Assert that ParamTy and ParamConst have identical names for identical…
compiler-errors Feb 3, 2024
1abd0da
Do not create param types that differ only by name when comparing int…
compiler-errors Feb 3, 2024
8266657
Remove unused struct
mu001999 Feb 5, 2024
35dad14
target: default to the medium code model on LoongArch targets
xen0n Feb 5, 2024
845932f
Rollup merge of #113833 - WiktorPrzetacznik:master, r=dtolnay
matthiaskrgr Feb 5, 2024
9bf30d9
Rollup merge of #115386 - RalfJung:partial-eq-chain, r=dtolnay
matthiaskrgr Feb 5, 2024
19286a2
Rollup merge of #116284 - RalfJung:no-nan-match, r=cjgillot
matthiaskrgr Feb 5, 2024
a3f3419
Rollup merge of #118960 - tvallotton:local_waker, r=Mark-Simulacrum
matthiaskrgr Feb 5, 2024
e3caa30
Rollup merge of #120384 - wackbyte:array-equality-generics, r=Mark-Si…
matthiaskrgr Feb 5, 2024
83bc10b
Rollup merge of #120518 - kxxt:riscv-split-debug-info, r=compiler-errors
matthiaskrgr Feb 5, 2024
c5a0939
Rollup merge of #120619 - compiler-errors:param, r=lcnr
matthiaskrgr Feb 5, 2024
6b9a911
Rollup merge of #120657 - mu001999:clean, r=Nilstrieb
matthiaskrgr Feb 5, 2024
2a23f5f
Rollup merge of #120661 - xen0n:loong-medium-cmodel, r=heiher,Nilstrieb
matthiaskrgr Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PartialOrd: transitivity and duality are required only if the corresp…
…onding impls exist
  • Loading branch information
RalfJung committed Dec 26, 2023
commit 3e389ef6d50c2cae6b561a04adb9224e666eb964
16 changes: 10 additions & 6 deletions library/core/src/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,14 921,18 @@ pub macro Ord($item:item) {
/// easy to accidentally make them disagree by deriving some of the traits and manually
/// implementing others.
///
/// The comparison must satisfy, for all `a`, `b` and `c`:
/// The comparison relations must satisfy the following conditions
/// (for all `a`, `b`, `c` of type `A`, `B`, `C`):
///
/// - transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
/// - duality: `a < b` if and only if `b > a`.
/// - **Transitivity**: if `A: PartialOrd<B>` and `B: PartialOrd<C>` and `A:
/// PartialOrd<C>`, then `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
/// This must also work for longer chains, such as when `A: PartialOrd<B>`, `B: PartialOrd<C>`,
/// `C: PartialOrd<D>`, and `A: PartialOrd<D>` all exist.
/// - **Duality**: if `A: PartialOrd<B>` and `B: PartialOrd<A>`, then `a < b` if and only if `b > a`.
///
/// Note that these requirements mean that the trait itself must be implemented symmetrically and
/// transitively: if `T: PartialOrd<U>` and `U: PartialOrd<V>` then `U: PartialOrd<T>` and `T:
/// PartialOrd<V>`.
/// Note that the `B: PartialOrd<A>` (dual) and `A: PartialOrd<C>`
/// (transitive) impls are not forced to exist, but these requirements apply
/// whenever they do exist.
///
/// Violating these requirements is a logic error. The behavior resulting from a logic error is not
/// specified, but users of the trait must ensure that such logic errors do *not* result in
Expand Down
Loading