| Age | Commit message (Collapse) | Author | Lines |
|
fix: Masquerade as nightly cargo when invoking flycheck with `-Zscript`
|
|
|
|
|
|
|
|
`NormalizesTo` is a private predicate that should not be used outside the solver. For normalization, rustc uses `AliasRelate`, so replace with that.
|
|
Closes rust-lang/rust-clippy#15552
changelog: [`async_yields_async`] fix wrong unmangle of macros
|
|
The new solver does not eagerly normalize, but things after inference expect types to be normalized. rustc does the same.
Also, I'm afraid other things in r-a don't expect results of the solver to be unnormalized. We'll need to handle that.
|
|
|
|
|
|
|
|
|
|
Enforce in bootstrap that dist and install must have stage at least 1
This is a continuation of my efforts to fix staging in bootstrap after the stage0 redesign. This PR gets rid of all `compiler_for` usages in the `dist` steps :tada: The only remaining usages are in the `test` steps, which are my next goal, and which will be the final boss.. both because they are quite tricky, and because most of the the rest of the steps have been already fixed.
The changes are relatively straightforward, `x dist` defaults to stage 2, so in that case we want to use a stage 1 build compiler for everything (except stdlib, but we usually use it even there because of uplifting).
What I didn't fix yet are the docs steps, because they are *very* implicit right now, and fixing them deserves its own PR.
The first commit reverts the tests that I accidentally removed in https://github.com/rust-lang/rust/pull/145340 :man_facepalming: I did it in this PR to avoid further git conflicts..
Best reviewed commit-by-commit.
r? `@jieyouxu`
try-job: dist-i686-linux
try-job: dist-armhf-linux
try-job: dist-x86_64-linux
try-job: dist-x86_64-msvc
try-job: dist-apple-various
try-job: dist-x86_64-apple
try-job: x86_64-msvc-2
|
|
|
|
```
error[E0408]: variable `Ban` is not bound in all patterns
--> f12.rs:9:9
|
9 | (Foo,Bar)|(Ban,Foo) => {}
| ^^^^^^^^^ --- variable not in all patterns
| |
| pattern doesn't bind `Ban`
|
help: you might have meant to use the similarly named previously used binding `Bar`
|
9 - (Foo,Bar)|(Ban,Foo) => {}
9 + (Foo,Bar)|(Bar,Foo) => {}
|
```
|
|
|
|
Caching trait solving can do a lot to speed. Unfortunately it also consume a huge amount of memory. Therefore, as part of the migration to the new solver Jack Huey disabled caching of trait solving (he made the query transparent).
The PR proposes a middle ground: do cache trait solving, but only for the same revision. This allows us to be safe because during a revision the inputs cannot change.
The result is hopefully much better performance to features that tend to do a bulk of trait solving, and also repeat the same query (e.g. inference then IDE features).
There is another limitation: results are only cached in the same thread, to remove the need for synchronization which will be expensive. More measurements are required to check whether it's better to use a synchronized global cache, or maybe stay with a thread-local cache but batch multiple feature requests (highlighting, inlay hints etc.) of the same file to the same thread.
Alongside the actual cache we store the revision, because we need to verify it (we can't eagerly clear caches when incrementing the revision), and also the address of the db to prevent multiple dbs from interleaving (this is mostly relevant in tests, although injected highlighting also uses a new db, therefore maybe it's better to move it to a separate thread).
This "games" analysis-stats to both be way faster and use way more memory; the former is because analysis-stats doesn't increment revisions, therefore all queries share the cache and hit ratio is way too good, the latter is because analysis-stats doesn't increment revisions and therefore the cache isn't cleared. Both are not representative of a typical IDE scenario.
|
|
The compiler just puts `DefId` in there, but rust-analyzer uses different types for each kind of item.
|
|
|
|
These kinds of warnings can make our test suites fail, so if we want
them, we'll need a different flag.
|
|
|
|
|
|
|
|
TB: fix SIFA comment
|
|
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- rust-lang/rust#135761 (Dial down detail of B-tree description)
- rust-lang/rust#145620 (Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts)
- rust-lang/rust#145788 (Fix attribute target checking for macro calls)
- rust-lang/rust#145794 (bootstrap.py: Improve CPU detection on NetBSD)
- rust-lang/rust#145817 (cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype)
- rust-lang/rust#145820 (raw-dylib-elf: set correct `DT_VERDEFNUM`)
- rust-lang/rust#145828 (Update `bitflags` to 2.9.3.)
- rust-lang/rust#145830 (Remove the lifetime from `ExpTokenPair`/`SeqSep`.)
- rust-lang/rust#145836 (Remove outdated bug comments)
- rust-lang/rust#145842 (rustc-dev-guide subtree update)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
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`
|
|
Remove outdated bug comments
The related issue https://github.com/rust-lang/rust/issues/74836 was closed.
This PR may close rust-lang/rust#145835. Details are in the issue rust-lang/rust#145835.
|
|
Remove the lifetime from `ExpTokenPair`/`SeqSep`.
`TokenKind` now impls `Copy`, so we can store it directly rather than a reference.
r? `@chenyukang`
|
|
Update `bitflags` to 2.9.3.
The `bitflags!` macro in the latest release has slightly streamlined codegen. See https://github.com/bitflags/bitflags/pull/458 for details.
r? `@yaahc`
|
|
raw-dylib-elf: set correct `DT_VERDEFNUM`
Previously it indicated a single version, regardless of their count.
Observed in: https://github.com/davidlattimore/wild/pull/1041
|
|
cg_llvm: Replace the `llvm::Bool` typedef with a proper newtype
This should be nicer and more type-safe than the old typedef for `c_int`/`i32`.
Using `#[repr(transparent)]` should ensure that it's still ABI-compatible.
|
|
bootstrap.py: Improve CPU detection on NetBSD
...and add some adaptation of detection for some arm variants.
|
|
r=jdonszelmann
Fix attribute target checking for macro calls
Fixes https://github.com/rust-lang/rust/issues/145779
r? `@jdonszelmann`
|
|
Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn casts
Fixes https://github.com/rust-lang/rust/issues/141806
When we have an impossible where clause like `dyn Trait<u8>: Sized`, this may make a dyn-to-dyn cast like `dyn Trait<()> -> dyn trait<u8>` to successfully type check as if it were a wide-to-thin ptr cast (discarding metadata):
https://github.com/rust-lang/rust/blob/16ad385579cebb6f7d53367c552661b6b51a4a02/compiler/rustc_hir_typeck/src/cast.rs#L862-L865
In borrowck, we are expecting that the only meaningful dyn-to-dyn cast to be a metadata-preserving wide-to-wide ptr cast, which requires that the principals of the dyn pointers are equal. Borrowck additionally assumes that these principals have already been proven equal *modulo regions*, and we thus ICE since `Trait<u8>` and `Trait<()>` do not unify:
https://github.com/rust-lang/rust/blob/16ad385579cebb6f7d53367c552661b6b51a4a02/compiler/rustc_borrowck/src/type_check/mod.rs#L1481-L1524
This PR fixes this ICE by checking whether the RHS of the cast is considered to be Sized in the environment of the MIR typeck, and if so then skipping over this dyn->dyn principal compatibility check.
r? `@lcnr` perhaps?
|
|
Dial down detail of B-tree description
fixes #134088, though it is a shame to lose some of this wonderful detail.
r? `@workingjubilee`
EDIT: newest versions keep old detail, but move it down a bit.
|
|
erase regions also anonymizes bound vars, which is undesirable
|
|
Rustc pull update
|
|
|
|
This commit adds an empty stub for the function
for QNX 8 targets. This symbol is required by the unwinder but is
not present, causing a linking failure when building with the
standard library.
Address review feedback: use whitelist for QNX versions
|
|
|
|
|
|
Automatic Rustup
|
|
Removed comments related to a bug in Repeat variant.
|
|
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.
|