Repository navigation
Rollup of 8 pull requests - #164979
Rollup of 8 pull requests#164979
Conversation
Example
---
```rust
macro_rules! identity { ($($t:tt)*) => { $($t)* }; }
struct Foo;
impl Foo {
fn foo(self, r1: u32, r2: u32, (complex,): (u32,)) {
identity! {
let _ = self;
let _ = r1;
let _ = (r2, r2);
let _ = complex;
}
}
}
fn bar() {
Foo.$0foo(1, 2, (3,));
}
```
**Before this PR**
request handler panicked: TextRange -offset overflowed
**After this PR**
```rust
fn bar() {
{
let this = Foo;
let r1 = 1;
let r2 = 2;
let (complex,) = (3,);
identity! {
let _ = this;
let _ = r1;
let _ = (r2, r2);
let _ = complex;
}
};
}
```
- And fix method call name-match
Example
---
```rust
struct S { info: u32 }
impl S {
fn info(&self) -> u32 { self.info }
fn foo(&self) {
needs(i$0);
}
}
fn needs(info: &mut u32) {}
```
**Before this PR**
```text
fd self.info u32 [name]
lc self &S [local]
st S S []
sp Self S []
fn needs(…) fn(&mut u32) []
me self.foo() fn(&self) []
me self.info() fn(&self) -> u32 []
```
**After this PR**
```text
fd self.info u32 [name]
fd &mut self.info [type+name]
me self.info() fn(&self) -> u32 [name]
me &mut self.info() [type+name]
lc self &S [local]
st S S []
sp Self S []
fn needs(…) fn(&mut u32) []
me self.foo() fn(&self) []
```
Example
---
```rust
//- /lib.rs
mod sub {
mod $0
}
//- /sub/lib.rs
//- /sub/main.rs
```
**Before this PR**
Cannot complete any modules
**After this PR**
```rust
md lib;
md main;
```
This is convenient for jumping out and makes it work on some clients that do not support multi-`$0` tabstop
Example
---
**Before this PR**
```rust
snippet(ctx, cap, "pd", "eprintln!(\"$0 = {:?}\", $0);")
```
**After this PR**
```rust
snippet(ctx, cap, "pd", "eprintln!(\"$1 = {:?}\", $1);")
```
minor: 'pd' snippet use `$1` instead of multi `$0`
Example
---
```rust
fn () {}
```
```diff
SOURCE_FILE
FN
FN_KW "fn"
WHITESPACE " "
- ERROR
+ PARAM_LIST
L_PAREN "("
- ERROR
R_PAREN ")"
WHITESPACE " "
BLOCK_EXPR
STMT_LIST
L_CURLY "{"
R_CURLY "}"
WHITESPACE "\n"
-error 3: expected a name
-error 4: expected function arguments
-error 4: expected a curly brace
+error 2: expected a name
```
Example
---
```rust
const _=x::()
```
```diff
CONST
CONST_KW "const"
WHITESPACE " "
UNDERSCORE "_"
EQ "="
PATH_EXPR
PATH
PATH
PATH_SEGMENT
NAME_REF
IDENT "x"
COLON2 "::"
- PATH_SEGMENT
- ERROR
- L_PAREN "("
-ERROR
- R_PAREN ")"
+ ARG_LIST
+ L_PAREN "("
+ R_PAREN ")"
```
Bump smol_str to 0.3.7
Use `publish = false` for the `toolchain` crate
Update smolstr CHANGELOG and publish
…-inference fix: emit E0029 for range patterns with inferred invalid types
About macro hygiene, avoid error when user defined a `format_args!` in scope
fix: use absolute path in format_smolstr
…acro fix: do not panic when inline call param usages in macro
minor: Fix fuzz CI
`LeafRegionConstraint`, `Or`, `And`, and `RegionConstraint` defaulted their span parameter to `()`, which reads as an empty tuple rather than as "this constraint has no span". Add a `NoSpan` unit struct and use it as the default, and add a `ConstraintSpan` trait implemented for `NoSpan` and `rustc_span::Span`. This replaces the repeated `Clone + Debug + Eq + Hash` bounds on the constructors and span conversion helpers. No behavior change.
…pace The rustc-dev component ships the compiler sources with `rustc-src/rust/compiler/rustc/Cargo.toml` as the entry manifest, but without the workspace root manifest next to the lockfile at `rustc-src/rust/Cargo.lock`. FetchMetadata only looked for a lockfile right next to the manifest, so the rustc workspace's metadata fetch always ran with `--locked` and no lockfile. cargo then fails, and rust-analyzer silently degrades to `--no-deps` metadata, dropping rustc_middle and friends from the crate graph entirely. For the rustc workspace only, copy the lockfile from the root of the rust source tree instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…estors Search manifest ancestors for the lockfile when fetching cargo metadata
fix: compute ref-match on undotted self
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
minor: add '(' to item recover, improve fn missing name
…ndles-len, r=joboet Use the updated buffer length in UEFI locate_handles locate_handles was using the handle count from the first LocateHandle call when setting the vec length, instead of the size the second call actually wrote. If handles go away between the two calls this marks uninitialized entries as initialized. Use the updated buf_len instead. Fixes rust-lang#164945
…n-spawn-failure, r=joboet uefi: roll back env changes when `start_image` fails Fixes rust-lang#164949 On UEFI, `process::output` applies the child's environment changes to the process-global UEFI environment and rolls them back after `start_image`. If `start_image` returned an error, the `?` returned early before the rollback ran, so the child's variables (notably `path`, which later `resolve_program` lookups depend on) leaked permanently into the parent. This keeps the `start_image` result, restores the environment unconditionally, and only then propagates the error. Tested with `./x check library --target x86_64-unknown-uefi`, `./x fmt --check` and `./x test tidy`. I have not run it on UEFI hardware or under QEMU. cc @dvdhrm @nicholasbishop (UEFI target maintainers)
…ts, r=joboet thread_local::guard: update comments a bit The `thread_current_in_dtor` test recently failed in Miri so I had to dig into this. - Mention at the top that this file is also responsible for calling `rt::thread_cleanup`. - The comments used to skip some reasoning steps, probably taking them for granted. Add a bit more detail to make them easier to follow. r? @joboet
…-sub, r=lcnr Remove the 'sub' method from 'At' and migrate to 'sub_raw' Continuation of rust-lang#163978, similar scope to rust-lang#164244.
…yperia Use a NoSpan marker for region constraints without spans `LeafRegionConstraint`, `Or`, `And`, and `RegionConstraint` defaulted their span parameter to `()`, which reads as an empty tuple rather than as "this constraint has no span". Add a `NoSpan` unit struct and use it as the default, and add a `ConstraintSpan` trait implemented for `NoSpan` and `rustc_span::Span`. This replaces the repeated `Clone + Debug + Eq + Hash` bounds on the constructors and span conversion helpers.
…ds, r=hanna-kruppe Remove redundant vec and duplicate indexing in find_noop_landing_pads The original code looks like some refactoring artifact. The `map().collect()` chain is redundant because the `vec` is immediately turned into iterator again, and it throws away the `BasicBlockData` reference just to look it up again in the main loop.
…us-easy, r=Kivooeo Reduce `SpanData` use `SpanData` is mostly an internal detail, and using `Span` is preferable where possible. Details in individual commits. r? @Kivooeo
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@6ee6a51. Created using https://github.com/rust-lang/josh-sync. r? @ghost
|
@bors r+ p=5 force |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 019b59d (parent) -> 846e51f (this PR) Test differencesShow 31 test diffsStage 0
Stage 1
Additionally, 14 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 846e51f66b1e7b49ba9e3988c58ccfe5817ce0a9 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (846e51f): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis perf run didn't have relevant results for this metric. Max RSS (memory usage)Results (primary -0.4%, secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -0.4%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 489.601s -> 489.496s (-0.02%) |
|
📌 Perf builds for each rolled up PR:
parent commit: 019b59d810 In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
Successful merges:
start_imagefails #164958 (uefi: roll back env changes whenstart_imagefails)SpanDatause #164954 (ReduceSpanDatause)rust-analyzersubtree update #164970 (rust-analyzersubtree update)r? @ghost
Create a similar rollup