Commit Graph

221259 Commits

Author SHA1 Message Date
John Kåre Alsaker
36b4199a8e Don't rely on Debug impl for Erased 2023-04-06 08:25:53 +02:00
John Kåre Alsaker
785459d630 Erase query cache values 2023-04-06 08:25:52 +02:00
bors
f211da7101 Auto merge of #109792 - cjgillot:reachable-lint, r=oli-obk
Only visit reachable blocks in ConstProp lint.

Fixes https://github.com/rust-lang/rust/issues/78803
Fixes https://github.com/rust-lang/rust/issues/109731
2023-04-06 03:05:47 +00:00
bors
8c7ad16e82 Auto merge of #109986 - JohnTitor:rollup-3aax38t, r=JohnTitor
Rollup of 7 pull requests

Successful merges:

 - #109909 (Deny `use`ing tool paths)
 - #109921 (Don't ICE when encountering `dyn*` in statics or consts)
 - #109922 (Disable `has_thread_local` on OpenHarmony)
 - #109926 (write threads info into log only when debugging)
 - #109968 (Add regression test for #80409)
 - #109969 (Add regression test for #86351)
 - #109973 (rustdoc: Improve logo display very small screen)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-05 23:10:09 +00:00
Yuki Okushi
9960e9f851
Rollup merge of #109973 - GuillaumeGomez:logo-display-very-small-screen, r=notriddle
rustdoc: Improve logo display very small screen

Before:

![Screenshot from 2023-04-05 16-56-33](https://user-images.githubusercontent.com/3050060/230125438-c63c8de1-923c-4534-adf1-bdef02e402a9.png)

After:

![Screenshot from 2023-04-05 16-57-17](https://user-images.githubusercontent.com/3050060/230125467-d3d46878-373a-4f8a-8554-1bb8c4baf46d.png)

r? `@notriddle`
2023-04-06 07:18:32 +09:00
Yuki Okushi
fe20ae0358
Rollup merge of #109969 - JohnTitor:issue-86351, r=compiler-errors
Add regression test for #86351

r? `@compiler-errors`
Closes #86351
2023-04-06 07:18:31 +09:00
Yuki Okushi
1424268a1b
Rollup merge of #109968 - JohnTitor:issue-80409, r=compiler-errors
Add regression test for #80409

r? ``@compiler-errors``
Closes #80409
2023-04-06 07:18:31 +09:00
Yuki Okushi
9dfe4af2a8
Rollup merge of #109926 - SparrowLii:parallel_log, r=eholk
write threads info into log only when debugging

The current tracing log will unconditionally write thread information during parallel compilation, which sometimes confuses some normal output log information

This fixes the UI test failure of:
```
[ui] tests/ui/consts/const_in_pattern/issue-73431.rs
```
Updates #75760
2023-04-06 07:18:30 +09:00
Yuki Okushi
836504ec34
Rollup merge of #109922 - Amanieu:ohos-no_thread_local, r=wesleywiser
Disable `has_thread_local` on OpenHarmony

OpenHarmony uses emulated TLS, which doesn't link properly when using thread-local variables across crate boundaries with `-C prefer-dynamic`. This PR makes thread_local! use pthreads directly instead.
2023-04-06 07:18:30 +09:00
Yuki Okushi
4b8725b854
Rollup merge of #109921 - compiler-errors:dyn-star-const-static, r=eholk
Don't ICE when encountering `dyn*` in statics or consts

Since we have properly implemented `dyn*` support in CTFE (#107728), let's not ICE here anymore.

Fixes #105777

r? `@eholk`
2023-04-06 07:18:29 +09:00
Yuki Okushi
ea920901e9
Rollup merge of #109909 - clubby789:import-tool-mod, r=petrochenkov
Deny `use`ing tool paths

Fixes #109853
Fixes #109147
2023-04-06 07:18:29 +09:00
bors
2eaeb1eee1 Auto merge of #109437 - petrochenkov:effvisopt, r=davidtwco
resolve: Restore some effective visibility optimizations

Something similar was previously removed as a part of https://github.com/rust-lang/rust/pull/104602.
So we can see [bitmaps-3.1.0](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/bitmaps-3.1.0), [match-stress](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/match-stress) and [unused-warnings](https://github.com/rust-lang/rustc-perf/tree/master/collector/compile-benchmarks/unused-warnings) in regressions there, and in improvements in this PR.
After this PR all table changes should also be "locally correct" after every update.
2023-04-05 20:50:33 +00:00
Guillaume Gomez
8f5404d0d7 Update GUI tests for logo display on very small screens 2023-04-05 21:38:52 +02:00
Camille GILLOT
98255cc242 Comment logic around worklist. 2023-04-05 19:34:38 +00:00
Camille GILLOT
7d47a910eb Only visit reachable blocks in ConstProp lint. 2023-04-05 19:34:38 +00:00
Camille GILLOT
f8cfafcceb Extract check_assertion. 2023-04-05 19:34:38 +00:00
Camille GILLOT
b833fcae90 Manipulate Location instead of SourceInfo. 2023-04-05 19:34:36 +00:00
Camille GILLOT
35e622d218 Do not keep extra references to scopes and decls. 2023-04-05 19:30:44 +00:00
bors
2e486be8d2 Auto merge of #107925 - thomcc:sip13, r=cjgillot
Use SipHash-1-3 instead of SipHash-2-4 for StableHasher

Noticed this, and it seems easy and likely a perf win. IIUC we don't need DDOS resistance (just collision) so we ideally would have an even faster hash, but it's hard to beat this SipHash impl here, since it's been so highly tuned for the interface.

It wouldn't surprise me if there's some subtle reason changing this sucks, as it's so obvious it seems likely to have been done. Still, SipHash-1-3 seems to still have the guarantees StableHasher should need (and seemingly more), and is clearly less work. So it's worth a shot.

Not fully tested locally.
2023-04-05 18:35:34 +00:00
bors
b2b676d886 Auto merge of #108905 - ferrocene:pa-compiletest-ignore, r=ehuss
Validate `ignore` and `only` compiletest directive, and add human-readable ignore reasons

This PR adds strict validation for the `ignore` and `only` compiletest directives, failing if an unknown value is provided to them. Doing so uncovered 79 tests in `tests/ui` that had invalid directives, so this PR also fixes them.

Finally, this PR adds human-readable ignore reasons when tests are ignored due to `ignore` or `only` directives, like *"only executed when the architecture is aarch64"* or *"ignored when the operative system is windows"*. This was the original reason why I started working on this PR and #108659, as we need both of them for Ferrocene.

The PR is a draft because the code is extremely inefficient: it calls `rustc --print=cfg --target $target` for every rustc target (to gather the list of allowed ignore values), which on my system takes between 4s and 5s, and performs a lot of allocations of constant values. I'll fix both of them in the coming days.

r? `@ehuss`
2023-04-05 16:15:25 +00:00
Rémy Rakic
46a3d28e88 Fix function order in an msvc debuginfo test
The function names with const generic parameters are printed in a
different order.
2023-04-05 15:59:29 +00:00
Rémy Rakic
4e235a7fa9 Bless rustdoc-ui test with new errors order
The order in which the multiple errors for the ambiguous intra doc links
are printed is different.
2023-04-05 15:59:29 +00:00
Rémy Rakic
dc04b085f4 Bless rustdoc test with swapped ids
The ids for the multiple `Item` associated type elements are swapped
between the first and second impl.
2023-04-05 15:59:29 +00:00
Rémy Rakic
931fd8539e Fix codegen tests with hard-coded hashes 2023-04-05 15:59:29 +00:00
Thom Chiovoloni
46fad955c0 Fix a debuginfo test with a hard-coded hash 2023-04-05 15:59:29 +00:00
Thom Chiovoloni
476737e03c Fix an assembly test with a hard-coded hash 2023-04-05 15:59:29 +00:00
Thom Chiovoloni
36ca32c1ed Fix a codegen test with some hard-coded hashes 2023-04-05 15:59:29 +00:00
Thom Chiovoloni
0db1f54f89 Bless tests 2023-04-05 15:59:29 +00:00
Thom Chiovoloni
9d314627aa Fix a couple missed hash constants 2023-04-05 15:48:37 +00:00
Thom Chiovoloni
bb0969cae0 Use SipHash-1-3 instead of SipHash-2-4 for StableHasher 2023-04-05 15:48:37 +00:00
Guillaume Gomez
906bdd3bdb Improve display of logo on very small screens 2023-04-05 17:13:28 +02:00
Yuki Okushi
b8e90766b5
Add regression test for #86351
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-04-05 22:47:33 +09:00
bors
4cb92cc83a Auto merge of #109966 - JohnTitor:rollup-eoqjr5j, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #107236 (Add T-bootstrap label to tools)
 - #109847 (Only create graphviz nodes for reachable MIR bb's)
 - #109848 (submodule detection for proper fix on #96188)
 - #109932 (Source code scrollbar)
 - #109952 (Move comment about python2 closer to the place it's used)
 - #109956 (Tweak debug outputs to make debugging new solver easier)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-05 13:01:08 +00:00
Yuki Okushi
2df3f490dd
Add regression test for #80409
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-04-05 21:20:07 +09:00
Yuki Okushi
038ece0a42
Rollup merge of #109956 - compiler-errors:tweak-debug-outputs, r=oli-obk
Tweak debug outputs to make debugging new solver easier

1. Move the fields that are "most important" (I know this is subjective) to the beginning of the structs.

For goals, I typically care more about the predicate than the param-env (which is significantly longer in debug output).
For canonicalized things, I typically care more about what is *being* canonicalized.
For a canonical response, I typically care about the response -- or at least, it's typically useful to put it first since it's short and affects the whether the solver recurses or not...

2. Add some more debug and instrument calls to functions to add more structure to tracing lines.

r? `@oli-obk` or `@BoxyUwU` (since I think `@lcnr` is on holiday)
2023-04-05 20:47:24 +09:00
Yuki Okushi
616dde1d4e
Rollup merge of #109952 - jyn514:python-comment, r=pietroalbini
Move comment about python2 closer to the place it's used

Addresses https://github.com/rust-lang/rust/pull/109267#discussion_r1141333399.

r? `@pietroalbini`
2023-04-05 20:47:24 +09:00
Yuki Okushi
ee63b65007
Rollup merge of #109932 - GuillaumeGomez:source-code-scrollbar, r=notriddle
Source code scrollbar

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

You can test it [here](https://rustdoc.crud.net/imperio/source-code-scrollbar/src/test_docs/lib.rs.html).

It seems to introduce a few regressions (at least change of behaviour) about the scroll "saving" though.

r? `@notriddle`
2023-04-05 20:47:23 +09:00
Yuki Okushi
30ffbc4923
Rollup merge of #109848 - ozkanonur:fix-96188, r=albertlarsan68
submodule detection for proper fix on #96188

This commit resolves an internal FIXME note within the bootstrap by implementing submodule detection. This is accomplished through an iterative process over the `.gitmodules` file.

r? `@albertlarsan68`
2023-04-05 20:47:23 +09:00
Yuki Okushi
4e0662c8a7
Rollup merge of #109847 - clubby789:graphviz-reachable, r=oli-obk
Only create graphviz nodes for reachable MIR bb's

Fixes #109832
2023-04-05 20:47:22 +09:00
Yuki Okushi
630f2fc850
Rollup merge of #107236 - albertlarsan68:move-tidy-to-bootstrap, r=jyn514
Add T-bootstrap label to tools

cc `@rust-lang/bootstrap:`

### Unresolved questions:

- [ ] Do we want to keep the A-testsuite on those?
- [ ] Do we want all of those tools to be ours?
2023-04-05 20:47:21 +09:00
ozkanonur
5a4066ebb7 submodule detection for proper fix on #96188
This commit resolves an internal FIXME note within the bootstrap by implementing submodule detection.
This is accomplished through an iterative process over the `.gitmodules` file.

Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-05 14:02:28 +03:00
bors
383c1d729e Auto merge of #109117 - oli-obk:locks, r=michaelwoerister
Avoid a few locks

We can use atomics or datastructures tuned for specific access patterns instead of locks. This may be an improvement for parallel rustc, but it's mostly a cleanup making various datastructures only usable in the way they are used right now (append data, never mutate), instead of having a general purpose lock.
2023-04-05 10:38:02 +00:00
bors
90a9f69c80 Auto merge of #109945 - Kobzol:llvm-bolt-gnu-stack, r=nikic
Remove the use of `-use-gnu-stack` when BOLTing LLVM

This flag was (counterintuitively) removing the `GNU_STACK` ELF attribute, which caused the optimized `libLLVM.so` file to be flagged as having an executable stack on SELinux.

Removing the flag might cause issues with `strip`. I'm not aware that we're stripping `libLLVM.so` though. Does it happen anywhere?

Fixes: https://github.com/rust-lang/rust/issues/105783
2023-04-05 08:17:39 +00:00
Oli Scherer
457a162d00 Use elsa =1.7.1 as 1.8.0 was an accidental copy of 1.7.0 2023-04-05 08:07:29 +00:00
Albert Larsan
96102c7725
Add T-bootstrap label to tools 2023-04-05 05:59:21 +00:00
bors
a412564f8c Auto merge of #109954 - clubby789:graphviz-path-trimming, r=compiler-errors
Disable path trimming during graphviz output

Fixes #109943

We can end up pretty-printing a path for the graphviz file without emitting a diagnostic, so disable path trimming at this point.
2023-04-05 05:47:33 +00:00
bors
8d321f7a88 Auto merge of #109843 - scottmcm:better-transmute, r=WaffleLapkin
Allow `transmute`s to produce `OperandValue`s instead of needing `alloca`s

LLVM can usually optimize these away, but especially for things like transmutes of newtypes it's silly to generate the `alloc`+`store`+`load` at all when it's actually a nop at LLVM level.
2023-04-05 03:26:38 +00:00
Michael Goulet
786fc90855 Tweak debug outputs to make debugging new solver easier 2023-04-05 03:18:29 +00:00
clubby789
422c33030f Disable path trimming during graphviz output 2023-04-05 03:06:37 +01:00
Scott McMurray
9aa9a846b6 Allow transmutes to produce OperandValues instead of always using allocas
LLVM can usually optimize these away, but especially for things like transmutes of newtypes it's silly to generate the `alloc`+`store`+`load` at all when it's actually a nop at LLVM level.
2023-04-04 18:44:29 -07:00