| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
fix: don't remove parentheses for calls of function-like pointers that are members of a struct or union
Fixes #17111
|
|
fix: Improve hover text in unlinked file diagnostics
Use full sentences, and mention how to disable the diagnostic if users are intentionally working on unowned files.

(Full disclosure: I've tested a rust-analyzer build in VS Code, but the pop-up logic is currently disabled due to #17062, so I haven't tested that.)
|
|
|
|
|
|
|
|
|
|
chore: Fix diagnostic name in macro_error.rs
|
|
fix: pattern completions in let-stmt
fix #17480.
We can write `let S { a, b } = s;` or `let Some(x) = a else {}`, so it is reasonable to allow pattern completions in `LetStmt`.
|
|
Simplify some term search tactics
Working on the paper `@phijor` found that "Data constructor" tactic could be simplified quite a bit by running it only in the backwards direction. With n+1 rounds it has same coverage as previous implementation in n rounds, however the tactic it self is more simple and also potentially faster as there is less to do.
In a nutshell the idea is to only work with types in the wish-list rather than with any types.
Turns out it is quite a bit faster:
Before:
```
ripgrep:
Tail Expr syntactic hits: 238/1692 (14%)
Tail Exprs found: 1223/1692 (72%)
Term search avg time: 15ms
nalgebra:
Tail Expr syntactic hits: 125/3001 (4%)
Tail Exprs found: 2143/3001 (71%)
Term search avg time: 849ms
```
After
````
ripgrep:
Tail Expr syntactic hits: 246/1692 (14%)
Tail Exprs found: 1209/1692 (71%)
Term search avg time: 8ms
nalgebra:
Tail Expr syntactic hits: 125/3001 (4%)
Tail Exprs found: 2028/3001 (67%)
Term search avg time: 305ms
````
_Also removed niche optimization of removing scope defs from the search space as this wasn't helping much anyway and made code a bit more complex._
|
|
tests for when a thread-local gets initialized in a tls dtor
|
|
|
|
|
|
|
|
Remove stray println from rustfmt's `rewrite_static`
r? `@calebcartwright` `@ytmimi` -- though anyone should probably r+ this so it gets into nightly sooner than later, since it's obviously wrong.
This can just be fixed in-tree, since I don't think we want to wait until the next sync to fix this.
Fix https://github.com/rust-lang/rustfmt/issues/6210
Fix https://github.com/rust-lang/rust/issues/126887
|
|
Implement `use<>` formatting in rustfmt
This PR implements formatting for precise-capturing `use<>` syntax as proposed in https://github.com/rust-lang/rust/pull/126753.
The syntax is implemented as-if the `use<>` bound were a trait bound but with the `use` keyword as its path segment identifier.
I opted to develop this in the rust-lang/rust tree since I'm not certain when the next rustfmt subtree sync is going to be, and I'd rather not block landing nightly support for `use<>` on something I have no control over. If ``@rust-lang/rustfmt`` would rather I move this PR over to that repository, then I would at least like to know when the next rustfmt->rust subtree sync is going to be, since stabilizing `precise_capturing` without formatting will be disruptive.
This implementation is otherwise rather straightforward.
Tracking:
- https://github.com/rust-lang/rust/issues/123432
|
|
Promote loongarch64-unknown-linux-musl to Tier 2 with host tools
MCP: https://github.com/rust-lang/compiler-team/issues/753
Tracking issue: https://github.com/rust-lang/rust/issues/122592
try-job: dist-loongarch64-musl
|
|
|
|
|
|
Add needs-symlink directive to compiletest
This is an alternative to #126846 that allows running symlink tests on Windows in CI but will ignore them locally if symlinks aren't available. A future improvement would be to check that the `needs-symlink` directive is used in rmake files that call `create_symlink` but this is just a quick PR to unblock Windows users who want to run tests locally without enabling symlinks.
|
|
Rework pattern and expression nonterminal kinds.
Some tweaks to `NonterminalKind` that will assist with #124141. Details in the individual commits.
r? compiler-errors
cc ```@eholk```
|
|
don't ICE when encountering an extern type field during validation
"extern type" is a pain that keeps on giving...
Fixes https://github.com/rust-lang/rust/issues/126814
r? ```@oli-obk```
|
|
Update outdated README in build-manifest.
I believe this was changed a while ago in https://github.com/rust-lang/promote-release/pull/14.
|
|
tidy: skip submodules if not present for non-CI environments
Right now tidy requires rustc-perf to be fetched as it checks its license, but this doesn't make sense for most contributors since rustc-perf is a dist-specific tool and its license will not change frequently, especially during compiler development. This PR makes tidy to skip rustc-perf if it's not fetched and if it's not running in CI.
Applies https://github.com/rust-lang/rust/pull/126225#issuecomment-2158143674 and reverts #126225.
|
|
Subtree update of `rust-analyzer`
r? `@ghost`
|
|
|
|
MCP: https://github.com/rust-lang/compiler-team/issues/753
|
|
|
|
|
|
Support `-Cforce-frame-pointers=non-leaf`
Why don't we already support this...?
Suggested impl for https://github.com/rust-lang/compiler-team/issues/744
|
|
all of these currently force stronger frame pointers, and
currently the CLI does not override the target
|
|
unix/foreign_items: move getpid to the right part of the file
|
|
|
|
nicer batch file error when building miri-script fails
https://github.com/rust-lang/miri/pull/3700#issuecomment-2184026431
|
|
Merge `PatParam`/`PatWithOr`, and `Expr`/`Expr2021`, for a few reasons.
- It's conceptually nice, because the two pattern kinds and the two
expression kinds are very similar.
- With expressions in particular, there are several places where both
expression kinds get the same treatment.
- It removes one unreachable match arm.
- Most importantly, for #124141 I will need to introduce a new type
`MetaVarKind` that is very similar to `NonterminalKind`, but records a
couple of extra fields for expression metavars. It's nicer to have a
single `MetaVarKind::Expr` expression variant to hold those extra
fields instead of duplicating them across two variants
`MetaVarKind::{Expr,Expr2021}`. And then it makes sense for patterns
to be treated the same way, and for `NonterminalKind` to also be
treated the same way.
I also clarified the comments, because I have long found them a little
hard to understand.
|
|
|
|
|
|
|
|
Migrate `relro-levels`, `static-pie` to `rmake`
Part of #121876.
r? `@jieyouxu`
try-job: aarch64-gnu
try-job: arm-android
try-job: armhf-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-various-1
try-job: test-various
|
|
|
|
r=calebcartwright
rustfmt subtree update
r? ghost
|
|
|
|
|
|
sync-from-rustfmt-24-06
|
|
|
|
|
|
|
|
|
|
Remove use of const traits (and `feature(effects)`) from stdlib
The current uses are already unsound because they are using non-const impls in const contexts. We can reintroduce them by reverting the commit in this PR, after #120639 lands.
Also, make `effects` an incomplete feature.
cc `@rust-lang/project-const-traits`
r? `@compiler-errors`
|