-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #73558
Rollup of 9 pull requests #73558
Conversation
In our GitHub Actions setup macOS is too unreliable to gate on it, but the other builders work fine. This commit splits the macOS builders into a separate job (called auto-fallible), allowing us to gate on the auto job without failing due to macOS spurious failures.
This commit normalizes projections which contain opaque types (opaque types are otherwise linted against, which is would have previously made the test cases added in this commit fail). Signed-off-by: David Wood <david@davidtw.co>
We now require that projection candidates are applicable with the idenitity substs of the trait, rather than allowing predicates that are only applicable for certain substs.
This was currently only happening due to eager normalization, which isn't possible if there's specialization or bound variables.
Given `trait X { type U; }` the bound `<Self as X>::U` now lives on the type, rather than the trait. This is feature gated on `feature(generic_associated_types)` for now until more testing can be done. The also enabled type-generic associated types since we no longer need "implies bounds".
This patch adds two methods to `Duration`. The first, `Duration::zero`, provides a `const` constructor for getting an zero-length duration. This is also what `Default` provides (this was clarified in the docs), though `default` is not `const`. The second, `Duration::is_zero`, returns true if a `Duration` spans no time (i.e., because its components are all zero). Previously, the way to do this was either to compare both `as_secs` and `subsec_nanos` to 0, to compare against `Duration::new(0, 0)`, or to use the `u128` method `as_nanos`, none of which were particularly elegant.
…dation, r=nikomatsakis Projection bound validation During selection we use bounds declared on associated types (e.g. `type X: Copy`) to satisfy trait/projection bounds. This would be fine so long as those bounds are checked on any impls/trait objects. For simple cases they are because the bound `Self::X: Copy` gets normalized when we check the impl. However, for default values with specialization and higher-ranked bounds from GATs or otherwise, we can't normalize when checking the impl, and so we use the bound from the trait to prove that the bound applies to the impl, which is clearly unsound. This PR makes 2 fixes for this: 1. Requiring that the bounds on the trait apply to a projection type with the corresponding substs, so a bound `for<'a> <Self as X<'a>>::U: Copy` on the trait cannot be used to prove `<T as X<'_>>::U: Copy`. 2. Actually checking that the bounds that we still allow apply to generic/default associated types. Opening for a crater run. Closes rust-lang#68641 Closes rust-lang#68642 Closes rust-lang#68643 Closes rust-lang#68644 Closes rust-lang#68645 Closes rust-lang#68656 r? @ghost
…bertodt core/time: Add Duration methods for zero This patch adds two methods to `Duration`. The first, `Duration::zero`, provides a `const` constructor for getting an zero-length duration. This is also what `Default` provides (this was clarified in the docs), though `default` is not `const`. The second, `Duration::is_zero`, returns true if a `Duration` spans no time (i.e., because its components are all zero). Previously, the way to do this was either to compare both `as_secs` and `subsec_nanos` to 0, to compare against `Duration::new(0, 0)`, or to use the `u128` method `as_nanos`, none of which were particularly elegant.
remove leftover mentions of `skol` and `int` from the compiler This PR mostly changes `skol` -> `placeholder` and all cases where `int` is used as a type to `i32`.
…in-projections, r=estebank lint: normalize projections using opaque types Fixes rust-lang#73251. This PR normalizes projections which use opaque types (opaque types are otherwise linted against, which is would have previously made the test cases added in this PR fail).
…=petrochenkov Pre-compute `LocalDefId` <-> `HirId` mappings and remove `NodeId` <-> `HirId` conversion APIs cc rust-lang#50928 I don't know who is exactly the best person to review this. r? @petrochenkov
…oli-obk Remove use of specialization from librustc_arena This reworks the macro so that specialization, `transmute` and `#[marker]` are not used. r? @oli-obk
Update bootstrap to rustc 1.45.0-beta.2 (1dc0f6d 2020-06-15) Pulls in changes from rust-lang#73326. Closes rust-lang#73286
…ark-Simulacrum ci: allow gating GHA on everything but macOS In our GitHub Actions setup macOS is too unreliable to gate on it, but the other builders work fine. This commit splits the macOS builders into a separate job (called `auto-fallible`), allowing us to gate on the auto job without failing due to macOS spurious failures. cc rust-lang/rust-central-station#848 r? @Mark-Simulacrum
Converted all platform-specific stdin/stdout/stderr implementations to use io:: traits Currently, some of the platform-specific standard streams (`src/libstd/sys/*/stdio.rs`) manually implement parts of the `io::Write` interface directly as methods on the struct, rather than by actually implementing the trait. There doesn't seem to be any reason for this, other than an unused advantage of `fn write(&self, ...)` instead of `fn write(&mut self, ...)`. Unfortunately, this means that those implementations don't have the default-implemented io methods, like `read_exact` and `write_all`. This caused rust-lang#72705, which adds forwarding methods to the user-facing standard stream implementations, to fail to compile on those platforms. This change converts *all* such standard stream structs to use the standard library traits. This change should not cause any breakages, because the changed types are not publicly exported, and in fact are only ever used in `src/libstd/io/stdio.rs`.
📌 Commit 14796b9 has been approved by |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Successful merges:
skol
andint
from the compiler #73055 (remove leftover mentions ofskol
andint
from the compiler)LocalDefId
<->HirId
mappings and removeNodeId
<->HirId
conversion APIs #73291 (Pre-computeLocalDefId
<->HirId
mappings and removeNodeId
<->HirId
conversion APIs)Failed merges:
r? @ghost