| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
TB: fix SIFA comment
|
|
|
|
|
|
|
|
|
|
rustc-dev-guide subtree update
Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/a03c1efa970bb695db9dfda35e8793e2160863ff.
Created using https://github.com/rust-lang/josh-sync.
r? `@ghost`
|
|
bootstrap.py: Improve CPU detection on NetBSD
...and add some adaptation of detection for some arm variants.
|
|
|
|
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: a1dbb443527bd126452875eb5d5860c1d001d761
Filtered ref: e644bd7324c7e071785356fcaad5bd89e671366b
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to a1dbb443527bd126452875eb5d5860c1d001d761.
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: a1dbb443527bd126452875eb5d5860c1d001d761
Filtered ref: c2339048a82c55166f9b9ee83fd618be252a6e23
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to a1dbb443527bd126452875eb5d5860c1d001d761.
|
|
Add support for macro expansion in rustdoc source code pages
This is what it looks like:


You can test it [here](https://rustdoc.crud.net/imperio/macro-expansion/src/lib/lib.rs.html). In this case, I also enabled the `--generate-link-to-definition` to show that both options work well together.
Note: <del>There is a bug currently in firefox where the line numbers are not displayed correctly if they're inside the "macro expansion" span: https://bugzilla.mozilla.org/show_bug.cgi?id=1949948<del> Found a workaround around this bug.
r? `@notriddle`
|
|
|
|
r=GuillaumeGomez
rustdoc: render attributes in Field and Variants sections
Follow up to rust-lang/rust#145782.
Render attributes in Field and Variants sections.
Associated constants and methods are already rendered with attributes in their sections, so I figured out fields and variants should too.
(no change here)
<img width="378" height="265" alt="image" src="https://github.com/user-attachments/assets/b4f45c42-0146-486e-8881-138d2a7ad1c4" />
r? `@GuillaumeGomez`
---
Before (left) / after (right):
<img width="396" height="519" alt="image" src="https://github.com/user-attachments/assets/18288e13-09e7-448c-ba98-2023fa6df597" />
<img width="382" height="597" alt="image" src="https://github.com/user-attachments/assets/e624dc84-d169-41cc-bb89-7a1c2b2bb3e3" />
<img width="371" height="313" alt="image" src="https://github.com/user-attachments/assets/29833645-0b93-4900-80a8-c5a1e0b541b4" />
<img width="371" height="331" alt="image" src="https://github.com/user-attachments/assets/d5ce4b9e-f7f1-4f36-8ac0-08b0b5077e48" />
<img width="362" height="309" alt="image" src="https://github.com/user-attachments/assets/0436a51d-29a5-4403-a27c-7697524f807a" />
<img width="357" height="332" alt="image" src="https://github.com/user-attachments/assets/9a759fc5-30e7-4bbb-a88a-a3e3d1ed02aa" />
|
|
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
|
|
|
|
Suggest using `@bors try jobs=...`
|
|
Add more tests for the parallel rustc
At the moment, the parallel frontend test cases are severely lacking. Althought some reported issues have been resolved, they haven't been added into the tests.
This PR arranges the resolved ICE issues and adds tests for them.
Whether it is worthwhile to add a separate test suite for the paralel frontend still requires futher discussion. But we are trying coveraging issues being resolved through capability of the existing UI test suite.
Discussion: [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Proposal.20for.20a.20dedicated.20test.20suite.20for.20t.E2.80.A6.20compiler-team.23906)
Related issues:
- rust-lang/rust#120760
- rust-lang/rust#124423 fixed by rust-lang/rust#140358
- rust-lang/rust#127971 fxied by rust-lang/rust#140358
- rust-lang/rust#120601 fixed by rust-lang/rust#127311
cc `@jieyouxu`
|
|
|
|
|
|
Signed-off-by: houpo-bob <houpocun@outlook.com>
|
|
fix: Fix opaque generics
|
|
The parent generics were incorrectly not considered for TAIT.
I'm not convinced we should follow rustc here, also there are items (opaques) with more than 1 parent (opaque -> fn/type alias -> impl/trait) and I'm not sure we properly account for that in all places, but for now I left it as-is.
Also fix a bug where lifetimes' indices were incorrect when there is a self param (they started from 0 instead of 1).
|
|
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: f6d23413c399fb530be362ebcf25a4e788e16137
Filtered ref: fc132ae45e682a2556f99caed7bca9b8a2e909c8
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
This updates the rust-version file to f6d23413c399fb530be362ebcf25a4e788e16137.
|
|
Use unnamed lifetime spans as primary spans for `MISMATCHED_LIFETIME_SYNTAXES`
Fixes https://github.com/rust-lang/rust/issues/145772
This PR changes the primary span(s) of the `MISMATCHED_LIFETIME_SYNTAXES` to point to the *unnamed* lifetime spans in both the inputs and *outputs* of the function signature. As reported in rust-lang/rust#145772, this should make it so that IDEs highlight the spans of the actionable part of this lint, rather than just the (possibly named) input spans like they do today.
This could be tweaked further perhaps, for example for `fn foo(_: T<'_>) -> T`, we don't need to highlight the elided lifetime if the actionable part is to change only the return type to `T<'_>`, but I think it's improvement on what's here today, so I think that should be follow-up since I think the logic might get a bit hairy.
cc ```@shepmaster```
|
|
rustc-dev-guide subtree update
Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/c22150808bc96df8c8666d2f4b89cbab10e1ce0d.
Created using https://github.com/rust-lang/josh-sync.
r? ```@ghost```
|
|
Add lint against integer to pointer transmutes
# `integer_to_ptr_transmutes`
*warn-by-default*
The `integer_to_ptr_transmutes` lint detects integer to pointer transmutes where the resulting pointers are undefined behavior to dereference.
### Example
```rust
fn foo(a: usize) -> *const u8 {
unsafe {
std::mem::transmute::<usize, *const u8>(a)
}
}
```
```
warning: transmuting an integer to a pointer creates a pointer without provenance
--> a.rs:1:9
|
158 | std::mem::transmute::<usize, *const u8>(a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this is dangerous because dereferencing the resulting pointer is undefined behavior
= note: exposed provenance semantics can be used to create a pointer based on some previously exposed provenance
= help: if you truly mean to create a pointer without provenance, use `std::ptr::without_provenance_mut`
= help: for more information about transmute, see <https://doc.rust-lang.org/std/mem/fn.transmute.html#transmutation-between-pointers-and-integers>
= help: for more information about exposed provenance, see <https://doc.rust-lang.org/std/ptr/index.html#exposed-provenance>
= note: `#[warn(integer_to_ptr_transmutes)]` on by default
help: use `std::ptr::with_exposed_provenance` instead to use a previously exposed provenance
|
158 - std::mem::transmute::<usize, *const u8>(a)
158 + std::ptr::with_exposed_provenance::<u8>(a)
|
```
### Explanation
Any attempt to use the resulting pointers are undefined behavior as the resulting pointers won't have any provenance.
Alternatively, `std::ptr::with_exposed_provenance` should be used, as they do not carry the provenance requirement or if the wanting to create pointers without provenance `std::ptr::without_provenance_mut` should be used.
See [std::mem::transmute] in the reference for more details.
[std::mem::transmute]: https://doc.rust-lang.org/std/mem/fn.transmute.html
--------
People are getting tripped up on this, see https://github.com/rust-lang/rust/issues/128409 and https://github.com/rust-lang/rust/issues/141220. There are >90 cases like these on [GitHub search](https://github.com/search?q=lang%3Arust+%2Ftransmute%3A%3A%3Cu%5B0-9%5D*.*%2C+%5C*const%2F&type=code).
Fixes https://github.com/rust-lang/rust-clippy/issues/13140
Fixes https://github.com/rust-lang/rust/issues/141220
Fixes https://github.com/rust-lang/rust/issues/145523
`@rustbot` labels +I-lang-nominated +T-lang
cc `@traviscross`
r? compiler
|
|
|
|
Add ReturnExpr completion suggest
|
|
|
|
replace_arith_op not applicable on selected
|
|
|
|
Reborrows are consecutive deref then ref. Make it the default because reborrows are mostly useless to the programmer.
Also rename `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "reborrow"` to `rust-analyzer.inlayHints.expressionAdjustmentHints.enable: "borrows"`, as it's not about reborrows but about any ref/deref and it's confusing with the new setting.
|
|
Add let in let-chain completion support
|
|
|
|
Fix `else` completion in `let _ = if x {} $0`
|
|
|
|
|
|
convert_integer_literal not on selected
|
|
I thought tidy would be more allergic to 80-coloumn overflow,
but so be it.
|
|
tree borrows: refactor new-permission logic
|
|
|
|
|
|
citool: cleanup `mismatched_lifetime_syntaxes` warnings
Those lifetimes are implicit earlier in the same signature, and should not be hidden in the output type.
|