about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-06-18Auto merge of #138165 - jdonszelmann:inline, r=oli-obkbors-29/+28
Rewrite `inline` attribute parser to use new infrastructure and improve diagnostics for all parsed attributes r? `@oli-obk` This PR: - creates a new parser for inline attributes - creates consistent error messages and error codes between attribute parsers; inline and others - as such changes a few error messages for other attributes to be (in my eyes) much more consistent - tests ast-lowering lints introduced by rust-lang/rust#138164 since this is now useful for the first time - Coalesce some useless error codes Builds on top of rust-lang/rust#138164 Closes rust-lang/rust#137950
2025-06-18Auto merge of #138165 - jdonszelmann:inline, r=oli-obkbors-647/+1189
Rewrite `inline` attribute parser to use new infrastructure and improve diagnostics for all parsed attributes r? `@oli-obk` This PR: - creates a new parser for inline attributes - creates consistent error messages and error codes between attribute parsers; inline and others - as such changes a few error messages for other attributes to be (in my eyes) much more consistent - tests ast-lowering lints introduced by rust-lang/rust#138164 since this is now useful for the first time - Coalesce some useless error codes Builds on top of rust-lang/rust#138164 Closes rust-lang/rust#137950
2025-06-18Merge from rust-lang/rustLaurențiu Nicola-16305/+30387
2025-06-18Preparing for merge from rust-lang/rustLaurențiu Nicola-1/+1
2025-06-18Merge from rustcThe Miri Cronjob Bot-5357/+10397
2025-06-18Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-06-18Refactor `range_plus_one` and `range_minus_one` lintsSamuel Tardieu-75/+124
Those lints share the detection logic structure, but differed, probably because of an oversight, in lint emission: only one of them would take care of emitting parentheses around the suggestion if required. Factor the code into one function which checks for the right condition and emits the lint in an identical way.
2025-06-18Restrict the cases where Clippy proposes to switch range typesSamuel Tardieu-59/+389
To limit false positives, the `range_plus_one` and `range_minus_one` lints will restrict themselves to situations where the iterator types can be easily switched from exclusive to inclusive or vice-versa. This includes situations where the range is used as an iterator, or is used for indexing. Also, when the range is used as a function or method call argument and the parameter type is generic over traits implemented by both kind of ranges, the lint will trigger. On the other hand, assignments of the range to variables, including automatically typed ones or wildcards, will no longer trigger the lint. However, the cases where such an assignment would benefit from the lint are probably rare. This fix doesn't prevent false positives from happening. A more complete fix would check if the obligations can be satisfied by the new proposed range type.
2025-06-18add ChildExt(::send_signal)Jeremy Smart-8/+67
2025-06-18Auto merge of #130887 - Soveu:repeatn, r=scottmcmbors-121/+47
Safer implementation of RepeatN I've seen the "Use MaybeUninit for RepeatN" commit while reading This Week In Rust and immediately thought about something I've written some time ago - https://github.com/Soveu/repeat_finite/blob/master/src/lib.rs. Using the fact, that `Option` will find niche in `(T, NonZeroUsize)`, we can construct something that has the same size as `(T, usize)` while completely getting rid of `MaybeUninit`. This leaves only `unsafe` on `TrustedLen`, which is pretty neat.
2025-06-18AsyncDrop trait without sync Drop generates an errorAndrew Zhogin-1/+49
2025-06-17CodeGen: rework Aggregate implemention for rvalue_creates_operand casesScott McMurray-80/+134
Another refactor pulled out from 138759 The previous implementation I'd written here based on `index_by_increasing_offset` is complicated to follow and difficult to extend to non-structs. This changes the implementation, without actually changing any codegen (thus no test changes either), to be more like the existing `extract_field` (<https://github.com/rust-lang/rust/blob/2b0274c71dba0e24370ebf65593da450e2e91868/compiler/rustc_codegen_ssa/src/mir/operand.rs#L345-L425>) in that it allows setting a particular field directly. Notably I've found this one much easier to get right, in particular because having the `OperandRef<Result<V, Scalar>>` gives a really useful thing to include in ICE messages if something did happen to go wrong.
2025-06-18undojnyfah-1/+1
2025-06-18fix formatjnyfah-11/+11
2025-06-18format functionjnyfah-44/+169
2025-06-18Auto merge of #142644 - jhpratt:rollup-f2jed9t, r=jhprattbors-385/+907
Rollup of 14 pull requests Successful merges: - rust-lang/rust#141574 (impl `Default` for `array::IntoIter`) - rust-lang/rust#141608 (Add support for repetition to `proc_macro::quote`) - rust-lang/rust#142100 (rustdoc: make srcIndex no longer a global variable) - rust-lang/rust#142371 (avoid `&mut P<T>` in `visit_expr` etc methods) - rust-lang/rust#142517 (Windows: Use anonymous pipes in Command) - rust-lang/rust#142520 (alloc: less static mut + some cleanup) - rust-lang/rust#142588 (Generic ctx imprv) - rust-lang/rust#142605 (Don't unwrap in enzyme builds in case of missing llvm-config) - rust-lang/rust#142608 (Refresh module-level docs for `rustc_target::spec`) - rust-lang/rust#142618 (Lint about `console` calls in rustdoc JS) - rust-lang/rust#142620 (Remove a panicking branch in `BorrowedCursor::advance`) - rust-lang/rust#142631 (Dont suggest remove semi inside macro expansion for redundant semi lint) - rust-lang/rust#142632 (Update cargo) - rust-lang/rust#142635 (Temporarily add back -Zwasm-c-abi=spec) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-17library: Increase timeout on mpmc test to reduce flakesJubilee Young-2/+2
This recently spuriously failed in a rollup, so I think we can afford to increase the base timeout and the amount of time slept for to provide a much wider margin for the timeout to be reached.
2025-06-18Also emit suggestions for usages in the `non_upper_case_globals` lintUrgau-11/+210
2025-06-17fix clippyJana Dönszelmann-4/+4
2025-06-17bump rustdoc json version for inline attribute representation Jana Dönszelmann-2/+2
2025-06-17fix clippyJana Dönszelmann-18/+13
2025-06-17make error codes reflect reality betterJana Dönszelmann-341/+411
2025-06-17Rollup merge of #142635 - bjorn3:add_back_wasm_spec_abi, r=workingjubileeJacob Pratt-0/+11
Temporarily add back -Zwasm-c-abi=spec This allows a more gradual transition path for projects that need to use use the spec-complaint C ABI both with older and newer rustc versions.
2025-06-17Rollup merge of #142632 - ehuss:update-cargo, r=ehussJacob Pratt-0/+0
Update cargo 6 commits in fc1518ef02b77327d70d4026b95ea719dd9b8c51..2251525ae503fa196f6d7f9ce6d32eccb2d5f044 2025-06-06 04:49:44 +0000 to 2025-06-16 22:01:27 +0000 - feat: Add custom completer for `cargo remove &lt;TAB&gt;` (rust-lang/cargo#15662) - chore(deps): update msrv (3 versions) to v1.85 (rust-lang/cargo#15668) - refactor: replace InternedString with Cow in IndexPackage (rust-lang/cargo#15559) - highlight the correct words (rust-lang/cargo#15659) - CHANGELOG.md: typo (rust-lang/cargo#15660) - Use `Not::not` rather than a custom `is_false` function (rust-lang/cargo#15645)
2025-06-17Rollup merge of #142631 - xizheyin:142143, r=UrgauJacob Pratt-7/+50
Dont suggest remove semi inside macro expansion for redundant semi lint Fixes rust-lang/rust#142143 r? compiler
2025-06-17Rollup merge of #142620 - a1phyr:borrowed_buf_remove_branch, r=jhprattJacob Pratt-3/+3
Remove a panicking branch in `BorrowedCursor::advance`
2025-06-17Rollup merge of #142618 - GuillaumeGomez:eslint-no-console, r=lolbinarycatJacob Pratt-0/+2
Lint about `console` calls in rustdoc JS As discussed [here](https://github.com/rust-lang/rust/pull/142100#discussion_r2151764395), this PR enforces that `console` is not used in rustdoc JS by default. cc `@lolbinarycat`
2025-06-17Rollup merge of #142608 - ↵Jacob Pratt-22/+25
workingjubilee:redescribe-rustc_target-more-accurately, r=wesleywiser Refresh module-level docs for `rustc_target::spec` We have long since gone on a curveball from the flexible-target-specification RFC by introducing stability and soundness promises to the language and compiler which we often struggle with extending to target-specific implementation details. Indeed, we often *literally cannot*. We also have modified the search algorithm details. Update the comments for `rustc_target::spec` considerably.
2025-06-17Rollup merge of #142605 - ZuseZ4:autodiff-check-builds2, r=oli-obkJacob Pratt-13/+14
Don't unwrap in enzyme builds in case of missing llvm-config r? `@onur-ozkan` For some reason x.py was now panicking in this location, so I also removed the unwrap here. part 2 of https://github.com/rust-lang/rust/pull/140000, there shouldn't be other locations where we check for llvm-config.
2025-06-17Rollup merge of #142588 - ZuseZ4:generic-ctx-imprv, r=oli-obkJacob Pratt-9/+6
Generic ctx imprv Cleanup work for my gpu pr r? `@oli-obk`
2025-06-17Rollup merge of #142520 - hkBst:less-static-mut, r=tgross35Jacob Pratt-106/+55
alloc: less static mut + some cleanup I'm looking into https://github.com/rust-lang/rust/issues/125035 and would like some feedback on my approach.
2025-06-17Rollup merge of #142371 - fee1-dead-contrib:push-xqlkumzurkus, r=petrochenkovJacob Pratt-3/+3
avoid `&mut P<T>` in `visit_expr` etc methods trying a different way than rust-lang/rust#141636 r? ghost
2025-06-17Rollup merge of #142517 - ChrisDenton:anon-pipe, r=Mark-SimulacrumJacob Pratt-86/+142
Windows: Use anonymous pipes in Command When setting `Stdio::pipe` on `Command` we want to create an anonymous pipe that can be used asynchronously (at least on our end). Usually we'd use [`CreatePipe`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe) to open anonymous pipes but unfortunately it opens pipes for synchronous access. The alternative is to use [`CreateNamedPipeW`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createnamedpipew) which does allow asynchronous access but that requires giving a file name to the pipe. So we currently have this awful hack where we attempt to emulate anonymous pipes using `CreateNamedPipeW` by attempting to create a unique name and looping until we find one that doesn't already exist. The better option is to use the lower level [`NtCreateNamedPipeFile`](https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file) (which is used internally by both `CreatePipe` and `CreateNamedPipeW`). This function wasn't documented until a few years ago but now that it is it's ok for us to use it. try-job: *msvc* try-job: *mingw*
2025-06-17Rollup merge of #142371 - fee1-dead-contrib:push-xqlkumzurkus, r=petrochenkovJacob Pratt-45/+62
avoid `&mut P<T>` in `visit_expr` etc methods trying a different way than rust-lang/rust#141636 r? ghost
2025-06-17Rollup merge of #142100 - lolbinarycat:rustdoc-srcIndex-138467, r=GuillaumeGomezJacob Pratt-31/+11
rustdoc: make srcIndex no longer a global variable this is one-time initialization data, it can just be a function parameter. while we're doing that, we can more the json parsing into the function and save a few extra bytes of storage for free, at least in the case of multiple crates in a doc bundle. fixes https://github.com/rust-lang/rust/issues/138467
2025-06-17Rollup merge of #141608 - moatom:proc_macro-140238, r=dtolnayJacob Pratt-63/+519
Add support for repetition to `proc_macro::quote` Progress toward: rust-lang/rust#140238
2025-06-17convert entire codebase to parsed inline attrsJana Dönszelmann-29/+28
2025-06-17use consistent attr errors in all attribute parsersJana Dönszelmann-154/+308
2025-06-17Rollup merge of #141574 - fee1-dead-contrib:push-owzulzmzszzx, r=jhprattJacob Pratt-0/+7
impl `Default` for `array::IntoIter` cc rust-lang/rust#91583 my personal use of this feature comes from https://github.com/fee1-dead/w/blob/092db5df631ea515b688bae99c7f02eef12d7221/src/cont.rs#L154-L170 insta-stable, but I feel like this is small enough to _not_ require an ACP (but a FCP per https://forge.rust-lang.org/libs/maintaining-std.html#when-theres-new-trait-impls)? feel free to correct me if I am wrong.
2025-06-17fix bugs in inline/force_inline and diagnostics of all attr parsersJana Dönszelmann-239/+569
2025-06-17convert entire codebase to parsed inline attrsJana Dönszelmann-117/+95
2025-06-17implement rustc_force_inline parserJana Dönszelmann-2/+5
2025-06-17implement inline parserJonathan Dönszelmann-4/+16
2025-06-17Auto merge of #142567 - lnicola:sync-from-ra, r=lnicolabors-3488/+4773
Subtree update of `rust-analyzer` r? `@ghost`
2025-06-17Testsatiscugcat-17/+14
2025-06-17Ran cargo fmt, removed unexpected charactersatiscugcat-28/+25
2025-06-17Moved const fn outside unsafe blocksatiscugcat-11/+13
2025-06-17Changed implementation of _mm{256,512}_alignr_epi8 to match that of ↵satiscugcat-350/+149
_mm_alignr_epi8 in ssse3.rs, also removed the import of the unreachable unchecked hint as it was no longer necessary
2025-06-17Changed implementation of bsrli in avx512.rs to match that of bslli, fixing ↵satiscugcat-195/+78
a bug in the process.
2025-06-17Changed the implementation of bsrli to match bslli in avx2 intrinsicssatiscugcat-132/+46