-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Rollup of 14 pull requests #143946
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
Closed
Closed
Rollup of 14 pull requests #143946
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
The `TyCtxt::hir_get_fn_id_for_return_block()` function was too broad, as it will return positively even when given part of an expression that can be used as a return value. A new `potential_return_of_enclosing_body()` utility function has been made to represent the fact that an expression might be directly returned from its enclosing body.
This commit also adds more test cases, which work fine but were mentioned in the issue.
…links-expansion, r=lolbinarycat [rustdoc] Do not emit redundant_explicit_links lint if the doc comment comes from expansion Fixes rust-lang#141553. The problem was that we change the context for the attributes in some cases to get better error output, preventing us to detect if the attribute comes from expansion. Most of the changes are about keeping track of the "does this span comes from expansion" information. r? ```@Manishearth```
The lint was extra restrictive, and didn't suggest using `core::ptr::null` and `core::ptr::null_mut` in `const` contexts although they have been const-stabilized since Rust 1.24.
…=fee1-dead New const traits syntax This PR only affects the AST and doesn't actually change anything semantically. All occurrences of `~const` outside of libcore have been replaced by `[const]`. Within libcore we have to wait for rustfmt to be bumped in the bootstrap compiler. This will happen "automatically" (when rustfmt is run) during the bootstrap bump, as rustfmt converts `~const` into `[const]`. After this we can remove the `~const` support from the parser Caveat discovered during impl: there is no legacy bare trait object recovery for `[const] Trait` as that snippet in type position goes down the slice /array parsing code and will error r? ``@fee1-dead`` cc ``@nikomatsakis`` ``@traviscross`` ``@compiler-errors``
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#139858 (New const traits syntax) - rust-lang#140809 (Reduce special casing for the panic runtime) - rust-lang#142730 (suggest declaring modules when file found but module not defined) - rust-lang#142806 (Normalize before computing ConstArgHasType goal in new solver) - rust-lang#143046 (const validation: properly ignore zero-sized UnsafeCell) - rust-lang#143092 (const checks for lifetime-extended temporaries: avoid 'top-level scope' terminology) - rust-lang#143096 (tag_for_variant: properly pass TypingEnv) - rust-lang#143104 (hir_analysis: prohibit `dyn PointeeSized`) - rust-lang#143106 (gce: don't ICE on non-local const) Failed merges: - rust-lang#143036 (Remove support for `dyn*` from the compiler) r? `@ghost` `@rustbot` modify labels: rollup
The lint was extra restrictive, and didn't suggest using `core::ptr::null` and `core::ptr::null_mut` in `const` contexts although they have been const-stabilized since Rust 1.24. changelog: [`zero_ptr`]: lint in `const` context as well @rustbot label +I-false-negative +C-bug
…15123) Closes rust-lang/rust-clippy#15116 The cause for this issue is that `_` belongs to the `Common` catagory in unicode instead of `Latin` like other ASCII alphabets. Since ASCII characters are always allowed, I just added an extra `is_ascii()` check to ensure this. changelog: [`disallowed_script_idents`] fix FP on identifiers with `_`
Convert moves of references to copies in ReferencePropagation This is a fix for rust-lang#141101. The root cause of this miscompile is that the SsaLocals analysis that MIR transforms use is supposed to detect locals that are only written to once, in their single assignment. But that analysis is subtly wrong; it does not consider `Operand::Move` to be a write even though the meaning ascribed to `Operand::Move` (at least as a function parameter) by Miri is that the callee may have done arbitrary writes to the caller's Local that the Operand wraps (because `Move` is pass-by-pointer). So Miri conwiders `Operand::Move` to be a write but both the MIR visitor system considers it a read, and so does SsaLocals. I have tried fixing this by changing the `PlaceContext` that is ascribed to an `Operand::Move` to a `MutatingUseContext` but that seems to have borrow checker implications, and changing SsaLocals seems to have wide-ranging regressions in MIR optimizations. So instead of doing those, this PR adds a new kludge to ReferencePropagation, which follows the same line of thinking as the kludge in CopyProp that solves this same problem inside that pass: https://github.com/rust-lang/rust/blob/a5584a8fe16037dc01782064fa41424a6dbe9987/compiler/rustc_mir_transform/src/copy_prop.rs#L65-L98
…-musl, r=workingjubilee,fmease,jieyouxu tests: Fix duplicated-path-in-error fail with musl musl's dlopen returns a different error than glibc, which contains the name of the file. This would cause the test to fail, since the filename would appear twice in the output (once in the error from rustc, once in the error message from musl). Split the expected test outputs for the different libc implementations. Fixes rust-lang#128474
… r=oli-obk Apply RemoveNoopLandingPads post-monomorphization On cargo this cuts ~5% of the LLVM IR lines we generate (measured with -Cno-prepopulate-passes).
…ath, r=lcnr Consider param-env for sizedness fast path Look up `T: Sized` in param-env if `T` is a param or placeholder (the latter is for use in the new solver).
…szelmann Port `#[cfg]` to the new attribute parsing infrastructure Ports `#[cfg]` to the new attribute parsing infrastructure for rust-lang#131229 (comment) I've split this PR into commits for reviewability, and left some comments to clarify things
…Manishearth Clippy subtree update r? `@Manishearth` Cargo.lock update due to `ui_test` bump and restructure.
… r=Kobzol Don't panic if WASI_SDK_PATH not set when detecting compiler The fedora packaging builds the wasm sysroot outside of the rust build system. Fedora applies a couple of patches related to wasm which I think make this possible. Not panicking seems consistent with the detection logic of other targets when they cannot find cc.
Adjust `run_make_support::symbols` helpers Massage the `symbols` helpers to fill out {match all, match any} x {substring match, exact match}: | | Substring match | Exact match | |-----------|----------------------------------------|-------------------------------| | Match any | `object_contains_any_symbol_substring` | `object_contains_any_symbol` | | Match all | `object_contains_all_symbol_substring` | `object_contains_all_symbols` | As I'd like to use `object_contains_all_symbols` for rust-lang#143669. As part of this: - Rename `any_symbol_contains` to `object_contains_any_symbol_substring` for accuracy, as `any_symbol_contains` is actually "contains any matching substring". - Remove `with_symbol_iter`. Noticed while working on rust-lang#143669. r? `@ChrisDenton` (or compiler)
…ross35 Add experimental `backtrace-trace-only` std feature This experimentally allows building std with backtrace but without symbolisation. It does not affect stable and requires build-std to use. This doesn't change the backtrace crate itself so relies on the optimizer to remove the unused parts. Example usage: ```toml # .cargo/config.toml [unstable] build-std = ["core", "alloc", "panic_unwind", "std"] build-std-features = ["backtrace", "backtrace-trace-only", "panic-unwind"] ``` ```toml # Cargo.toml [profile.release] opt-level = 3 lto = "thin" codegen-units = 1 ``` Ideally we should split the backtrace feature into `backtrace-trace` and `backtrace-symbolize` (with the latter dependent on the former) because Cargo features tend to work better when they're positive rather than negative. But I'm keen for this experiment not to break existing users. cc `@joshtriplett`
Constify `Index` traits tracking issue: rust-lang#143775 the `SliceIndex` trait cannot be implemented by users as it is sealed. While it would be useful for the `get` method on slices, it seems weird to have a feature gate for that that isn't also gating index syntax at the same time, so I put them under the same feature gate. r? `@fee1-dead`
…cated-fields, r=jieyouxu Remove deprecated fields in bootstrap This PR removes deprecated fields: 1. `description` - part of rust toml 2. `ccache` - part of llvm toml
…fmease Preserve constness in trait objects up to hir ty lowering r? `@compiler-errors` While we don't support `dyn const Trait`, we can at least also inform the user that `const Trait` is only legal for `#[const_trait] trait Trait {}`
…rrors rustc_type_ir/walk: move docstring to `TypeWalker` itself having it on the impl block is a bit weird imo
Update books ## rust-lang/book 3 commits in ef1ce8f87a8b18feb1b6a9cf9a4939a79bde6795..b2d1a0821e12a676b496d61891b8e3d374a8e832 2025-07-08 17:24:41 UTC to 2025-07-02 21:30:57 UTC - Chapter 16 from tech review (rust-lang/book#4438) - WIP ch 17 edits after tech review (rust-lang/book#4319) - Chapter 15 from tech review (rust-lang/book#4433) ## rust-embedded/book 1 commits in 41f688a598a5022b749e23d37f3c524f6a0b28e1..fe88fbb68391a465680dd91109f0a151a1676f3e 2025-07-08 18:54:25 UTC to 2025-07-08 18:54:25 UTC - Clarify usage of #[interrupt] attribute and recommend device crate re… (rust-embedded/book#386) ## rust-lang/nomicon 3 commits in 8b61acfaea822e9ac926190bc8f15791c33336e8..3ff384320598bbe8d8cfe5cb8f18f78a3a3e6b15 2025-07-05 07:34:22 UTC to 2025-07-05 07:13:51 UTC - Add build script part to FFI chapter for more clear and smooth learn … (rust-lang/nomicon#440) - Cleanups for tree example of splitting borrows (rust-lang/nomicon#443) - Handle drop zst (rust-lang/nomicon#425) ## rust-lang/reference 17 commits in e9fc99f107840813916f62e16b3f6d9556e1f2d8..1f45bd41fa6c17b7c048ed6bfe5f168c4311206a 2025-07-11 23:15:51 UTC to 2025-07-01 16:49:33 UTC - mention an important use for the naked attribute (rust-lang/reference#1929) - Array expression repeat operands can be const blocks. (rust-lang/reference#1928) - Document (tuple) struct pattern namespace behavior (rust-lang/reference#1925) - Replace set of en dashes with set of em dashes (rust-lang/reference#1926) - Update `should_panic` to use the attribute template (rust-lang/reference#1882) - const-eval.const-expr.borrows: mention indirect places (rust-lang/reference#1865) - associated-items.md: remove redundant word (rust-lang/reference#1874) - introduction.md: replace hard-to-read example (rust-lang/reference#1873) - typo (rust-lang/reference#1924) - Update `ignore` to use the attribute template (rust-lang/reference#1881) - Update `test` to use the attribute template (rust-lang/reference#1880) - Update `cfg_attr` to use the attribute template (rust-lang/reference#1879) - Update `cfg` to use the attribute template (rust-lang/reference#1878) - allow constants to refer to mutable/external memory, but reject such constants as patterns (rust-lang/reference#1859) - Remove outdated comment about non-copy unions (rust-lang/reference#1872) - Add a template for documenting attributes (rust-lang/reference#1877) - Switch enum grammar to use "variant" (rust-lang/reference#1876) ## rust-lang/rust-by-example 1 commits in 288b4e4948add43f387cad35adc7b1c54ca6fe12..e386be5f44af711854207c11fdd61bb576270b04 2025-07-04 23:17:15 UTC to 2025-07-04 23:17:15 UTC - Update Chinese translations (rust-lang/rust-by-example#1943)
#143745 is already testing and marked |
Oh, I didn't notice that this PR was actually created, I thought that I cancelled it, it was a missclick, I accidentally rolled up everything (didn't check any checkbox). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-compiletest
Area: The compiletest test runner
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
rollup
A PR which is a rollup
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-clippy
Relevant to the Clippy team.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
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.
Successful merges:
#[cfg]
to the new attribute parsing infrastructure #143460 (Port#[cfg]
to the new attribute parsing infrastructure)run_make_support::symbols
helpers #143837 (Adjustrun_make_support::symbols
helpers)backtrace-trace-only
std feature #143910 (Add experimentalbacktrace-trace-only
std feature)Index
traits #143921 (ConstifyIndex
traits)TypeWalker
itself #143935 (rustc_type_ir/walk: move docstring toTypeWalker
itself)Failed merges:
#[pointee]
to the new attribute parsing infrastructure #143878 (Port#[pointee]
to the new attribute parsing infrastructure)#[coverage]
to the new attribute system #143891 (Port#[coverage]
to the new attribute system)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup