Skip to content

Conversation

@tbu-
Copy link
Contributor

@tbu- tbu- commented Apr 6, 2014

Add requirements of TotalEq and TotalOrd

Clarify that TotalEq needs an underlying equivalence relation and that TotalOrd
needs a total ordering and specifically named the required (and sufficient)
attributes.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make this a list, e.g.

/**
 * Trait for equality comparisons that form an [equalence relation](...).
 *
 * The equality must be (for all `a`, `b` and `c`):
 *
 * - reflexive: `a == a`;
 * - symmetric: `a == b` implies `b == a`; and
 * - transitive: `a == b` and `b == c` implies `a == c`.
 *
 * `a == b` and `a != b` must be strict inverses.
 */

Clarify that TotalEq needs an underlying equivalence relation and that TotalOrd
needs a total ordering and specifically named the required (and sufficient)
attributes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: we don't use block comments, use /// on every line.

bors added a commit that referenced this pull request Apr 7, 2014
Add requirements of TotalEq and TotalOrd

Clarify that TotalEq needs an underlying equivalence relation and that TotalOrd
needs a total ordering and specifically named the required (and sufficient)
attributes.
@bors bors closed this Apr 7, 2014
@bors bors merged commit 85129e2 into rust-lang:master Apr 7, 2014
@adrientetar
Copy link
Contributor

What's wrong with block comments exactly?

bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 18, 2022
…on, r=Veykril

feat: Autocomplete Cargo-defined env vars in `env!` and `option_env!` (rust-lang#12448)

Closes rust-lang#12448

Important to know:

- Variables are taken from https://doc.rust-lang.org/cargo/reference/environment-variables.html and hardcoded as a const array.
- For the sake of simplicity I didn't include the autocompletion of `CARGO_BIN_EXE_<name>` and `OUT_DIR` since it would require information about build.rs and binary name. If somebody knows an easy way of obtaining them I can add those vars as well :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants