Rollup of 9 pull requests#157600
Conversation
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Example
---
**Before this PR**
```rust
async fn test_async(foo: i32, _: i32) {}
fn main() {
test_async(1, 2)
//^ foo
//^ <ra@gennew>0
```
**After this PR**
```rust
async fn test_async(foo: i32, _: i32) {}
fn main() {
test_async(1, 2)
//^ foo
```
fix: no hint ra@gennew param
…rs" assist I also made some changes to lang items, which turned out not needed but I think they're useful too, maybe in the future or maybe ot outside projects.
fix: Do not fill both `drop()` and `pin_drop()` in the "fill missing members" assist
…ant ID / tuple ID needed) bring back env for projection_ty cleanups
As of writing, this is still rejected by rustc at a later stage.
Example
---
```rust
struct Foo<T, const N: usize>([T; N]);
impl<T, const N: usize> F$0oo<T, N> {
fn spec_len(&self) -> usize {
N
}
}
```
**Before this PR**
```rust
struct Foo<T, const N: usize>([T; N]);
trait SpecLen<T, const N: usize> {
fn spec_len(&self) -> usize;
}
impl<T, const N: usize> SpecLen<T, N> for Foo<T, N> {
fn spec_len(&self) -> usize {
N
}
}
```
**After this PR**
```rust
struct Foo<T, const N: usize>([T; N]);
trait SpecLen {
fn spec_len(&self) -> usize;
}
impl<T, const N: usize> SpecLen for Foo<T, N> {
fn spec_len(&self) -> usize {
N
}
}
```
…here the array length cannot be inferred
…-no-error fix: Do not emit a "type annotations needed" error on `include_bytes!()` where the array length cannot be inferred
…tOne The old code looks like a copy-paste mistake.
Address the FIXMEs in crates/hir-ty/src/lower.rs where next_ty_var, next_const_var, and next_region_var silently returned error types without emitting diagnostics when inference variables are not allowed (e.g., `_` in type aliases, consts, statics, struct fields). - Add InferVarsNotAllowed variant to TyLoweringDiagnostic enum - Call push_diagnostic in the three next_*_var functions for any non-dummy span - Convert TyLoweringDiagnostic from struct+kind to flat enum with per-variant source (TypeRefId for PathDiagnostic, Span for InferVarsNotAllowed) - Add span_syntax helper resolving all Span variants to AST nodes - Extract expr_syntax/pat_syntax/type_syntax/span_syntax closures from inference_diagnostic into associated functions on AnyDiagnostic - Add InferVarsNotAllowed HIR diagnostic struct with InFile<SyntaxNodePtr> node - Add ide-diagnostics handler with E0121 error code and tests
…ct-json fix: RunnableKind::Test should map to project_json::RunnableKind::TestOne
`pat()` does not parse or patterns.
feat(diagnostics): emit error for infer vars in non-inference contexts
fix: Parse OR pattern types
internal: Align MIR ProjectionElem more with rustc's version and simplify it
This is needed so that IDE features can find their anon consts and work with them. We lower them in `field_types()`, which seemed appropriate (we need to know the type for the const, and creating another query doesn't seem worth it). We'll also need them for const eval, but currently default expressions are not handled in MIR.
…s-infer feat: Lower field defaults to `rustc_type_ir::Const`s
…gen-args fix: no generate unused generic params in trait sign
I'm seeing several occurrences of errors of the form: ``` Unable to get `FileSourceRootInput` with `vfs::FileId` (FileId(22452)); this is a bug ``` I suspect it occurs when the user has many projects open, but I can't reliably reproduce yet. In the meantime, include the actual file name to aid debugging. AI disclosure: Partially written with Codex and GPT 5.5.
This comment has been minimized.
This comment has been minimized.
Rollup of 9 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1 try-job: i686-msvc-2
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
This comment has been minimized.
This comment has been minimized.
|
💔 Test for cf37949 failed: CI. Failed job:
|
|
Hm, try job failure is still docker networking 🤔 Maybe it's slowly improving |
|
📌 Perf builds for each rolled up PR:
previous master: 06293ff2b1 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
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 06293ff (parent) -> 877a131 (this PR) Test differencesShow 1482 test diffsStage 0
Stage 1
Stage 2
(and 532 additional test diffs) Additionally, 850 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 877a13169d4cc9f943ae776d84a5c80aa77e0096 --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 (877a131): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.4%, secondary 3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -0.9%)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: 516.268s -> 516.107s (-0.03%) |
Successful merges:
rust-analyzersubtree update #157599 (rust-analyzersubtree update)is_udt#157298 (Use alternate means of detecting enums inis_udt)integer_casts#157402 (Implement featureinteger_casts)errors.rsfile todiagnostics.rs(2/N) #157535 (Renameerrors.rsfile todiagnostics.rs(2/N))errors.rsfile todiagnostics.rs(3/N) #157585 (Renameerrors.rsfile todiagnostics.rs(3/N))mul nuw nswinintrinsics::copy#157588 (Usemul nuw nswinintrinsics::copy)r? @ghost
Create a similar rollup