about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-08-30compiletest: support for newer lldb versionsDavid Wood-0/+9
Newer lldb versions disable printing of persistent results by default, but lots of rustc debuginfo tests rely on these being printed, so re-enable this by defining an alias as suggested by the patch which disabled persistent result printing in lldb. Signed-off-by: David Wood <david@davidtw.co>
2023-08-28Auto merge of #115296 - saethlin:dont-duplicate-allocs, r=jackh726bors-5/+20
Load include_bytes! directly into an Lrc This PR deletes an innocent-looking `.into()` that was converting from a `Vec<u8>` to `Lrc<[u8]>`. This has significant runtime and memory overhead when using `include_bytes!` to pull in a large binary file.
2023-08-28Auto merge of #115267 - nikic:revert-elf-relaxation, r=compiler-errorsbors-2/+3
Revert relax_elf_relocations default change This reverts commit 441086879821d554ecdfde391e767d1a954fd5e2 (#106511). The change caused linker failures with the binutils version used by cross (#115239), as well as miscompilations when using the mold linker (https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/SIGILL.20in.20build-script-build.20with.20nightly-2023-08-25/near/387506479).
2023-08-28Auto merge of #115287 - saethlin:more-specialer, r=cjgillotbors-0/+7
Add a specialization for encoding byte arrays in rmeta This specialization already exists for FileEncoder, but since EncodeContext is implemented by forwarding down to FileEncoder, using EncodeContext used to bypass the specialization.
2023-08-27Load include_bytes! directly into an LrcBen Kimock-5/+20
2023-08-28Auto merge of #115254 - cuviper:aligned_alloc-size, r=thomccbors-1/+5
wasi: round up the size for `aligned_alloc` C11 `aligned_alloc` requires that the size be a multiple of the alignment. This is enforced in the wasi-libc emmalloc implementation, which always returns NULL if the size is not a multiple. (The default `MALLOC_IMPL=dlmalloc` does not currently check this.)
2023-08-27Add a specialization for encoding byte arrays in rmetaBen Kimock-0/+7
2023-08-27Auto merge of #115281 - GuillaumeGomez:rollup-yr05a54, r=GuillaumeGomezbors-18/+21
Rollup of 3 pull requests Successful merges: - #114974 (Add an (perma-)unstable option to disable vtable vptr) - #115261 (replace outdated github username 'ozkanonur') - #115266 (Unify CSS color formats a bit more) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-27Rollup merge of #115266 - GuillaumeGomez:unify-css-color-formats, r=notriddleGuillaume Gomez-14/+14
Unify CSS color formats a bit more When `rgb` format doesn't have an `rgba` equivalent, I turned it into hex format. I also "decapitalized" hex formats. r? `@notriddle`
2023-08-27Rollup merge of #115261 - onur-ozkan:replace-old-username, r=Mark-SimulacrumGuillaume Gomez-3/+3
replace outdated github username 'ozkanonur'
2023-08-27Rollup merge of #114974 - nbdd0121:vtable, r=b-naberGuillaume Gomez-1/+4
Add an (perma-)unstable option to disable vtable vptr This flag is intended for evaluation of trait upcasting space cost for embedded use cases. Compared to the approach in #112355, this option provides a way to evaluate end-to-end cost of trait upcasting. Rationale: https://github.com/rust-lang/rust/issues/112355#issuecomment-1658207769 ## How this flag should be used (after merge) Build your project with and without `-Zno-trait-vptr` flag. If you are using cargo, set `RUSTFLAGS="-Zno-trait-vptr"` in the environment variable. You probably also want to use `-Zbuild-std` or the binary built may be broken. Save both binaries somewhere. ### Evaluate the space cost The option has a direct and indirect impact on vtable space usage. Directly, it gets rid of the trait vptr entry needed to store a pointer to a vtable of a supertrait. (IMO) this is a small saving usually. The larger saving usually comes with the indirect saving by eliminating the vtable of the supertrait (and its parent). Both impacts only affects vtables (notably the number of functions monomorphized should , however where vtable reside can depend on your relocation model. If the relocation model is static, then vtable is rodata (usually stored in Flash/ROM together with text in embedded scenario). If the binary is relocatable, however, the vtable will live in `.data` (more specifically, `.data.rel.ro`), and this will need to reside in RAM (which may be a more scarce resource in some cases), together with dynamic relocation info living in readonly segment. For evaluation, you should run `size` on both binaries, with and without the flag. `size` would output three columns, `text`, `data`, `bss` and the sum `dec` (and it's hex version). As explained above, both `text` and `data` may change. `bss` shouldn't usually change. It'll be useful to see: * Percentage change in text + data (indicating required flash/ROM size) * Percentage change in data + bss (indicating required RAM size)
2023-08-27Auto merge of #115231 - saethlin:dont-ignore-wasm, r=Mark-Simulacrumbors-22/+18
Remove some wasm/emscripten ignores I'm planning on landing a few PRs like this that remove ignores that aren't required. This just covers mir-opt and codegen tests.
2023-08-27Auto merge of #115226 - RalfJung:debug-abi, r=compiler-errorsbors-29/+422
add rustc_abi debugging attribute This is the call ABI equivalent of `rustc_layout(debug)`. Fixes https://github.com/rust-lang/rust/issues/115168 r? `@bjorn3`
2023-08-27Auto merge of #115139 - cjgillot:llvm-fragment, r=nikicbors-9/+105
Do not forget to pass DWARF fragment information to LLVM. Fixes https://github.com/rust-lang/rust/issues/115113 for the rustc part
2023-08-27Auto merge of #115263 - matthiaskrgr:rollup-taqu2h0, r=matthiaskrgrbors-145/+163
Rollup of 6 pull requests Successful merges: - #114924 (coverage: Tidy up `run-coverage` tests in several small ways) - #114927 (CI: add more debug logging to Docker caching) - #114957 (tests: Fix tests for LoongArch64) - #115007 (Correct and expand documentation of `handle_alloc_error` and `set_alloc_error_hook`.) - #115098 (rust-gdbgui: remove excessive quotes) - #115111 (compile rust-anaylzer with `x check` if it's enabled) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-27Auto merge of #115079 - cuviper:unused-mcinfo, r=Mark-Simulacrumbors-1/+1
Move a local to the `#if` block where it is used For other cases (LLVM < 17), this was complaining under `-Wall`: ``` warning: llvm-wrapper/PassWrapper.cpp: In function ‘void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef, const char*)’: warning: llvm-wrapper/PassWrapper.cpp:311:26: warning: unused variable ‘MCInfo’ [-Wunused-variable] warning: 311 | const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo(); warning: | ^~~~~~ ```
2023-08-27add rustc_abi debugging attributeRalf Jung-29/+422
2023-08-27Revert "Auto merge of #106511 - MaskRay:gotpcrelx, r=nikic"Nikita Popov-2/+3
This reverts commit 441086879821d554ecdfde391e767d1a954fd5e2, reversing changes made to 249595b7523fc07a99c1adee90b1947739ca0e5b. This causes linker failures with the binutils version used by cross (#115239), as well as miscompilations when using the mold linker.
2023-08-27Unify CSS color formats a bit moreGuillaume Gomez-14/+14
2023-08-27Rollup merge of #115111 - ozkanonur:check-rust-analyzer-if-enabled, ↵Matthias Krüger-2/+9
r=Mark-Simulacrum compile rust-anaylzer with `x check` if it's enabled By default, `x check` doesn't compile the rust-analyzer. But when it's enabled in the config's tools section, there's no reason not to do it. This change allows `x check` to compile rust-analyzer if it's enabled in config's tools section. Helps to #115031
2023-08-27Rollup merge of #115098 - real-eren:rust-gdbgui-gdbargs-syntax-fix, ↵Matthias Krüger-3/+3
r=Mark-Simulacrum rust-gdbgui: remove excessive quotes Removes the extra quotes introduced in commit https://github.com/rust-lang/rust/commit/8dd0ec6de7c8473e5730972c4e6206d5fb47b4e6. Modified script tested and now works on Ubuntu w/ `dash`. Fixes https://github.com/rust-lang/rust/issues/115097
2023-08-27Rollup merge of #115007 - kpreid:alloc, r=Mark-SimulacrumMatthias Krüger-12/+39
Correct and expand documentation of `handle_alloc_error` and `set_alloc_error_hook`. The primary goal of this change is to remove the false claim that `handle_alloc_error` always aborts; instead, code should be prepared for `handle_alloc_error` to possibly unwind, and be sound under that condition. I saw other opportunities for improvement, so I have added all the following information: * `handle_alloc_error` may panic instead of aborting. (Fixes #114898) * What happens if a hook returns rather than diverging. * A hook may panic. (This was already demonstrated in an example, but not stated in prose.) * A hook must be sound to call — it cannot assume that it is only called by the runtime, since its function pointer can be retrieved by safe code. I've checked these statements against the source code of `alloc` and `std`, but there may be nuances I haven't caught, so a careful review is welcome.
2023-08-27Rollup merge of #114957 - loongarch-rs:fix-tests, r=Mark-SimulacrumMatthias Krüger-2/+2
tests: Fix tests for LoongArch64 This PR fixes `lp64d abi` tests for LoongArch64.
2023-08-27Rollup merge of #114927 - Kobzol:ci-docker-caching-log, r=Mark-SimulacrumMatthias Krüger-4/+10
CI: add more debug logging to Docker caching Seems like the trouble with the Docker update continues, and rustup has some problems with downloading cached Docker layers from S3 (https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/rustup.20CI.20fails.20to.20install.20Docker.20images.20for.20armv7-linux). This PR adds more logging to Docker caching and busts the cache to rebuild all images.
2023-08-27Rollup merge of #114924 - Zalathar:tidy-tests, r=Mark-SimulacrumMatthias Krüger-122/+100
coverage: Tidy up `run-coverage` tests in several small ways Prior to #114875 (anonymized line numbers), these tests were very sensitive to lines being added/removed, since doing so would change the line numbers in every subsequent line of output. Therefore they ended up with a few small style issues that weren't worth the hassle of fixing. Now that we can freely rearrange lines without needing to re-bless the entire output, we can tidy up the tests in various trivial ways.
2023-08-27Auto merge of #114969 - kpreid:dropdoc, r=Mark-Simulacrumbors-2/+8
Go into more detail about panicking in drop. This patch was sitting around in my drafts. I don't recall the motivation, but I think it was someone expressing confusion over “will likely abort” (since, in fact, a panicking drop _not_ caused by dropping while panicking will predictably _not_ abort). I hope that the new text will leave people well-informed about why not to panic and when it is reasonable to panic.
2023-08-27replace outdated github username 'ozkanonur'ozkanonur-3/+3
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-08-26Restrict test to x86_64.Camille GILLOT-0/+3
2023-08-26Auto merge of #115219 - estebank:issue-105306, r=compiler-errorsbors-203/+263
Point at type parameter that introduced unmet bound instead of full HIR node ``` error[E0277]: the size for values of type `[i32]` cannot be known at compilation time --> $DIR/issue-87199.rs:18:15 | LL | ref_arg::<[i32]>(&[5]); | ^^^^^ doesn't have a size known at compile-time ``` instead of ``` error[E0277]: the size for values of type `[i32]` cannot be known at compilation time --> $DIR/issue-87199.rs:18:22 | LL | ref_arg::<[i32]>(&[5]); | ---------------- ^^^^ doesn't have a size known at compile-time | | | required by a bound introduced by this call ``` ------ ``` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/own-bound-span.rs:14:24 | LL | let _: <S as D>::P<String>; | ^^^^^^ the trait `Copy` is not implemented for `String` | note: required by a bound in `D::P` --> $DIR/own-bound-span.rs:4:15 | LL | type P<T: Copy>; | ^^^^ required by this bound in `D::P` ``` instead of ``` error[E0277]: the trait bound `String: Copy` is not satisfied --> $DIR/own-bound-span.rs:14:12 | LL | let _: <S as D>::P<String>; | ^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | note: required by a bound in `D::P` --> $DIR/own-bound-span.rs:4:15 | LL | type P<T: Copy>; | ^^^^ required by this bound in `D::P` ``` Fix #105306.
2023-08-26Auto merge of #115224 - spastorino:remove-lub_empty, r=lcnrbors-61/+30
Remove lub_empty from lexical region resolve As of my understanding this method made sense when we had `ReEmpty`. Removed `lub_empty` and made the calling site code equivalent. r? `@lcnr` `@compiler-errors`
2023-08-26Account for `Weak` alias kinds when adding more targetted obligationEsteban Küber-14/+19
2023-08-26Remove unnecessary `select_obligations_where_possible` and redundant errorsEsteban Küber-93/+10
2023-08-26More accurately point at argumentsEsteban Küber-137/+125
2023-08-26wasi: round up the size for `aligned_alloc`Josh Stone-1/+5
C11 `aligned_alloc` requires that the size be a multiple of the alignment. This is enforced in the wasi-libc emmalloc implementation, which always returns NULL if the size is not a multiple. (The default `MALLOC_IMPL=dlmalloc` does not currently check this.)
2023-08-26Do not produce fragment for ZST.Camille GILLOT-15/+49
2023-08-26Merge if and match expressions that don't make sense to have separatedSantiago Pastorino-15/+10
2023-08-26Add test with non-ZST.Camille GILLOT-13/+31
2023-08-26Do not forget to pass DWARF fragment information to LLVM.Camille GILLOT-2/+43
2023-08-26Auto merge of #115198 - Zoxc:query-panic-wait, r=cjgillotbors-1/+12
Fix waiting on a query that panicked This fixes waiting on a query that panicked. The code now looks for `QueryResult::Poisoned` in the query state in addition to the query cache. This fixes https://github.com/rust-lang/rust/issues/111528. r? `@cjgillot`
2023-08-26Auto merge of #115246 - matthiaskrgr:rollup-zdiw9gt, r=matthiaskrgrbors-20/+13
Rollup of 4 pull requests Successful merges: - #115197 (Remove special cases that are no longer needed due to #112606) - #115210 (Make `rustc_on_unimplemented` std-agnostic for `alloc::rc`) - #115237 (Fixup sparc-unknown-none-elf table spacing) - #115244 (Migrate GUI colors test to original CSS color format) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-26Rollup merge of #115244 - GuillaumeGomez:migrate-gui-test-color-36, r=notriddleMatthias Krüger-12/+9
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-08-26Rollup merge of #115237 - ↵Matthias Krüger-1/+1
workingjubilee:fixup-baremetal-sparc-platform-support-tabulation, r=GuillaumeGomez Fixup sparc-unknown-none-elf table spacing Missed this in https://github.com/rust-lang/rust/pull/115075
2023-08-26Rollup merge of #115210 - ↵Matthias Krüger-0/+2
DogPawHat:std-agnostic-rustc_on_unimplemented-for-alloc-rc, r=WaffleLapkin Make `rustc_on_unimplemented` std-agnostic for `alloc::rc` See https://github.com/rust-lang/rust/issues/112923 Just a few lines related to `alloc:rc` for `Send` and `Sync`. That seems to be all of the `... = "std::..."` issues found, but there a few notes with `std::` inside them still. r? `@WaffleLapkin`
2023-08-26Rollup merge of #115197 - tbu-:pr_simpler_ipv6_addr_display, r=joshtriplettMatthias Krüger-7/+1
Remove special cases that are no longer needed due to #112606 cc #112606
2023-08-26Auto merge of #115243 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 13 commits in 2cc50bc0b63ad20da193e002ba11d391af0104b7..925280f028db3a322935e040719a0754703947cf 2023-08-22 22:43:08 +0000 to 2023-08-25 21:16:44 +0000 - string leek is stable (rust-lang/cargo#12559) - refactor: Pull out cargo-add MSRV code for reuse (rust-lang/cargo#12553) - Contrib: Add process for security responses. (rust-lang/cargo#12487) - Support dependencies from registries for artifact dependencies, take 2 (rust-lang/cargo#12421) - fix(toml): Improve parse errors (rust-lang/cargo#12556) - Create dedicated unstable flag for asymmetric-token (rust-lang/cargo#12551) - chore(deps): update latest msrv to v1.72.0 (rust-lang/cargo#12549) - changelog: add link to CVE-2023-40030 (rust-lang/cargo#12550) - refactor(install): Move value parsing to clap (rust-lang/cargo#12547) - fix: Set MSRV for internal packages (rust-lang/cargo#12381) - doc: fix two links to tracing docs (rust-lang/cargo#12537) - use AND search when having multiple terms (rust-lang/cargo#12548) - fix(log): Use a more compact relative-time format (rust-lang/cargo#12542) r? ghost
2023-08-26Remove unneeded "background_color" parameterGuillaume Gomez-5/+2
2023-08-26Migrate GUI colors test to original CSS color formatGuillaume Gomez-10/+10
2023-08-26Update cargoWeihang Lo-0/+0
2023-08-26Auto merge of #115232 - wesleywiser:revert_114643, r=tmiaskobors-106/+51
Revert "Use the same DISubprogram for each instance of the same inline function within the caller" This reverts commit 687bffa49375aa00bacc51f5d9adfb84a9453e17. Reverting to resolve ICEs reported on nightly. cc `@dpaoliello` Fixes #115156
2023-08-26Auto merge of #115236 - scottmcm:less-vector, r=compiler-errorsbors-15/+43
Stop emitting non-power-of-two vectors in (non-portable-SIMD) codegen Fixes #115212 It's unclear what makes this not work sometimes, since it often *does* work, so for now just disable the unusual cases. A future PR can consider doing something smarter, but this is an easy and safe tweak that we can do to resolve the regressions for now.