Open
Conversation
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@548e586 Filtered ref: rust-lang/rust-analyzer@aea42e3 Upstream diff: rust-lang/rust@e7d4414...548e586 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Configure flycheck using workspace.discoverConfig
fix: Fixes for builtin derive expansions
Fix not disable string escape highlights
feat: Allow rust paths in symbol search
Fix loses exists guard for move_guard
Fix not applicable on statement for convert_to_guarded_return
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 94a0cd15f5976fa35e5e6784e621c04e9f958e57 Filtered ref: 1b46aa0fdb1e825363174ce509e40466cc0af416 Upstream diff: rust-lang/rust@004d710...94a0cd1 This merge was created using https://github.com/rust-lang/josh-sync.
minor: Sync from downstream
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@ba284f4 Filtered ref: rust-lang/rust-analyzer@374c09e Upstream diff: rust-lang/rust@94a0cd1...ba284f4 This merge was created using https://github.com/rust-lang/josh-sync.
fix: Handle `Self::EnumVariant` and `Self` on traits in doclinks
fix: complete inferred type in static
fix: Fix a panic where an opaque was constrained to an impossible type in method autoderef
Rustc pull update
fix: Fix diagnostics being leaked when diagnostics panic
feat: Implement support for `feature(new_range)`
Support else-branch for move_guard
…ostcard-test Fix linking of postcard test
…fetime migrate introduce_named_lifetime assist to SyntaxEditor
Fix complete semicolon in array expression
Fix incorrect Self path expand for inline_call
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1396514 Filtered ref: rust-lang/rust-analyzer@3efb0c2 Upstream diff: rust-lang/rust@ba284f4...1396514 This merge was created using https://github.com/rust-lang/josh-sync.
minor: Rustc pull update
…-impl-to-use-astnodeedit migrate generate_impl assist to use AstNodeEdit
internal: Refactor handling of associated type shorthand for type parameters, i.e. `T::AssocType` without specifying the trait
fix: Fix predicates of builtin derive traits with two parameters defaulting to `Self`
fix: complete derive helpers on empty nameref
fix: no complete suggest param in complex pattern
fix: complete `.let` on block tail prefix expression
privacy: Fix type privacy holes in RPITITs A subset of rust-lang/rust#146470. Private types in RPITITs now report hard errors. Private types in bounds of associated types still only report the `private_bounds` lint due to unacceptable amount of breakage (rust-lang/rust#146470 (comment)). Closes rust-lang/rust#144139
…-Simulacrum Optimize BTreeMap::append() using CursorMut Since [`BTreeMap::merge`](rust-lang/rust#152418 (comment)) uses `CursorMut` to avoid reconstructing the map from scratch and instead inserting other `BTreeMap` at the right places or overwriting the value in self `BTreeMap` on conflict, we might as well do the same for `BTreeMap::append`. This also means that some of the code in `append.rs` can be removed; `bulk_push()` however is used by `bulk_build_from_sorted_iterator()`, which is used by the `From`/`FromIterator` trait impl on `BTreeMap`. Feels like we should rename the file or place the `bulk_push()` in an existing file. The same additional optimization consideration that `BTreeMap::merge` has is also applied to `BTreeMap::append`. r? @Mark-Simulacrum since Mark has seen the `BTreeMap::merge` code already (only diff is the `Ordering::Equal` case and now one of the test assertions on a panic case has the correct value now).
…chenkov Packages as namespaces part 1 Part 1 of rust-lang/rust#152299 r? @petrochenkov
Remove a flaky `got_timeout` assert from two channel tests In CI, the receiver thread can be descheduled for a surprisingly long time, so there's no guarantee that a timeout actually occurs. One of these tests actually failed in rust-lang/rust#153387 (comment). Earlier failures: - rust-lang/rust#150365 (comment) - rust-lang/rust#147775 (comment) --- - Prior art: rust-lang/rust#152878
Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined . Instead of relying on the linker to find the 'environ' symbol, use dlsym. This fixes using `environ` from cdylibs that link with `-Wl,--no-undefined` . Fixes rust-lang/rust#153451 Sponsored by: ConnectWise
Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname See [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/578893542) for more context. Discussed a bit in rust-lang/rust#153769 (comment) too. This renames `target.abi` to `target.cfg_abi` to make it less likely that someone will use it to determine things about the actual ccABI, i.e. the calling convention used on the target. `target.abi` does not control that calling convention, it just *sometimes* informs the user about that calling convention (and also about other aspects of the ABI). Also turn llvm_abiname into an enum to make it more natural to match on. Cc @workingjubilee @madsmtm
…lacrum Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests This PR once again builds on top of rust-lang/rust#152855. From the discussion in rust-lang/rust#152855, libs team came to the conclusion that `intersperse`/`intersperse_with` shouldn't transform the given iterator to a fused iterator always and a separator should be emitted between `Some(_)` items for non fused iterators (particularly just right before the subsequent `Some(_)`). On top of the change Zakarumych added in the PR, I lifted the `FusedIterator` trait and transformation of the inner `iter` for `Intersperse`/`IntersperseWith`, so that we can display this behavior. I've adjusted the documentation and tests accordingly to reflect this change as well. r? @jhpratt
remove usages of to-be-deprecated numeric constants Split out from rust-lang/rust#146882.
…r=JonathanBrouwer Unknown -> Unsupported compression algorithm Both zstd and zlib are *known* compression algorithms, they just may not be supported by the backend. We shouldn't mislead users into e.g. thinking they made a typo. cc rust-lang/rust#120953
Move `freeze_*` methods to `OpenOptionsExt2` Move the unstable `freeze_last_access_time` and `freeze_last_write_time` from `OpenOptionsExt` to a new `OpenOptionsExt2` trait. This should fix rust-lang/rust#153486.
…athanBrouwer Simplify find_attr! for HirId usage Add a `HasAttrs<'tcx, Tcx>` trait to `rustc_hir` that allows `find_attr!` to accept `DefId`, `LocalDefId`, `OwnerId`, and `HirId` directly, instead of requiring callers to manually fetch the attribute slice first. Before: `find_attr!(tcx.hir_attrs(hir_id), SomeAttr)` After: `find_attr!(tcx, hir_id, SomeAttr)` The trait is defined in `rustc_hir` with a generic `Tcx` parameter to avoid a dependency cycle (`rustc_hir` cannot depend on `rustc_middle`). The four concrete impls for `TyCtxt` are in `rustc_middle`. Fixes rust-lang/rust#153103
std: move `sys::pal::os` to `sys::paths` Part of rust-lang/rust#117276. After rust-lang/rust#150723, rust-lang/rust#153130, rust-lang/rust#153341 and rust-lang/rust#153413, `sys::pal::os` only contains default-path related functions (like `getcwd` and the `PATH`-splitting logic). In line with rust-lang/rust#117276, this PR thus moves all these implementations into a new module in `sys`: `sys::paths`. ~There is one functional change here: The `chdir` implementation on SGX used to use `sgx_ineffective` which silently fails, but now returns an error unconditionally – I think that's much more reasonable given that SGX doesn't support filesystem stuff at all.~ I've corrected the misleading panic messages in `temp_dir` for UEFI and WASI, aside from that, this PR only consists of code moves. CC @jethrogb @raoulstrackx @aditijannu for the SGX change (resolved)
…r=Mark-Simulacrum docs(fs): Clarify That File::lock Coordinates Across Processes ### Summary: The documentation for `lock`, `lock_shared`, `try_lock`, and `try_lock_shared` did not make it clear that these are OS level file locks that coordinate access across processes, not just between handles within the current process. Add "in this or any other process" to each method's existing description to clarify this. Fixes rust-lang/rust#153618 r? @Mark-Simulacrum
…etattrNp, r=Mark-Simulacrum Skip stack_start_aligned for immediate-abort This improves startup performance by 16%, shown by an optimized hello-world program. glibc's `pthread_getattr_np` performs expensive syscalls when reading `/proc/self/maps`. That is all wasted with `panic = immediate-abort` active because `init()` immediately discards the return value from `install_main_guard()`. A similar improvement can be seen in environments that don't have `/proc`. This change is safe because the immediately succeeding comment says that we rely on Linux's "own stack-guard mechanism". Tracking issue: rust-lang/rust#147286 # Benchmark Set it up with `cargo new hello-world2`, and replace these files: ```toml # Cargo.toml cargo-features = ["panic-immediate-abort"] [package] name = "hello-world" version = "0.1.0" edition = "2024" [profile.release] lto = true panic = "immediate-abort" codegen-units = 1 opt-level = "z" strip = true # .cargo/config.toml [unstable] build-std = ["std"] ``` ## Before ```console home@daniel-desktop3:~/CLionProjects/hello-world2$ hyperfine -N target/release/hello-world2 Benchmark 1: target/release/hello-world2 Time (mean ± σ): 524.8 µs ± 65.1 µs [User: 276.1 µs, System: 187.0 µs] Range (min … max): 446.4 µs … 975.5 µs 3996 runs home@daniel-desktop3:~/CLionProjects/hello-world2$ hyperfine -N target/release/hello-world2 Benchmark 1: target/release/hello-world2 Time (mean ± σ): 519.4 µs ± 65.8 µs [User: 282.1 µs, System: 177.7 µs] Range (min … max): 443.2 µs … 830.5 µs 3612 runs home@daniel-desktop3:~/CLionProjects/hello-world2$ hyperfine -N target/release/hello-world2 Benchmark 1: target/release/hello-world2 Time (mean ± σ): 520.0 µs ± 64.3 µs [User: 277.1 µs, System: 182.1 µs] Range (min … max): 447.1 µs … 1001.3 µs 3804 runs ``` For a visualization of the problem, run `cargo +stage1 build --release && perf record --call-graph dwarf -F max ./target/release/hello-world2 && perf script | inferno-collapse-perf | inferno-flamegraph > flamegraph.svg`: <img width="3832" height="1216" alt="flamegraph with 17.41% __pthread_getattr_np" src="https://github.com/user-attachments/assets/acc2286e-1582-4772-9e3b-68b5c35e3e70" /> ## After ```console home@daniel-desktop3:~/CLionProjects/hello-world2$ hyperfine -N target/release/hello-world2Benchmark 1: target/release/hello-world2 Time (mean ± σ): 444.7 µs ± 57.3 µs [User: 257.4 µs, System: 130.2 µs] Range (min … max): 379.4 µs … 1289.3 µs 3893 runs Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options. home@daniel-desktop3:~/CLionProjects/hello-world2$ hyperfine -N target/release/hello-world2 Benchmark 1: target/release/hello-world2 Time (mean ± σ): 452.3 µs ± 60.7 µs [User: 261.5 µs, System: 133.5 µs] Range (min … max): 374.9 µs … 1512.4 µs 4177 runs Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options. home@daniel-desktop3:~/CLionProjects/hello-world2$ hyperfine -N target/release/hello-world2 Benchmark 1: target/release/hello-world2 Time (mean ± σ): 441.2 µs ± 56.1 µs [User: 256.2 µs, System: 128.8 µs] Range (min … max): 375.0 µs … 760.4 µs 4032 runs ```
…ulacrum implement `BinaryHeap::as_mut_slice` Tracking issue: rust-lang/rust#154009
…ooeo
ui/lto: move and rename two tests from issues/
Move:
- `tests/ui/issues/issue-44056.rs` -> `tests/ui/lto/lto-avx-target-feature.rs`
- The first test enables both AVX target features and LTO but does not exercise AVX-specific behavior. The test primarily checks that LTO builds successfully with these flags; place it under `ui/lto` for consistency.
- `tests/ui/issues/issue-51947.rs` -> `tests/ui/lto/lto-weak-merge-functions.rs`
- The second test exercises weak linkage interacting with LTO (merge-functions), so it should belong in `ui/lto`.
I have also added a commented line at the top of each test file indicating the issue it originated from.
allow `incomplete_features` in most UI tests This PR allows the `incomplete_features` lint for all UI tests except for the three directories with the largest number of tests (`traits`, `specialization` and `const-generics`) triggering this lint to keep the size of this PR manageable. The remaining three directories will be handled in followup PRs. Part of rust-lang/rust#154168.
Add new alias for Guillaume Gomez email address I'm switching to a new email account and slowly updating all references to the old one.
diagnostics: avoid ICE for undeclared generic parameter in impl
Avoid an ICE for:
struct A;
impl A<B> {}
The compiler no longer panics and can proceed to emit existing diagnostics.
Adds `tests/ui/missing/undeclared-generic-parameter.rs`.
Fixes rust-lang/rust#154165 and introduced by rust-lang/rust#152913
…cking_issue, r=JonathanBrouwer Update the tracking issue for #[diagnostic::on_move] PR rust-lang/rust#150935 has been merged and then I have opened the tracking issue (whoops ?). So this update `compiler/rustc_feature/src/unstable.rs` to point to the right tracking issue. This is related to the tracking issue rust-lang/rust#154181
Use enums to clarify `DepNodeColorMap` color marking When a function's documentation has to explain the meaning of nested results and options, then it is often a good candidate for using a custom result enum instead. This PR also renames `DepNodeColorMap::try_mark` to `try_set_color`, to make it more distinct from the similarly-named `DepGraph::try_mark_green`. The difference is that `try_mark_green` is a higher-level operation that tries to determine whether a node _can_ be marked green, whereas `try_set_color` is a lower-level operation that actually records a colour for the node. The updated docs for `try_set_color` also fix a typo: *atomicaly* → *atomically*. r? nnethercote (or compiler)
…uwer Rollup of 21 pull requests Successful merges: - rust-lang/rust#152543 (privacy: Fix type privacy holes in RPITITs) - rust-lang/rust#153107 (Optimize BTreeMap::append() using CursorMut) - rust-lang/rust#153312 (Packages as namespaces part 1) - rust-lang/rust#153534 (Remove a flaky `got_timeout` assert from two channel tests) - rust-lang/rust#153718 (Fix environ on FreeBSD with cdylib targets that use -Wl,--no-undefined .) - rust-lang/rust#153857 (Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname) - rust-lang/rust#153880 (Lifted intersperse and intersperse_with Fused transformation and updated documentation + tests) - rust-lang/rust#153931 (remove usages of to-be-deprecated numeric constants) - rust-lang/rust#150630 (Unknown -> Unsupported compression algorithm) - rust-lang/rust#153491 (Move `freeze_*` methods to `OpenOptionsExt2`) - rust-lang/rust#153582 (Simplify find_attr! for HirId usage) - rust-lang/rust#153623 (std: move `sys::pal::os` to `sys::paths`) - rust-lang/rust#153647 (docs(fs): Clarify That File::lock Coordinates Across Processes) - rust-lang/rust#153936 (Skip stack_start_aligned for immediate-abort) - rust-lang/rust#154011 (implement `BinaryHeap::as_mut_slice`) - rust-lang/rust#154167 (ui/lto: move and rename two tests from issues/) - rust-lang/rust#154174 (allow `incomplete_features` in most UI tests) - rust-lang/rust#154175 (Add new alias for Guillaume Gomez email address) - rust-lang/rust#154182 (diagnostics: avoid ICE for undeclared generic parameter in impl) - rust-lang/rust#154188 (Update the tracking issue for #[diagnostic::on_move]) - rust-lang/rust#154201 (Use enums to clarify `DepNodeColorMap` color marking )
…uwer Rollup of 13 pull requests Successful merges: - rust-lang/rust#154241 (`rust-analyzer` subtree update) - rust-lang/rust#153686 (`std`: include `dlmalloc` for all non-wasi Wasm targets) - rust-lang/rust#154105 (bootstrap: Pass `--features=rustc` to rustc_transmute) - rust-lang/rust#153069 ([BPF] add target feature allows-misaligned-mem-access) - rust-lang/rust#154085 (Parenthesize or-patterns in prefix pattern positions in pretty printer) - rust-lang/rust#154191 (refactor RangeFromIter overflow-checks impl) - rust-lang/rust#154207 (Refactor query loading) - rust-lang/rust#153540 (drop derive helpers during attribute parsing) - rust-lang/rust#154140 (Document consteval behavior of ub_checks, overflow_checks, is_val_statically_known.) - rust-lang/rust#154161 (On E0277 tweak help when single type impls traits) - rust-lang/rust#154218 (interpret/validity: remove unreachable error kind) - rust-lang/rust#154225 (diagnostics: avoid ICE in confusable_method_name for associated functions) - rust-lang/rust#154228 (Improve inline assembly error messages)
Always check `ConstArgHasType` even when otherwise ignoring fixes rust-lang/rust#149774 helping @BoxyUwU finish up rust-lang/rust#150322, this is a simple tweak/finishing-up of that PR. this is a breaking change that crater detected has some issues with in Boxy's PR, and hence needs a t-types FCP. I can go and help fix those crates if/once the break is signed off on.
Link LLVM dynamically on aarch64-apple-darwin Follow-up to rust-lang/rust#152768. * Link LLVM dynamically on MacOS * Fix a macOS LLVM dylib name mismatch
…bank rustc_expand: improve diagnostics for non-repeatable metavars There was an initally opened pr which solve this issue here rust-lang/rust#152679. It got merged but, there was a perf regression. And this new pr is opened to address the problem. The first did the computation of binding and matched_rule and then passed them as owned value down to `diagnostics::emit_frag_parse_err(` but, now this pr address the issue by passing `lhs` and `rules` as borrowed value to from_tts and the move the logic to `diagnostics::emit_frag_parse_err(`. Fix rust-lang/rust#47452.
This updates the rust-version file to 1174f784096deb8e4ba93f7e4b5ccb7bb4ba2c55.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@1174f78 Filtered ref: acc3bd4 Upstream diff: rust-lang/rust@eda4fc7...1174f78 This merge was created using https://github.com/rust-lang/josh-sync.
Collaborator
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
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
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.