Commit Graph

234531 Commits

Author SHA1 Message Date
Guillaume Gomez
4ce5a002c9 Update browser-ui-test version to 0.16.10 2023-09-20 22:06:56 +02:00
Ralf Jung
da08a3f40c interpret: more consistently use ImmTy in operators and casts 2023-09-20 21:57:54 +02:00
bors
ad36b5a622 Auto merge of #115987 - loongarch-rs:fix-transparent-union-abi, r=bjorn3
rustc_target/loongarch: Fix passing of transparent unions with only one non-ZST member

This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed through an `extern "C"` function.

Fixes https://github.com/rust-lang/rust/issues/115509

r? `@bjorn3`
2023-09-20 19:55:38 +00:00
bors
9da3e81785 Auto merge of #115870 - RalfJung:const-value-slice, r=oli-obk
adjust ConstValue::Slice to work for arbitrary slice types

valtrees have already been assuming that this works; this PR makes it a reality. Also further restrict `ConstValue::Slice` to what it is actually used for; this even shrinks `ConstValue` from 32 to 24 bytes which is a nice win. :)

The alternative to this approach is to make `ConstValue::Slice` work really only for `&str`/`&[u8]` literals, and never return it in `op_to_const`. That would make `op_to_const` very clean. We could then even remove the `meta` field; the length would always be `data.inner().len()`. We could *almost* just use a `Symbol` instead of a `ConstAllocation`, but we have to support byte strings and there doesn't seem to be an interned representation of them (or rather, `ConstAllocation` *is* their interned representation). In this world, valtrees of slice reference types would then become noticeably more expensive to turn into a `ConstValue` -- but does that matter? Specifically for `&str`/`&[u8]` we could still use the optimized representation if we wanted.

If byte strings were already interned somewhere I'd gravitate towards the alternative, but the way things stand, we need a `ConstAllocation` case anyway to support byte strings, and then we might as well support arbitrary slices. (Or we say that byte strings don't get an optimized representation at all. Such a performance cliff between `str` and byte strings is probably unexpected, though due to the lack of interning for byte strings I think there might already be a performance cliff there.)
2023-09-20 18:06:48 +00:00
Mara Bos
76d9b3689c Rename BoxMeUp to PanicPayload. 2023-09-20 19:24:52 +02:00
Mara Bos
0d07b4c2ce Call panic_display directly in const_panic_fmt. 2023-09-20 18:59:12 +02:00
León Orell Valerian Liehr
8d81d5a909
Validate crate name in CLI option --extern 2023-09-20 18:50:40 +02:00
bors
4f226925ce Auto merge of #116006 - GuillaumeGomez:rollup-elrbjd4, r=GuillaumeGomez
Rollup of 5 pull requests

Successful merges:

 - #115566 (clean up unneeded `ToPredicate` impls)
 - #115962 (coverage: Remove debug code from the instrumentor)
 - #115988 (rustdoc: add test cases, and fix, search tabs layout jank)
 - #115991 (Ensure `build/tmp` exists in `rustdoc_themes::get_themes`)
 - #115997 (RELEASES.md: Add missing patch releases)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-20 16:16:01 +00:00
Guillaume Gomez
70076c5fe8
Rollup merge of #115997 - Turbo87:relnotes, r=pietroalbini
RELEASES.md: Add missing patch releases

This was copy-pasted from the current state of the `stable` branch

see https://rust-lang.zulipchat.com/#narrow/stream/241545-t-release/topic/1.2E71.2E1/near/382524871
2023-09-20 17:33:18 +02:00
Guillaume Gomez
240c161bc8
Rollup merge of #115991 - ferrocene:rustdoc-themes, r=pietroalbini
Ensure `build/tmp` exists in `rustdoc_themes::get_themes`

This causes failures in ferrocene's CI as `build/tmp` might not exist at this point, causing the following expect to fail here 4b91288484/src/tools/rustdoc-themes/main.rs (L24)
2023-09-20 17:33:18 +02:00
Guillaume Gomez
c535041995
Rollup merge of #115988 - notriddle:notriddle/search-tab-layout, r=GuillaumeGomez
rustdoc: add test cases, and fix, search tabs layout jank

## Before

### Resizing

https://github.com/rust-lang/rust/assets/1593513/24bb5f2b-f6bd-4ed8-91e1-f9ff63d1acee

### Typing

https://github.com/rust-lang/rust/assets/1593513/145f53e1-42eb-4b2a-adba-7c9ab44b0aa4

## After

### Resizing

https://github.com/rust-lang/rust/assets/1593513/acc10a55-e83e-43e6-8604-5dfcb9ae3141

### Typing

https://github.com/rust-lang/rust/assets/1593513/09d6d389-e24f-428f-933f-83d9075f15a2
2023-09-20 17:33:17 +02:00
Guillaume Gomez
c5c4e18913
Rollup merge of #115962 - Zalathar:debug, r=oli-obk
coverage: Remove debug code from the instrumentor

The coverage instrumentor has an entire module full of complex code that is only used for debugging.

And as I continue to work on coverage, I keep finding that this debug code is constantly causing more trouble than it's worth. It's deeply entangled with current implementation details, such that making any non-trivial change to the instrumentor usually requires major changes to the debug code. And so far I have personally not found any of this debug code to be *useful*.

In light of that situation, I'd like to try just ripping all of it out. If I spend any more time dealing with coverage debug code, I want it to be because I'm writing new and useful tools, not dutifully maintaining a boat-anchor that quite plausibly isn't being used by anyone at all.

---
r? `@ghost`
`@rustbot` label +A-code-coverage

---

[Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Removing.20debug.20code.20from.20the.20coverage.20instrumentor)
2023-09-20 17:33:17 +02:00
Guillaume Gomez
4e8f637783
Rollup merge of #115566 - zirconium-n:issue-107250-clean-up-unused-to-predicate, r=oli-obk
clean up unneeded `ToPredicate` impls

Part of #107250.
Removed all totally unused impls. And inlined two impls not need to satisify trait bound.

r? `@oli-obk`
2023-09-20 17:33:16 +02:00
Michael Howell
66e0483a65 rustdoc: add comment about numeric spacing 2023-09-20 07:51:30 -07:00
bors
e3811a785e Auto merge of #115975 - mkroening:reduce-atty, r=davidtwco
dependencies: reduce the amount of crates pulling in atty

It would be nice to have only one `hermit-abi` in `Cargo.lock` (https://github.com/rust-lang/rust/pull/107405#issuecomment-1427116590).

The only crate pulling in the old `hermit-abi` version is `atty`, which is unmaintained.

This PR upgrades three dependencies, which then no longer depend on `atty`:
* `Cargo.lock`: `colored v2.0.0 -> v2.0.4`
* `Cargo.lock`: `tracing-tree v0.2.3 -> v0.2.4`
* Miri: `env_logger 0.9.3 -> 0.10.0`

The only dependency chain left that pulls in `hermit-abi 0.1.19` is:
`hermit-abi 0.1.19` -> `atty 0.2.14` -> `env_logger 0.7.1` -> `jsonpath_lib 0.2.6` -> `jsondocck 0.1.0` (src/tools/jsondocck)

Replacing jsondocck with jsondocckng is tracked in https://github.com/rust-lang/rust/issues/94140.
2023-09-20 14:24:08 +00:00
bors
78e74d959b Auto merge of #115827 - eduardosm:miri-sse-reduce-code-dup, r=RalfJung
miri: reduce code duplication in some SSE/SSE2 intrinsics

Reduces code duplication in the Miri implementation of some SSE and SSE2 using generics and rustc_const_eval helper functions.

There are also some other minor changes.

r? `@RalfJung`
2023-09-20 12:07:26 +00:00
Tobias Bieniek
31e8981fa9
RELEASES.md: Add missing patch releases
This was copy-pasted from the current state of the `stable` branch
2023-09-20 12:06:07 +02:00
bors
ed33e408c5 Auto merge of #115753 - tgross35:threadinfo-refactor, r=thomcc
Refactor `thread_info` to remove the `RefCell`

`thread_info` currently uses `RefCell`-based initialization. Refactor this to use `OnceCell` instead which is more performant and better suits the needs of one-time initialization.

This is nobody's bottleneck but OnceCell checks are a single `cmp` vs. `RefCell<Option>` needing runtime logic
2023-09-20 09:55:53 +00:00
bors
62d9034a0d Auto merge of #115995 - matthiaskrgr:rollup-jukbrvq, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #115965 (Add more if let guard tests)
 - #115978 (Copy 1.72.1 release notes to master)
 - #115983 (fix confusing let chain indentation in rustc_resolve)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-20 08:03:12 +00:00
Matthias Krüger
af36ab1a8e
Rollup merge of #115983 - eopb:confusing-if-chain-indent, r=compiler-errors
fix confusing let chain indentation in rustc_resolve

Sorry for opening a PR for such a minor style fix.
This just felt sufficiently misleading to warrant fixing.
2023-09-20 09:24:31 +02:00
Matthias Krüger
24fc098413
Rollup merge of #115978 - sksat:copy-1.72.1-release-note-to-master, r=Mark-Simulacrum
Copy 1.72.1 release notes to master

- #115976
- this cherry-pick 1.72.1 release note from #115787(0414f85177)
2023-09-20 09:24:30 +02:00
Matthias Krüger
3304ea4218
Rollup merge of #115965 - matthewjasper:extra-if-let-guard-tests, r=compiler-errors
Add more if let guard tests

cc #51114
2023-09-20 09:24:30 +02:00
Zalathar
e015f5a370 coverage: Remove vestigial counter/expression debug labels 2023-09-20 17:24:10 +10:00
Zalathar
bbd347409f coverage: Remove vestigial format_counter methods 2023-09-20 17:24:10 +10:00
Zalathar
3d66513fe4 coverage: Remove debug code from the instrumentor 2023-09-20 17:24:10 +10:00
Lukas Wirth
670631dd26 Ensure build/tmp exists in rustdoc_themes::get_themes 2023-09-20 08:31:33 +02:00
Nikita Popov
4bb9c0f79b Allow anyone to set llvm-fixed-upstream
Allow llvm-* to be set by unauthenticated users, which is currently
llvm-main and llvm-fixed-upstream.
2023-09-20 07:49:23 +02:00
Ralf Jung
a2374e65aa the Const::eval_bits methods don't need to be given the Ty 2023-09-20 07:27:21 +02:00
bors
0e11725809 Auto merge of #115734 - tmiasko:kcfi-no-core, r=compiler-errors
Use no_core for KCFI tests to exercise them in CI
2023-09-20 05:24:34 +00:00
Michael Howell
9fbee7dcc5 rustdoc: add test cases, and fix, search tabs 2023-09-19 21:46:06 -07:00
bors
4b91288484 Auto merge of #115486 - compiler-errors:dont-capture-late-pls, r=cjgillot
Correctly deny late-bound lifetimes from parent in anon consts and TAITs

Reuse the `AnonConstBoundary` scope (introduced in #108553, renamed in this PR to `LateBoundary`) to deny late-bound vars of *all* kinds (ty/const/lifetime) in anon consts and TAITs.

Side-note, but I would like to consolidate this with the error reporting for RPITs (E0657):
c4f25777a0/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs (L733-L754) but the semantics about what we're allowed to capture there are slightly different, so I'm leaving that untouched.

Fixes #115474
2023-09-20 03:34:51 +00:00
Deadbeef
2063ebc3ea bless the known-bug tests 2023-09-20 03:02:14 +00:00
Deadbeef
7446012c1e fix rustdoc tests 2023-09-20 03:02:14 +00:00
Deadbeef
a3b5f1ad85 ignore host effect params in rustdoc 2023-09-20 03:02:14 +00:00
Deadbeef
7b1b17574b fix bugs with effects fallback 2023-09-20 03:02:14 +00:00
Deadbeef
04eec37dc2 Enable effects for libcore 2023-09-20 03:02:14 +00:00
bors
793d5eafc3 Auto merge of #115959 - nikic:update-llvm-13, r=cuviper
Update to LLVM 17.0.0

This rebases our LLVM fork to 17.0.0.

Fixes #115681.
2023-09-20 01:44:55 +00:00
WANG Rui
10d55c3e03 tests/ui/abi: Enable repr(transparent) union ABI tests on LoongArch64 2023-09-20 09:24:22 +08:00
WANG Rui
0163768e0d rustc_target/loongarch: Fix passing of transparent unions with only one non-ZST member
This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed
through an `extern "C"` function.

Fixes https://github.com/rust-lang/rust/issues/115509
2023-09-20 09:22:02 +08:00
bors
3b9e0feff4 Auto merge of #114443 - tgross35:cstr-len, r=dtolnay
Implement `cstr_count_bytes`

This has not yet been approved via ACP, but it's simple enough to get started on.

- ACP: https://github.com/rust-lang/libs-team/issues/256
- Tracking issue: https://github.com/rust-lang/rust/issues/114441

`@rustbot` label +T-libs-api
2023-09-20 00:02:45 +00:00
Mark Rousskov
ed3c63cbec
copy 1.72.1 release notes to master
update release date to actual released date
2023-09-20 08:38:56 +09:00
bors
bdb0fa3ee5 Auto merge of #113955 - cjgillot:name-apit, r=WaffleLapkin
Pretty-print argument-position impl trait to name it.

This removes a corner case.

RPIT and TAIT keep having no name, and it would be wrong to use the one in HIR (Ident::empty), so I make this case ICE.
2023-09-19 21:23:39 +00:00
Ethan Brierley
2243872c26 fix confusing let chain indentation in rustc_resolve 2023-09-19 21:21:01 +01:00
Ziru Niu
3c69a107d0 remove impl<'tcx> ToPredicate<'tcx, Clause<'tcx>> for PolyProjectionPredicate<'tcx> 2023-09-20 04:03:02 +08:00
Ziru Niu
2694b84fbf remove unneeded ToPredicate impls 2023-09-20 04:02:55 +08:00
Eduardo Sánchez Muñoz
85d61b01ae wrap fn sig binders in fn ptr 2023-09-19 21:15:58 +02:00
bors
ac5ac4754a Auto merge of #115979 - GuillaumeGomez:rollup-06ujzgh, r=GuillaumeGomez
Rollup of 6 pull requests

Successful merges:

 - #113383 (style-guide: Add section on bugs, and resolving bugs)
 - #115499 (rustc_target/riscv: Fix passing of transparent unions with only one non-ZST member)
 - #115801 (Detect cycle errors hidden by opaques during monomorphization)
 - #115947 (Custom code classes in docs warning)
 - #115957 (fix mismatched symbols)
 - #115958 (explain mysterious addition in float minimum/maximum)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-09-19 18:52:10 +00:00
Guillaume Gomez
1b862186a7
Rollup merge of #115958 - RalfJung:mystery-plus, r=Mark-Simulacrum,notriddle
explain mysterious addition in float minimum/maximum

Thanks to `@programmerjake` for mentioning this.
2023-09-19 20:23:21 +02:00
Guillaume Gomez
c5f215af33
Rollup merge of #115957 - cuishuang:master, r=GuillaumeGomez
fix mismatched symbols
2023-09-19 20:23:20 +02:00
Guillaume Gomez
52a0d136f5
Rollup merge of #115947 - GuillaumeGomez:custom_code_classes_in_docs-warning, r=notriddle
Custom code classes in docs warning

Fixes https://github.com/rust-lang/rust/issues/115938.

This PR does two things:
 1. Unless the `custom_code_classes_in_docs` feature is enabled, it will use the old codeblock tag parser.
 2. If there is a codeblock tag that starts with a `.`, it will emit a behaviour change warning.

Hopefully this is the last missing part for this feature until stabilization.

Follow-up of https://github.com/rust-lang/rust/pull/110800.

r? `@notriddle`
2023-09-19 20:23:20 +02:00