about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-11-27Address unused tuple struct fields in the compilerJake Goulding-9/+8
2023-11-27Auto merge of #118370 - TaKO8Ki:rollup-qfilq2w, r=TaKO8Kibors-244/+182
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
2023-11-27Rollup merge of #118359 - hkmatsumoto:suggest-box-ref, r=TaKO8KiTakayuki Maeda-2/+55
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`.
2023-11-27Rollup merge of #118358 - RalfJung:const-tests, r=WaffleLapkinTakayuki Maeda-232/+112
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.
2023-11-27Rollup merge of #118340 - compiler-errors:tweaks, r=lqdTakayuki Maeda-10/+10
Use helper functions in `pretty.rs` instead of accessing the `Cell`s manually Pulled this out of another PR that I never landed.
2023-11-27Rollup merge of #118095 - ferrocene:apply-cortex-a53-fix, r=davidtwcoTakayuki Maeda-0/+5
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.
2023-11-27Suggest swapping the order of `ref` and `box`Hirochika Matsumoto-2/+55
2023-11-27Auto merge of #118365 - lnicola:sync-from-ra, r=lnicolabors-309/+1150
Subtree update of `rust-analyzer`
2023-11-27Remove instant from EXCEPTIONS_RUST_ANALYZERLaurențiu Nicola-1/+0
2023-11-27Merge commit '237712fa314237e428e7ef2ab83b979f928a43a1' into sync-from-raLaurențiu Nicola-308/+1150
2023-11-27Auto merge of #118352 - Zalathar:llvm-hash, r=onur-ozkanbors-5/+9
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`
2023-11-27Auto merge of #118353 - matthiaskrgr:rollup-sf1booi, r=matthiaskrgrbors-10/+17
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
2023-11-27make const tests independent of std debug assertionsRalf Jung-232/+112
2023-11-27bootstrap: Memoize the LLVM rebuild hash to avoid very slow `x check`Zalathar-5/+9
2023-11-27Rollup merge of #118338 - nnethercote:backticks, r=compiler-errorsMatthias Krüger-7/+7
Backticks fixes r? `@lqd`
2023-11-27Rollup merge of #118325 - clubby789:rustdoc-search-link, r=fmeaseMatthias Krüger-2/+1
Fix Rustdoc search docs link This link has been outdated since #112725 moved the search docs to their own page
2023-11-27Rollup merge of #118322 - onur-ozkan:if-only-doctests-skip-compiletest, ↵Matthias Krüger-1/+9
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.
2023-11-27Auto merge of #118321 - WaffleLapkin:unspace-fn-pointer-fake-variadic, ↵bors-2/+2
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).
2023-11-27Auto merge of #118313 - WaffleLapkin:fixup_comments_in_some_nonzero_ops, ↵bors-14/+44
r=thomcc Improve some comments for non-zero ops This makes them a bit more explicit/correct.
2023-11-27Auto merge of #118327 - WaffleLapkin:mailmap-wl-tsk, r=Mark-Simulacrumbors-1/+2
Add my work email to the mailmap (my employer asks me to commit upstreaming under my work email)
2023-11-27Auto merge of #117584 - bjorn3:eager_output_filenames, r=b-naberbors-53/+46
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`.
2023-11-26Use helpersMichael Goulet-10/+10
2023-11-27Fix some backticks in comments.Nicholas Nethercote-1/+1
2023-11-27Put backticks around some attributes in doc comments.Nicholas Nethercote-6/+6
Without backticks they cause some "unresolved link to `foo`" warnings.
2023-11-26Auto merge of #118316 - Mark-Simulacrum:delete-copy-to-upvars, r=cjgillotbors-50/+35
Remove borrowck Upvar duplication This cuts out an extra allocation and copying over from the already cached closure capture information.
2023-11-26Auto merge of #117697 - WaffleLapkin:non-null-convenience-ops, r=Amanieubors-19/+1029
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
2023-11-26Remove Upvar duplicationMark Rousskov-50/+35
This cuts out an extra allocation and copying over from the already cached closure capture information.
2023-11-26Turn write_dep_info into a regular functionbjorn3-13/+10
It has side-effects and as such can't be cached.
2023-11-26Mostly revert "Accept crate name instead of attributes in ↵bjorn3-6/+16
build_output_filenames"
2023-11-26Ensure macro expansion runs before writing the dep infobjorn3-0/+5
2023-11-26Feed the output filenames into the TyCtxtbjorn3-11/+16
Since the introduction of the crate attribute pre-expansion pass we don't need access to the TyCtxt to compute it.
2023-11-26Serialize OutputFilenames into rmeta filebjorn3-27/+22
This ensures that linking will use the correct crate name even when `#![crate_name = "..."]` is used to specify the crate name.
2023-11-26Accept crate name instead of attributes in build_output_filenamesbjorn3-18/+10
2023-11-26Inline and remove pre_configurebjorn3-15/+4
2023-11-26Add my work email to the mailmapWaffle Maybe-1/+2
2023-11-26Auto merge of #118319 - GuillaumeGomez:rollup-vte50yq, r=GuillaumeGomezbors-376/+99
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
2023-11-26Fix Rustdoc search docs linkclubby789-2/+1
2023-11-26Add `is_aligned{,_to}` convenience methods to `NonNull`Maybe Waffle-0/+234
2023-11-26Add `align_offset` convenience method to `NonNull`Maybe Waffle-0/+60
2023-11-26Add `replace` and `swap` convenience methods to `NonNull`Maybe Waffle-0/+35
2023-11-26Add `offset_from`-ish convenience methods to `NonNull`Maybe Waffle-11/+209
2023-11-26Add offset-ish convenience methods to `NonNull`Maybe Waffle-0/+274
2023-11-26Add read/write/copy convenience methods to `NonNull`Maybe Waffle-14/+223
2023-11-26skip {tidy,compiletest,rustdoc-gui} based tests for `DocTests::Only`onur-ozkan-1/+9
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>
2023-11-26rustdoc: Remove space from fake-variadic fn ptr implsMaybe Waffle-2/+2
before: `for fn (T₁, T₂, …, Tₙ) -> Ret` after: `for fn(T₁, T₂, …, Tₙ) -> Ret`
2023-11-26Rollup merge of #118318 - WaffleLapkin:unvacation-waffle, r=WaffleLapkinGuillaume Gomez-1/+1
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
2023-11-26Rollup merge of #118311 - bvanjoi:merge_coroutinue_into_closure, r=petrochenkovGuillaume Gomez-94/+83
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`
2023-11-26Rollup merge of #118302 - mu001999:dead_code/clean, r=cjgillotGuillaume Gomez-260/+4
Clean dead codes Clean dead codes detected by #118257
2023-11-26Rollup merge of #118296 - notriddle:notriddle/main-dom, r=GuillaumeGomezGuillaume Gomez-21/+11
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
2023-11-26Auto merge of #117301 - saethlin:finish-rmeta-encoding, r=WaffleLapkinbors-41/+82
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`