Skip to content
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

Rollup of 9 pull requests #136165

Closed
wants to merge 87 commits into from
Closed

Conversation

Zalathar
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

ThouCheese and others added 30 commits January 18, 2025 19:35
internal: Move dual blanket impl logic from source analyzer to goto_def
This time, when completing the keyword (e.g. `fn` + whitespace).

The bug was actually a double-bug:
First, we did not resolve the impl in the macro-expanded file but in the real file, which of course cannot work.
Second, in analysis the whitespace was correlated with the `impl` and not the incomplete `fn`, which caused fake (where we insert an identifier after the whitespace) and real expansions to go out of sync, which failed analysis. The fix is to skip whitespaces in analysis.
fix: Only refresh syntax tree view when the active document changes
fix: Fix missing upmapping in trait impls completion
internal: Cleanup `Name` string rendering
Goto `Display::fmt` when invoked on `to_string`
…t don't

I don't think my ranking is perfect, because it places them even behind snippet completions, but this is something.
fix: Sort completion items that skip `await` and  `iter()` behind those that don't
If the user doesn't have rustc on $PATH, rust-analyzer won't be able
to run `rustc --print cfg`. This isn't really an error, as
rust-analyzer can still proceed without it.

This is particularly noticeable when loading crates defined in a
rust-project.json. Until the configuration is loaded, the opened files
are briefly treated as detached files and users see this error.

Environments with rust-project.json generally have a sysroot and rustc
elsewhere, so the error confuses users.
Ensure that all the fields that rust-analyzer understands are in the
manual, they all have doc comments, and they use consistent
punctuation (`;` rather than mixing `,` and `;`).

Whilst we're here, fix the `sysroot_src` example and add 2024 as a
legal value for Rust edition.
manual: Document all rust-project.json fields
The limit was introduced in rust-lang/rust-analyzer#1408 (comment) to avoid infinite cycles but it effectively caps the number of derefs to 10. Types like `ID3D12Device14` from the `windows` crate run into this because it derefs to `ID3D12Device13`, 13 to 12 and so on. Increasing it to 20 is a quick fix; a better cycle detection method would be nicer long term.
increase `AUTODEREF_RECURSION_LIMIT` to 20
saethlin and others added 10 commits January 27, 2025 19:23
…r=compiler-errors

Trim extra whitespace in fn ptr suggestion span

Trim extra whitespace when suggesting removal of invalid qualifiers when parsing function pointer type.

Fixes: rust-lang#133083

---

I made a comment about the format of the diagnostic error message in rust-lang#133083 (comment). I think the `.label` may be a little redundant if the diagnostic only highlights the bad qualifier instead of the entire `TyKind::BareFn` span. If it makes sense, I can include it in this PR.
…, r=nnethercore

Remove -Zinline-in-all-cgus and clean up tests/codegen-units/

Implementation of rust-lang/compiler-team#814

I've taken some liberties with cleaning up the CGU partitioning tests, because that's the only place this flag was used and also mattered. I've often fought a lot with the contents of `tests/codegen-units` and it has never been clear to me when a test failure indicates a problem with my changes as opposed to a test just needing to be manually blessed. Hopefully the combination of the new README, new comments, and using `-Zprint-mono-items=lazy` in the partitioning tests improves that.

I've also deleted some of the `tests/run-make/sepcomp` tests. I think all the "sepcomp" tests have been obviated for years by better-designed (less flaky, clearer failures) test suites, but here I'm just deleting the ones I'm confident in.
…bjorn3,wesleywiser

Windows x86: Change i128 to return via the vector ABI

Clang and GCC both return `i128` in xmm0 on windows-msvc and windows-gnu. Currently, Rust returns the type on the stack. Add a calling convention adjustment so we also return scalar `i128`s using the vector ABI, which makes our `i128` compatible with C.

In the future, Clang may change to return `i128` on the stack for its `-msvc` targets (more at [1]). If this happens, the change here will need to be adjusted to only affect MinGW.

Link: rust-lang#134288 (does not fix) [1]

try-job: x86_64-msvc
try-job: x86_64-msvc-ext1
try-job: x86_64-mingw-1
try-job: x86_64-mingw-2
Document purpose of closure in from_fn.rs more clearly

partial fix for rust-lang#135087 together with rust-lang#135895
Document powf and powi values that are always 1.0

fixes bug rust-lang#90429
…=matthewjasper

Add mermaid graphs of NLL regions and SCCs to polonius MIR dump

This PR expands the polonius MIR dump again with a couple of mermaid charts ported from the graphviz version:
- the NLL region graph
- and the NLL SCCs

I still have done zero visual design on this until now, but [here's](https://gistpreview.github.io/?fbbf900fed2ad21108c7ca0353456398) how it looks (i.e. still bad) just to give an idea of the result.

r? `@matthewjasper` (feel free to reassign) or anyone
Subtree update of `rust-analyzer`

r? ``@ghost``
Update books

## rust-lang/book

3 commits in 82a4a49789bc96db1a1b2a210b4c5ed7c9ef0c0d..fa312a343fbff01bc6cef393e326817f70719813
2025-01-22 17:14:29 UTC to 2025-01-22 15:09:26 UTC

- chore: reformat src with dprint (rust-lang/book#4211)
- Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209)
- Document that `use` is also for `precise capturing` (rust-lang/book#4210)

## rust-lang/edition-guide

1 commits in d56e0f3a0656b7702ca466d4b191e16c28262b82..4ed5a1a4a2a7ecc2e529a5baaef04f7bc7917eda
2025-01-21 21:39:56 UTC to 2025-01-21 21:39:56 UTC

- Add alternatives for static-mut-refs (rust-lang/edition-guide#354)

## rust-lang/nomicon

3 commits in 625b200e5b33a5af35589db0bc454203a3d46d20..bc2298865544695c63454fc1f9f98a3dc22e9948
2025-01-23 19:01:24 UTC to 2025-01-20 14:37:52 UTC

- corrected grammatical error. (rust-lang/nomicon#477)
- Remove `#![start]` attribute (rust-lang/nomicon#478)
- Update guidance on uninitialized fields to use &raw mut instead of addr_of_mut! (rust-lang/nomicon#476)

## rust-lang/reference

10 commits in 293af991003772bdccf2d6b980182d84dd055942..93b921c7d3213d38d920f7f905a3bec093d2217d
2025-01-25 21:59:01 UTC to 2025-01-14 17:28:04 UTC

- distinct 'static' items never overlap (rust-lang/reference#1657)
- Change `'_static` to `'static` as an invalid lifetime parameter name (rust-lang/reference#1721)
- reword reference about inert attributes (rust-lang/reference#1719)
- Provide a better error message for broken links in mdbook-spec (rust-lang/reference#1716)
- Remove unstable vectorcall (rust-lang/reference#1717)
- Move the function pointer example (rust-lang/reference#1718)
- references and Box must be non-null (rust-lang/reference#1715)
- Fix filename for theme customization (rust-lang/reference#1711)
- Add Identifier Syntax to Several Chapters (rust-lang/reference#1597)
- move r[rules] to the left of the main body, using a grid (rust-lang/reference#1710)
Locate asan-odr-win with other sanitizer tests
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. rollup A PR which is a rollup labels Jan 28, 2025
@Zalathar
Copy link
Contributor Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jan 28, 2025

📌 Commit c12e2dd has been approved by Zalathar

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 28, 2025
@bors
Copy link
Contributor

bors commented Jan 28, 2025

⌛ Testing commit c12e2dd with merge 3ec8575...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 28, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#133151 (Trim extra whitespace in fn ptr suggestion span)
 - rust-lang#133929 (Remove -Zinline-in-all-cgus and clean up tests/codegen-units/)
 - rust-lang#134290 (Windows x86: Change i128 to return via the vector ABI)
 - rust-lang#135886 (Document purpose of closure in from_fn.rs more clearly)
 - rust-lang#136012 (Document powf and powi values that are always 1.0)
 - rust-lang#136104 (Add mermaid graphs of NLL regions and SCCs to polonius MIR dump)
 - rust-lang#136117 (Subtree update of `rust-analyzer`)
 - rust-lang#136143 (Update books)
 - rust-lang#136153 (Locate asan-odr-win with other sanitizer tests)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-nopt failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [codegen-units] tests/codegen-units/item-collection/drop_in_place_intrinsic.rs stdout ----

The following items were assigned to wrong codegen units:

fn std::ptr::drop_in_place::<StructWithDtor> - shim(Some(StructWithDtor))
  expected: drop_in_place_intrinsic-cgu.0[Internal] 
  actual:   drop_in_place_intrinsic-cgu.0[External] 

fn std::ptr::drop_in_place::<[StructWithDtor; 2]> - shim(Some([StructWithDtor; 2]))
  expected: drop_in_place_intrinsic-cgu.0[Internal] 
  actual:   drop_in_place_intrinsic-cgu.0[External] 

fn std::ptr::drop_in_place::<[StructWithDtor]> - shim(Some([StructWithDtor]))
  expected: drop_in_place_intrinsic-cgu.0[Internal] 
  actual:   drop_in_place_intrinsic-cgu.0[External] 

thread '[codegen-units] tests/codegen-units/item-collection/drop_in_place_intrinsic.rs' panicked at src/tools/compiletest/src/runtest/codegen_units.rs:105:13:
explicit panic
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- [codegen-units] tests/codegen-units/item-collection/generic-drop-glue.rs stdout ----

The following items were assigned to wrong codegen units:

fn std::ptr::drop_in_place::<EnumWithDrop<f64, f32>> - shim(Some(EnumWithDrop<f64, f32>))
  expected: generic_drop_glue-cgu.0[Internal] 
  actual:   generic_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<EnumWithDrop<i32, i64>> - shim(Some(EnumWithDrop<i32, i64>))
  expected: generic_drop_glue-cgu.0[Internal] 
  actual:   generic_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<NonGenericWithDrop> - shim(Some(NonGenericWithDrop))
  expected: generic_drop_glue-cgu.0[Internal] 
  actual:   generic_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<StructNoDrop<NonGenericWithDrop, f64>> - shim(Some(StructNoDrop<NonGenericWithDrop, f64>))
  expected: generic_drop_glue-cgu.0[Internal] 
  actual:   generic_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<StructWithDrop<&str, NonGenericNoDrop>> - shim(Some(StructWithDrop<&str, NonGenericNoDrop>))
  expected: generic_drop_glue-cgu.0[Internal] 
  actual:   generic_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<StructWithDrop<i8, char>> - shim(Some(StructWithDrop<i8, char>))
  expected: generic_drop_glue-cgu.0[Internal] 
  actual:   generic_drop_glue-cgu.0[External] 

thread '[codegen-units] tests/codegen-units/item-collection/generic-drop-glue.rs' panicked at src/tools/compiletest/src/runtest/codegen_units.rs:105:13:
explicit panic


---- [codegen-units] tests/codegen-units/item-collection/non-generic-drop-glue.rs stdout ----

The following items were assigned to wrong codegen units:

fn std::ptr::drop_in_place::<EnumWithDrop> - shim(Some(EnumWithDrop))
  expected: non_generic_drop_glue-cgu.0[Internal] 
  actual:   non_generic_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<StructWithDrop> - shim(Some(StructWithDrop))
  expected: non_generic_drop_glue-cgu.0[Internal] 
  actual:   non_generic_drop_glue-cgu.0[External] 

thread '[codegen-units] tests/codegen-units/item-collection/non-generic-drop-glue.rs' panicked at src/tools/compiletest/src/runtest/codegen_units.rs:105:13:
explicit panic


---- [codegen-units] tests/codegen-units/item-collection/transitive-drop-glue.rs stdout ----

The following items were assigned to wrong codegen units:

fn std::ptr::drop_in_place::<Intermediate> - shim(Some(Intermediate))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<IntermediateGen<i16>> - shim(Some(IntermediateGen<i16>))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<IntermediateGen<u32>> - shim(Some(IntermediateGen<u32>))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<Leaf> - shim(Some(Leaf))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<LeafGen<i16>> - shim(Some(LeafGen<i16>))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<LeafGen<u32>> - shim(Some(LeafGen<u32>))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<Root> - shim(Some(Root))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<RootGen<i16>> - shim(Some(RootGen<i16>))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<RootGen<u32>> - shim(Some(RootGen<u32>))
  expected: transitive_drop_glue-cgu.0[Internal] 
  actual:   transitive_drop_glue-cgu.0[External] 

thread '[codegen-units] tests/codegen-units/item-collection/transitive-drop-glue.rs' panicked at src/tools/compiletest/src/runtest/codegen_units.rs:105:13:
explicit panic


---- [codegen-units] tests/codegen-units/item-collection/tuple-drop-glue.rs stdout ----

The following items were assigned to wrong codegen units:

fn std::ptr::drop_in_place::<(Dropped, bool)> - shim(Some((Dropped, bool)))
  expected: tuple_drop_glue-cgu.0[Internal] 
  actual:   tuple_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<(i16, (Dropped, bool))> - shim(Some((i16, (Dropped, bool))))
  expected: tuple_drop_glue-cgu.0[Internal] 
  actual:   tuple_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<(u32, Dropped)> - shim(Some((u32, Dropped)))
  expected: tuple_drop_glue-cgu.0[Internal] 
  actual:   tuple_drop_glue-cgu.0[External] 

fn std::ptr::drop_in_place::<Dropped> - shim(Some(Dropped))
  expected: tuple_drop_glue-cgu.0[Internal] 
  actual:   tuple_drop_glue-cgu.0[External] 

thread '[codegen-units] tests/codegen-units/item-collection/tuple-drop-glue.rs' panicked at src/tools/compiletest/src/runtest/codegen_units.rs:105:13:
explicit panic

@bors
Copy link
Contributor

bors commented Jan 28, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 28, 2025
@Zalathar Zalathar closed this Jan 28, 2025
@Zalathar Zalathar deleted the rollup-9v69i9w branch January 28, 2025 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.