Rollup of 6 pull requests - #162405
Closed
JonathanBrouwer wants to merge 69 commits into
Closed
Conversation
Installing cargo tools (`cargo install`) without locked dependencies exposes users to supply-chain attacks to all the dependencies of the tool (https://blog.rust-lang.org/2026/08/20/supply-chain-attack-on-arrayref/). Using `cargo install --locked` reduces this risk to a compromise of the tool itself, while using the locked and hashed version of the dependencies. I went through all `rg "cargo install"` hits in the repository and added `--locked` to all but explanatory examples (such as cargo's docs on `cargo install` itself). I validated that those tools publish functioning `Cargo.lock`s with https://gist.github.com/konstin/bcb1169c1c1120c259dca64e777a64d0.
For two reasons: - This simplifies my work to fix rust-lang/rust-analyzer#23088; to fix that issue, macros must have to be able to return doc comments (and not just desugared doc comments), and code in `syntax-bridge` doesn't expect macros to return trivia. Making doc comments non-trivia solves that. - It should simplify the work to attach trivia to tokens; doc comments have no obvious place to attach (for example, when between two attributes we must attach them to either the preceding `]` or the following `#`, both will complicate code handling them). Furthermore, arguably doc comments are really not a trivia: it's an error to put them in an unexpected place, and reason 2 above reveals that they're more like a kind of an attribute than a comment. This touches a lot of places (especially assists etc.) subtly; I fixed what I found and the tests helped reveal more, but it's certainly possible some places are still not handling them correctly now.
internal: rename some stuff in mir
`body` is no longer a neighbouring module, but rather a child of `expr_store`
The `continue` was aimed at the incorrect loop. I thought this will cause an infinite loop but it doesn't seem to, still it's incorrect.
fix: Fix handling of `#[unsafe()]` attrs without inner meta
A lot of callsites handled these variants similarly, so this ended up simplifying things.
Example
---
```diff
-fn method(&mut self,params: <ty!()as SomeTrait>::Output) {}
+fn method(&mut self, params: <ty!()as SomeTrait>::Output) {}
```
merge `hir_def::hir::Expr::Unsafe` into `Expr::Block`
minor: add space after comma in prettify macro expansion
update typos-cli
…ource Address FIXME in base-db and update docs
…locked Install cargo tools with locked dependencies
Example
---
```rust
fn main() {
$01f64;
}
```
**Before this PR**
```rust
value of literal: ` 1 (0x1|0b1) `
```
**After this PR**
```rust
value of literal: ` 1 (bits: 0x3FF0000000000000) `
```
fix: hover `1f64` use float instead of integer
This updates the rust-version file to 59dabe5.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@59dabe5 Filtered ref: rust-lang/rust-analyzer@4821b91 Upstream diff: rust-lang/rust@f7d782a...59dabe5 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
…lf-segment fix: accept Self as non-leading path segment in attribute paths
…etails render const value in completions label details
read(true) was chained onto custom_flags(O_NOFOLLOW) inside a cfg block that excludes those two targets, so their OpenOptions had no access mode set and open() returned EINVAL before any chmod happened. Neither target has an fchmodat arm either, so set_permissions_nofollow could never succeed there.
This updates the rust-version file to 32d94cc.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@32d94cc Filtered ref: rust-lang/rust-analyzer@a4fa191 Upstream diff: rust-lang/rust@59dabe5...32d94cc This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@cf0d2d9. Created using https://github.com/rust-lang/josh-sync. r? @ghost
…r=jieyouxu Allow overriding filecheck even if LLVM is built or downloaded @antoyo ran into some issues with this, because he wants to run UI tests using the GCC codegen backend. But the tests still require LLVM FileCheck for checking annotations, so he had to download/build LLVM. But really the thing he wants is just to provide an external FileCheck, and that's it. I don't see why we couldn't allow providing filecheck separately, now that it is an explicit step in bootstrap. r? jieyouxu
… r=notriddle fix bare urls split text Fixes rust-lang#162345. The whole fix is explained in the comment in the diff.
…x, r=Darksonn std: fix set_permissions_nofollow on espidf and horizon read(true) was chained onto custom_flags(O_NOFOLLOW) inside a cfg block that excludes those two targets, so their OpenOptions had no access mode set and open() returned EINVAL before any chmod happened. Neither target has an fchmodat arm either, so set_permissions_nofollow could never succeed there.
…r=folkertdev add regression test for packus_epi16 issue rust-lang#159464 got fixed without a test. This adds the missing test. Ideally this would be tested in stdarch, but we don't have enough infrastructure for that. Testing it here is better than not testing it at all. Cc @folkertdev
…=RalfJung remove outdated comment in `UnsafeCell::raw_get` source It was decided that UnsafeCell can be accessed mutably without going through `get` (rust-lang/unsafe-code-guidelines#281) and a comment stating that std has special privileges was removed in rust-lang#159730, but that PR missed `raw_get`. This comment actively contradicted `CovariantUnsafeCell`: https://github.com/rust-lang/rust/blob/5a2be9f5f075d31e3ca5526b5b029881ce441253/library/core/src/cell/covariant_unsafe_cell.rs#L154-L161
Member
Author
|
@bors r+ p=5 |
Contributor
Member
|
current runner is stalled; I threw everything into one rollup |
Contributor
|
This pull request was unapproved due to being closed. |
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.
Successful merges:
rust-analyzersubtree update #162404 (rust-analyzersubtree update)UnsafeCell::raw_getsource #162390 (remove outdated comment inUnsafeCell::raw_getsource)r? @ghost
Create a similar rollup