| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Rollup of 4 pull requests
Successful merges:
- #118095 (Enable the Arm Cortex-A53 errata mitigation on aarch64-unknown-none)
- #118340 (Use helper functions in `pretty.rs` instead of accessing the `Cell`s manually)
- #118358 (make const tests independent of std debug assertions)
- #118359 (Suggest swapping the order of `ref` and `box`)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Suggest swapping the order of `ref` and `box`
It is not valid grammar to write `ref box <ident>` in patterns, but `box ref <ident>` is.
This patch adds a diagnostic to suggest swapping them, analogous to what we do for `mut let`.
|
|
make const tests independent of std debug assertions
Fixes some fallout from https://github.com/rust-lang/rust/pull/110303: `ignore-debug` is bad since it makes it very annoying to develop rustc with debug assertions enabled.
These tests do not really provide any interesting test coverage, we already got plenty of other tests that check that we detect invalid enums. So we can just remove them.
|
|
Use helper functions in `pretty.rs` instead of accessing the `Cell`s manually
Pulled this out of another PR that I never landed.
|
|
Enable the Arm Cortex-A53 errata mitigation on aarch64-unknown-none
Arm Cortex-A53 CPUs have an errata related to a specific sequence of instructions - errata number 843419 (https://documentation-service.arm.com/static/5fa29fddb209f547eebd361d). There is a mitigation that can be applied at link-time which detects the when sequence of instructions exists at a specific alignment. When detected, the linker re-writes those instructions and either changes an ADRP to an ADR, or bounces to a veneer to break the sequence.
The linker argument to enable the mitigation is "--fix-cortex-a53-843419", and this is supported by GNU ld and LLVM lld. The gcc argument to enable the flag is "-mfix-cortex-a53-843419".
Because the aarch64-unknown-none target uses rust-lld directly, this patch causes rustc to emit the "--fix-cortex-a53-843419" argument when calling the linker, just like aarch64-linux-gnu-gcc on Ubuntu 22.04 does.
Failure to enable this mitigation in the linker can cause the production of instruction sequences that do not execute correctly on Arm Cortex-A53.
|
|
|
|
Subtree update of `rust-analyzer`
|
|
|
|
|
|
bootstrap: Memoize the LLVM rebuild hash to avoid very slow `x check`
Recently I've encountered a massive regression in the performance of re-running `x check` after making no changes.
It used to take around 2 seconds, and now it takes 20-30 seconds. That's quite a hassle when r-a runs it every time I save.
After some poking around, what I've found is that each individual call to `generate_smart_stamp_hash` doesn't take a particularly long time (around 0.5 sec), but it gets called dozens of times during `x check`, and that seems to be what's adding up to 20-30 seconds.
---
https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Massive.20regression.20in.20no-op.20.60x.20check.60
cc `@onur-ozkan`
|
|
Rollup of 3 pull requests
Successful merges:
- #118322 (skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`)
- #118325 (Fix Rustdoc search docs link)
- #118338 (Backticks fixes)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Backticks fixes
r? `@lqd`
|
|
Fix Rustdoc search docs link
This link has been outdated since #112725 moved the search docs to their own page
|
|
r=clubby789
skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`
As use of `--doc` with `x test` is intended for running doc-tests only, executing compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior from bootstrap. This change fixes that.
|
|
r=notriddle
rustdoc: Remove space from fake-variadic fn ptr impls
before: `for fn (T₁, T₂, …, Tₙ) -> Ret`
after: `for fn(T₁, T₂, …, Tₙ) -> Ret`
I don't think we usually have spaces there, so it looks weird.
cc `@notriddle` since you added the space in https://github.com/rust-lang/rust/pull/98180 (or rather, added the feature with a space included).
|
|
r=thomcc
Improve some comments for non-zero ops
This makes them a bit more explicit/correct.
|
|
Add my work email to the mailmap
(my employer asks me to commit upstreaming under my work email)
|
|
Eagerly compute output_filenames
It can be computed before creating TyCtxt. Previously the query would also write the dep info file, which meant that the output filenames couldn't be accessed before macro expansion is done. The dep info file writing is now done as a separate non-query function. The old query was always executed again anyways due to depending on the HIR.
Also encode the output_filenames in rlink files to ensure `#![crate_name]` affects the linking stage when doing separate compiling and linking using `-Zno-link`/`-Zlink-only`.
|
|
|
|
|
|
Without backticks they cause some "unresolved link to `foo`" warnings.
|
|
Remove borrowck Upvar duplication
This cuts out an extra allocation and copying over from the already cached closure capture information.
|
|
Non null convenience ops
Based on https://github.com/rust-lang/libs-team/issues/251.
I went through all of the methods on `*mut` and added every method, which does not require additional safety conditions, to `NonNull`. (exceptions: `guaranteed_eq`, `guaranteed_ne`, `with_metadata_of`, it's unclear if they are useful here...)
I'm also not sure what types should the "second pointer parameter" be. `*mut`/`*const` might be more permissible, but given that `NonNull` doesn't coerce to them, it might also be annoying. For now I chose the "use `NonNull` everywhere" path, but I'm not sure it's the correct one...
<sub>I'm eepy, so I probably messed up somewhere while copying...</sub>
cc `@scottmcm`
r? libs-api
|
|
This cuts out an extra allocation and copying over from the already
cached closure capture information.
|
|
It has side-effects and as such can't be cached.
|
|
build_output_filenames"
|
|
|
|
Since the introduction of the crate attribute pre-expansion pass we
don't need access to the TyCtxt to compute it.
|
|
This ensures that linking will use the correct crate name even when
`#![crate_name = "..."]` is used to specify the crate name.
|
|
|
|
|
|
|
|
Rollup of 4 pull requests
Successful merges:
- #118296 (rustdoc: replace `elemIsInParent` with `Node.contains`)
- #118302 (Clean dead codes)
- #118311 (merge `DefKind::Coroutine` into `Defkind::Closure`)
- #118318 (Remove myself from users on vacation)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
As use of `--doc` with `x test` is intended for running doc-tests only, executing
compiletest, tidy or rustdoc-gui based tests considered as an incorrect behavior
from bootstrap. This change fixes that.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
before: `for fn (T₁, T₂, …, Tₙ) -> Ret`
after: `for fn(T₁, T₂, …, Tₙ) -> Ret`
|
|
Remove myself from users on vacation
I think I have some capacity for reviews now and recently there were a few PRs with explicit `r? `@WaffleLapkin`` which I'm actually capable to review, so
|
|
merge `DefKind::Coroutine` into `Defkind::Closure`
Related to #118188
We no longer need to be concerned about the precise type whether it's `DefKind::Closure` or `DefKind::Coroutine`.
Furthermore, thanks for the great work done by `@petrochenkov` on investigating https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Why.20does.20it.20hang.20when.20querying.20.EF.BB.BF.60opt_def_kind.60.3F
r? `@petrochenkov`
|
|
Clean dead codes
Clean dead codes detected by #118257
|
|
rustdoc: replace `elemIsInParent` with `Node.contains`
According to [MDN], this function is compatible with:
* Chrome 16 and Edge 12
* Firefox 9
* Safari 1.1 and iOS Safari 1
These browsers are well within our [support matrix], which requires compatibility with Chrome 118, Firefox 115, Safari 17, and Edge 119.
[MDN]: https://developer.mozilla.org/en-US/docs/Web/API/Node/contains#browser_compatibility
[support matrix]: https://browsersl.ist/#q=last+2+Chrome+versions%2C+last+1+Firefox+version%2C+Firefox+ESR%2C+last+1+Safari+version%2C+last+1+iOS+version%2C+last+1+Edge+version%2C+last+1+UCAndroid+version
|
|
Call FileEncoder::finish in rmeta encoding
Fixes https://github.com/rust-lang/rust/issues/117254
The bug here was that rmeta encoding never called FileEncoder::finish. Now it does. Most of the changes here are needed to support that, since rmeta encoding wants to finish _then_ access the File in the encoder, so finish can't move out.
I tried adding a `cfg(debug_assertions)` exploding Drop impl to FileEncoder that checked for finish being called before dropping, but fatal errors cause unwinding so this isn't really possible. If we encounter a fatal error with a dirty FileEncoder, the Drop impl ICEs even though the implementation is correct. If we try to paper over that by wrapping FileEncoder in ManuallyDrop then that just erases the fact that Drop automatically checks that we call finish on all paths.
I also changed the name of DepGraph::encode to DepGraph::finish_encoding, because that's what it does and it makes the fact that it is the path to FileEncoder::finish less confusing.
r? `@WaffleLapkin`
|