| Age | Commit message (Collapse) | Author | Lines |
|
This function will always fail, allowing std's `Sleep` fallback path to be taken instead.
|
|
Use `CreateWaitableTimerExW` with `CREATE_WAITABLE_TIMER_HIGH_RESOLUTION`. Does not work before Windows 10, version 1803 so in that case we fallback to using `Sleep`.
|
|
Remove is global hack
In attempt to fix https://github.com/rust-lang/rust/issues/114057 we found several issues with how compiler computes layouts, this change removes `is_global` from `and` to stop impl from being shadowed.
In depth conversation can be read here https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Getting.20different.20types.20from.20almost.20same.20inputs
This is a fix candidate opened for performance run.
r? `@lcnr`
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #116220 (stabilize `Option::as_`(`mut_`)`slice`)
- #116288 (Add Span to various smir types)
- #116415 (Move subtyper below reveal_all and change reveal_all)
- #116428 (Add a note to duplicate diagnostics)
- #116452 (Do not assert that hidden types don't have erased regions.)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Do not assert that hidden types don't have erased regions.
cc https://github.com/rust-lang/rust/issues/116306
`args` can have erased regions.
In the linked issue, this is reached by computing whether a large type is `Freeze` to compute its ABI.
I do not have a minimized test to include.
|
|
r=compiler-errors,estebank
Add a note to duplicate diagnostics
Helps explain why there may be a difference between manual testing and the test suite output and highlights them as something to potentially look into
For existing duplicate diagnostics I just blessed them other than a few files that had other `NOTE` annotations in
|
|
Move subtyper below reveal_all and change reveal_all
In previous attempt https://github.com/rust-lang/rust/pull/116378 we tried to handle `Opaque` in few different places, but this isn't necessary, after moving subtyper below reveal_all and calling `super_place` on reveal_all, issues cease to exist.
r? ``@oli-obk``
Fixes https://github.com/rust-lang/rust/issues/116332
Fixes https://github.com/rust-lang/rust/issues/116265
Fixes https://github.com/rust-lang/rust/issues/116383
Fixes https://github.com/rust-lang/rust/issues/116333
|
|
Add Span to various smir types
Had to make few extra changes to few structs to attach spans to them.
r? ``@oli-obk``
|
|
stabilize `Option::as_`(`mut_`)`slice`
This is the stabilization to #108545. Thanks to everyone who helped getting this into Rust proper.
|
|
|
|
|
|
docs: Correct terminology in std::cmp
This PR is the result of some discussions on URLO:
* [Traits in `std::cmp` and mathematical terminology](https://users.rust-lang.org/t/traits-in-std-cmp-and-mathematical-terminology/69887)
* [Are poker hands `Ord` or `PartialOrd`?](https://users.rust-lang.org/t/are-poker-hands-ord-or-partialord/82644)
Arguably, the documentation currently isn't very precise regarding mathematical terminology. This can lead to misunderstandings of what `PartialEq`, `Eq`, `PartialOrd`, and `Ord` actually do.
While I believe this PR doesn't give any new API guarantees, it expliclitly mentions that `PartialEq::eq(a, b)` may return `true` for two distinct values `a` and `b` (i.e. where `a` and `b` are not equal in the mathematical sense). This leads to the consequence that `Ord` may describe a weak ordering instead of a total ordering.
In either case, I believe this PR should be thoroughly reviewed, ideally by someone with mathematical background to make sure the terminology is correct now, and also to ensure that no unwanted new API guarantees are made.
In particular, the following problems are addressed:
* Some clarifications regarding used (mathematical) terminology:
* Avoid using the terms "total equality" and "partial equality" in favor of "equivalence relation" and "partial equivalence relation", which are well-defined and unambiguous.
* Clarify that `Ordering` is an ordering between two values (and not an order in the mathematical sense).
* Avoid saying that `PartialEq` and `Eq` are "equality comparisons" because the terminology "equality comparison" could be misleading: it's possible to implement `PartialEq` and `Eq` for other (partial) equivalence relations, in particular for relations where `a == b` for some `a` and `b` even when `a` and `b` are not the same value.
* Added a section "Strict and non-strict partial orders" to document that the `<=` and `>=` operators do not correspond to non-strict partial orders.
* Corrected section "Corollaries" in documenation of `Ord` in regard to `<` only describing a strict total order in cases where `==` conforms to mathematical equality.
* ~~Added a section "Weak orders" to explain that `Ord` may also describe a weak order or total preorder, depending on how `PartialEq::eq` has been implemented.~~ (Removed, see [comment](https://github.com/rust-lang/rust/pull/103046#issuecomment-1279929676))
* Made documentation easier to understand:
* Explicitly state at the beginning of `PartialEq`'s documentation comment that implementing the trait will provide the `==` and `!=` operators.
* Added an easier to understand rule when to implement `Eq` in addition to `PartialEq`: "if it’s guaranteed that `PartialEq::eq(a, a)` always returns `true`."
* Explicitly mention in documentation of `Eq` that the properties "symmetric" and "transitive" are already required by `PartialEq`.
|
|
core library: Disable fpmath tests for i586 ...
This patch disables the floating-point epsilon test for i586 since x87 registers are too imprecise and can't produce the expected results.
|
|
Some clarifications regarding used (mathematical) terminology:
* Avoid using the terms "total equality" and "partial equality" in favor
of "equivalence relation" and "partial equivalence relation", which
are well-defined and unambiguous.
* Clarify that `Ordering` is an ordering between two values (and not an
order in the mathematical sense).
* Avoid saying that `PartialEq` and `Eq` are "equality comparisons"
because the terminology "equality comparison" could be misleading:
it's possible to implement `PartialEq` and `Eq` for other (partial)
equivalence relations, in particular for relations where `a == b` for
some `a` and `b` even when `a` and `b` are not the same value.
* Added a section "Strict and non-strict partial orders" to document
that the `<=` and `>=` operators do not correspond to non-strict
partial orders.
* Corrected section "Corollaries" in documenation of Ord in regard to
`<` only describing a strict total order in cases where `==` conforms
to mathematical equality.
Made documentation easier to understand:
* Explicitly state at the beginning of `PartialEq`'s documentation
comment that implementing the trait will provide the `==` and `!=`
operators.
* Added an easier to understand rule when to implement `Eq` in addition
to `PartialEq`: "if it’s guaranteed that `PartialEq::eq(a, a)` always
returns `true`."
* Explicitly mention in documentation of `Eq` that the properties
"symmetric" and "transitive" are already required by `PartialEq`.
|
|
doc: expand description for f32 and f64 associated constants
This explains the meaning of some of the floating-point associated constants.
|
|
Remove mir::LocalDecl::internal.
It does not serve any purpose, as we don't have typeck-based generator witnesses any more.
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #116223 (Fix misuses of a vs an)
- #116296 (More accurately point to where default return type should go)
- #116429 (Diagnostics: Be more careful when suggesting struct fields)
- #116431 (Tweak wording of E0562)
- #116432 (rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 2))
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 2)
Follow up https://github.com/rust-lang/rust/pull/116214
|
|
Tweak wording of E0562
Fix #80476.
|
|
Diagnostics: Be more careful when suggesting struct fields
Consolidate the various places which filter out struct fields that shouldn't be suggested into a single function.
Previously, each of those code paths had slightly different and incomplete metrics for no good reason. Now, there's only a single 'complete' metric (namely `is_field_suggestable`) which also filters out hygienic fields that come from different syntax contexts.
Fixes #116334.
|
|
More accurately point to where default return type should go
When getting the "default return type" span, instead of pointing to the low span of the next token, point to the high span of the previous token. This:
1. Makes forming return type suggestions more uniform, since we expect them all in the same place.
2. Arguably makes labels easier to understand, since we're pointing to where the implicit `-> ()` would've gone, rather than the starting brace or the semicolon.
r? ```@estebank```
|
|
Fix misuses of a vs an
Fixes the misuse of "a" vs "an", according to English grammatical
expectations and using https://www.a-or-an.com/
|
|
Only trigger `refining_impl_trait` lint on reachable traits
Public but unreachable traits don't matter 😸
r? `@tmandry`
|
|
Add `async_fn_in_trait` lint
cc https://github.com/rust-lang/rust/pull/115822#issuecomment-1731168465
Mostly unsure what the messaging should be. Feedback required.
r? `@tmandry`
|
|
|
|
Remove the `TypedArena::alloc_from_iter` specialization.
It was added in #78569. It's complicated and doesn't actually help
performance.
r? `@cjgillot`
|
|
Co-authored-by: Travis Cross <tc@traviscross.com>
|
|
|
|
|
|
|
|
|
|
chinedufn:fix-expect-unused-in-impl-block-rust-issue-114416, r=cjgillot
Fix multiple `expect` attribs in impl block
Closes #114416
|
|
|
|
|
|
Fix #80476.
|
|
|
|
|
|
Disable CFI for core and std CFI violations
Work around https://github.com/rust-lang/rust/issues/115199 by temporarily disabling CFI for core and std CFI violations to allow the user rebuild and use both core and std with CFI enabled using the Cargo build-std feature.
|
|
|
|
Updates documentation for LLVM CFI support with recommended information
since the user can now rebuild and use both core and std with CFI
enabled using the Cargo build-std feature.
|
|
Works around #115199 by temporarily disabling CFI for core and std CFI
violations to allow the user rebuild and use both core and std with CFI
enabled using the Cargo build-std feature.
|
|
Remove E0551
Because it's the same as E0539.
Fixes #51489.
r? `@Nilstrieb`
|
|
Remove wasm32-unknown-emscripten tests from CI
This builder tested the wasm32-unknown-emscripten target, which is tier 2 (and so not eligible for testing). In the recent beta [promotion](https://github.com/rust-lang/rust/pull/116362#issuecomment-1744960904), we ran into a problem with this target: emscripten doesn't support passing environment variables into the std environment, so we can't enable RUSTC_BOOTSTRAP for libtest in order to pass -Zunstable-options.
We worked around this for the beta/stable branches, but given this problem, and its tier 2 status, just dropping the target's tests entirely seems warranted. Downgrading to tier 3 may also be a good idea, but that is a separate conversation not proposed here.
|
|
Point to full `async fn` for future
Semi-follow-up to https://github.com/rust-lang/rust/pull/116296#discussion_r1342007575
cc `@asquared31415`
|
|
Add new bors try branches to CI
Workflows for the new bors weren't launching, because its branches weren't whitelisted here.
r? `@Mark-Simulacrum`
|
|
Because it's the same as E0539.
Fixes #51489.
|
|
It's easier to read in sorted order.
|