-
Notifications
You must be signed in to change notification settings - Fork 563
Rustc pull update #2689
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
Merged
Merged
Rustc pull update #2689
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 1be6b13be73dc12e98e51b403add4c41a0b77759 Filtered ref: 53d2132341f509072e83b49d4d82f17465ab164c Upstream diff: rust-lang/rust@6159a44...1be6b13 This merge was created using https://github.com/rust-lang/josh-sync.
minor: sync from downstream
Add multiple generate for enum generate is, as, try_into
Fix not complete type alias in pattern
Fix not complete after inner-attr in source-file
Fix skipiter not applicable in autoderef
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl producing trailing whitespace
Fix complete after `extern`, add `crate` completion
feature: Set enclosing_range field on SCIP output
fix: Use per-token, not global, edition in the parser
fix: Use root hygiene for speculative resolution
Fix syntax_editor duplicated changed element
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: dfe1b8c97bcde283102f706d5dcdc3649e5e12e3 Filtered ref: d3d1f3831e6b7fa73889d90bc8dd56d22cb80834 Upstream diff: rust-lang/rust@1be6b13...dfe1b8c This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Compute jump threading opportunities in a single pass The current implementation of jump threading walks MIR CFG backwards from each `SwitchInt` terminator. This PR replaces this by a single postorder traversal of MIR. In theory, we could do a full fixpoint dataflow analysis, but this has low returns as we forbid threading through a loop header. The second commit in this PR modifies the carried state to a lighter data structure. The current implementation uses some kind of `IndexVec<ValueIndex, &[Condition]>`. This is needlessly heavy, as the state rarely ever carries more than a few `Condition`s. The first commit replaces this state with a simpler `&[Condition]`, and puts the corresponding `ValueIndex` inside `Condition`. The three later commits are perf tweaks. The sixth commit is the main change. Instead of carrying the goto target inside the condition, we maintain a set of conditions associated with each block, and their consequences in following blocks. Think: if this condition is fulfilled in this block, then that condition is fulfilled in that block. This makes the threading algorithm much easier to implement, without the extra bookkeeping of `ThreadingOpportunity` we had. Later commits modify that algorithm to shrink the set of duplicated blocks. By propagating fulfilled conditions down the CFG, and trimming costly threads.
internal: Remove `TraitEnvironment`
In `BTreeMap::eq`, do not compare the elements if the sizes are different. Reverts rust-lang/rust#147101 in library/alloc/src/btree/ rust-lang/rust#147101 replaced some instances of code like `a.len() == b.len() && a.iter().eq(&b)` with just `a.iter().eq(&b)`, but the optimization that PR introduced only applies for `TrustedLen` iterators, and `BTreeMap`'s itertors are not `TrustedLen`, so this theoretically regressed perf for comparing large `BTreeMap`/`BTreeSet`s with unequal lengths but equal prefixes, (and also made it so that comparing two different-length `BTreeMap`/`BTreeSet`s with elements whose `PartialEq` impls that can panic now can panic, though this is not a "promised" behaviour either way (cc rust-lang/rust#149122)) Given that `TrustedLen` is an unsafe trait, I opted to not implement it for `BTreeMap`'s iterators, and instead just revert the change. If someone else wants to audit `BTreeMap`'s iterators to make sure they always return the right number of items (even in the face of incorrect user `Ord` impls) and then implement `TrustedLen` for them so that the optimization works for them, then this can be closed in favor of that (or if the perf regression is deemed too theoretical, this can be closed outright). Example of theoretical perf regression: https://play.rust-lang.org/?version=beta&mode=release&edition=2024&gist=a37e3d61e6bf02669b251315c9a44fe2 (very rough estimates, using `Instant::elapsed`). In release mode on stable the comparison takes ~23.68µs. In release mode on beta/nightly the comparison takes ~48.351057ms.
minor: Use 'deferred task' terminology consistently
Fix rustdoc warnings and add CI
Fix nested expr missing semicolon in incomplete-let
fix: Register `define_opaque` builtin attribute macro
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to 0afee7b. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
Rollup of 4 pull requests Successful merges: - rust-lang/rust#149563 (f*::min/max: fix comparing with libm and IEEE operations) - rust-lang/rust#149592 (`is_const_default_method` is completely handled by the `constness` query) - rust-lang/rust#149662 (Move attribute lints to `rustc_lint`) - rust-lang/rust#149684 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Implement `Allocator` for `&mut A` where `A: Allocator + ?Sized` This is a breaking change to the unstable `allocator_api` feature. Tracking issue rust-lang/rust#32838. It implements the accepted api change proposal from rust-lang/libs-team#508. The code for the blanket implementation is the same as the one for `&A`, just with the `mut` added.
…ottmcm add Option::into_flat_iter Tracking issue: rust-lang/rust#148441 I only implemented `into_flat_iter` in this PR, but I'd be happy to add `flat_iter` / `flat_iter_mut` (equivalent to calling `as_ref` / `as_mut` first) if those are desired. See rust-lang/libs-team#626 for context.
Assume the returned value in `.filter(…).count()` Similar to how this helps in `slice::Iter::position`, LLVM sometimes loses track of how high this can get, so for `TrustedLen` iterators tell it what the upper bound is.
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146826 (Implement `Allocator` for `&mut A` where `A: Allocator + ?Sized`) - rust-lang/rust#148487 (add Option::into_flat_iter) - rust-lang/rust#148814 (stabilize `array_windows`) - rust-lang/rust#149401 (Fix `name()` functions for local defs in rustc_public) - rust-lang/rust#149683 (Fix armv8r-none-eabihf tier) r? `@ghost` `@rustbot` modify labels: rollup
Revert "Rollup merge of #149147 - chenyukang:yukang-fix-unused_assignments-macro-gen-147648, r=JonathanBrouwer" This reverts commit 82a17b30d8cd379a43c3ee8d12598e89e3be0fbd, reversing changes made to 5019bdaefeebecac42b778ae98def56cab69ab30. Reverts rust-lang/rust#149147 due to a [perf regression](rust-lang/rust#149147 (comment)).
Add `#[inline]` to `Layout::is_size_align_valid` Fixes rust-lang/rust#149687 r? `@saethlin`
…eLapkin early return on duplicate span lowerings `@bors2` try
Implement blessing for tidy alphabetical check r? `@jdonszelmann`
Improve error message for std integer clamp() if min > max For rust-lang/rust#142309: change the error message for `Ord::clamp()` for std integer types if min > max to be more useful. Message is now `min > max. min = {min:?}, max = {max:?}` Also add `#[track_caller]` to `clamp()`
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@5e3e9c4. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
Move the libgccjit.so file in a target directory Since GCC is not multi-target, we need multiple libgccjit.so. Our solution to have a directory per target so that we can have multiple libgccjit.so. r? `@Kobzol`
…tebank Deduplicate higher-ranked lifetime capture errors in impl Trait Previously, when an `impl Trait` captured multiple higher-ranked lifetimes from an outer `impl Trait`, the compiler would emit a separate error for each captured lifetime. This resulted in verbose and confusing diagnostics, especially in edition 2024 where implicit captures caused duplicate errors. This commit introduces error accumulation that collects all capture spans and lifetime declaration spans, then emits a single consolidated diagnostic using MultiSpan. The new error shows all captured lifetimes with visual indicators and lists all declarations in a single note. r? `@estebank` Fixes rust-lang/rust#143022
Stabilize `const_mul_add`
Newly stable API:
```rust
impl {f32, f64} {
pub const fn mul_add(self, a: Self, b: Self) -> Self;
}
```
This includes making the intrinsics `fmaf{16,32,64,128}` const stable for indirect use, matching similar intrinsics.
Closes: rust-lang/rust#146724
Display funding link in the github overview This should be coordinated with rust-lang/blog.rust-lang.org#1751. cc `@Kobzol`
…pkin Statically require links to an issue or the edition guide for all FCWs r? `@wafflelapkin`
Rollup of 7 pull requests Successful merges: - rust-lang/rust#148052 (Stabilize `const_mul_add`) - rust-lang/rust#149386 (Display funding link in the github overview) - rust-lang/rust#149489 (Experimentally add *heterogeneous* `try` blocks) - rust-lang/rust#149764 (Make `--print=backend-has-zstd` work by default on any backend) - rust-lang/rust#149838 (Build auxiliary in pretty tests) - rust-lang/rust#149839 (Use `PointeeSized` bound for `TrivialClone` impls) - rust-lang/rust#149846 (Statically require links to an issue or the edition guide for all FCWs) r? `@ghost` `@rustbot` modify labels: rollup
…,jonathanbrouwer Port `doc` attributes to new attribute API Part of rust-lang/rust#131229. This PR ports the `doc` attributes to the new attribute API. However, there are things that will need to be fixed in a follow-up: * Some part of `cfg_old.rs` are likely unused now, so they should be removed. * Not all error/lints are emitted at the same time anymore, making them kinda less useful considering that you need to run and fix rustc/rustdoc multiple times to get through all of them. * For coherency with the other attribute errors, I didn't modify the default output too much, meaning that we have some new messages now. I'll likely come back to that to check if the previous ones were better in a case-by-case approach. * `doc(test(attr(...)))` is handled in a horrifying manner currently. Until we can handle it correctly with the `Attribute` system, it'll remain that thing we're all very ashamed of. 😈 * A type in rustdoc got its size increased, I'll check the impact on performance. But in any case, I plan to improve it in a follow-up so should be "ok". * Because of error reporting, some fields of `Doc` are suboptimal, like `inline` which instead of being an `Option` is a `ThinVec` because we report the error later on. Part of the things I'm not super happy about but can be postponed to future me. * In `src/librustdoc/clean/cfg.rs`, the `pub(crate) fn parse(cfg: &MetaItemInner) -> Result<Cfg, InvalidCfgError> {` function should be removed once `cfg_trace` has been ported to new `cfg` API. * Size of type `DocFragment` went from 32 to 48. Would be nice to get it back to 32. * ``malformed `doc` attribute input`` wasn't meant for so many candidates, should be improved. * See how many of the checks in `check_attr` we can move to attribute parsing * Port target checking to be in the attribute parser completely * Fix target checking for `doc(alias)` on fields & patterns And finally, once this PR is merged, I plan to finally stabilize `doc_cfg` feature. :) cc `@jdonszelmann` r? `@JonathanBrouwer`
don't normalize where-clauses when checking well-formedness WfCheck checks where-clauses after normalization, and we'd like to see what would break if it didn't for rust-lang/trait-system-refactor-initiative#255 r? ghost
This updates the rust-version file to ce63e5d9ea20f15a70c6fdc4d4de7aee352fd965.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: ce63e5d9ea20f15a70c6fdc4d4de7aee352fd965 Filtered ref: 3be97ed Upstream diff: rust-lang/rust@dfe1b8c...ce63e5d This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Latest update from rustc.