Commit Graph

221427 Commits

Author SHA1 Message Date
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
Michael Howell
c325fda0bf rustdoc: migrate item_union to an Askama template 2023-04-05 07:49:30 -07:00
Maybe Waffle
9405f586f5 Fix typo 2023-04-05 13:49:48 +00:00
Maybe Waffle
d7056548f9 Yeet owning_ref
Turns out
- `owning_ref` is unsound due to `Box` aliasing stuff
- `rustc` doesn't need 99% of the `owning_ref` API
- `rustc` can use a far simpler abstraction that is `OwnedSlice`
2023-04-05 13:49:48 +00:00
Maybe Waffle
c0ceefdfaf Use OwnedSlice instead of owning_ref 2023-04-05 13:49:48 +00:00
Maybe Waffle
689beda166 Implement OwnedSlice 2023-04-05 13:49:48 +00: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
klensy
c0bc00174f review 2023-04-05 15:08:17 +03: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
jyn
a6810ccb25 Reduce the default max number of files in a UI test directory
It doesn't make sense for the root directory to have a lower limit than
subdirectories.
2023-04-05 07:34:12 -04: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
Nikita Popov
2175dab137 Update to LLVM 16.0.1 2023-04-05 12:40:04 +02: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
Thom Chiovoloni
42e38e8949
Use the junction crate in bootstrap instead of manually creating the junction 2023-04-05 01:27:11 -07: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
Thom Chiovoloni
12dff54a6a
Fix same issue in bootstrap 2023-04-05 00:54:46 -07:00
Thom Chiovoloni
6861750e66
Fix buffer overrun in (test-only) symlink_junction 2023-04-05 00:37:30 -07: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
Michael Goulet
4a4fc3bb5b Implement support for GeneratorWitnessMIR in new solver 2023-04-05 03:04:54 +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
bors
f98a271814 Auto merge of #94786 - joshlf:patch-5, r=dtolnay
Document NonZeroXxx layout guarantees

Document that `NonZeroXxx` has the same layout and bit validity as `Xxx` with the exception of `0`.
2023-04-05 01:09:59 +00:00
jyn
8a399555f0 Move comment about python2 closer to the place it's used 2023-04-04 20:45:20 -04:00
bors
603270011e Auto merge of #109944 - cjgillot:lint-cstring-macro, r=Nilstrieb
Do not suppress temporary_cstring_as_ptr in macros.

There isn't really a reason to skip the lint when part of the expression comes from an expansion.

Fixes https://github.com/rust-lang/rust/issues/94694
2023-04-04 22:35:09 +00:00
bors
700938c078 Auto merge of #109808 - jyn514:debuginfo-options, r=michaelwoerister
Extend -Cdebuginfo with new options and named aliases

This is a rebase of https://github.com/rust-lang/rust/pull/83947, along with my best guess at what the new options mean. I tried to follow the LLVM source code to get a better idea but ran into quite a lot of trouble (https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/go-to-definition.20in.20src.2Fllvm-project.3F). The description for the original PR follows below.

Note that the changes in this PR have already been through FCP: https://github.com/rust-lang/rust/pull/83947#issuecomment-878384979

Closes https://github.com/rust-lang/rust/pull/109311. Helps with https://github.com/rust-lang/rust/pull/104968.
r? `@michaelwoerister` cc `@cuviper`

---

The -Cdebuginfo=1 option was never line tables only and can't be due to backwards compatibility issues. This was clarified and an option for emitting line tables only was added. Additionally an option for emitting line info directives only was added, which is needed for some targets, i.e. nvptx. The debug info options should now behave similarly to clang's debug info options.

Fix https://github.com/rust-lang/rust/issues/60020
Fix https://github.com/rust-lang/rust/issues/64405
2023-04-04 20:01:05 +00:00
Scott McMurray
21bb8ef24e Use FieldIdx in FieldsShape
Finally got to the main motivating example from the MCP :)
2023-04-04 12:38:06 -07:00
Jakub Beránek
c32953f44f
Remove the use of -use-gnu-stack when BOLTing LLVM
This flag (counterintuitively) was removing the `GNU_STACK` ELF attribute, which caused the optimized `libLLVM.so` file to be flagged as having an executable stack on SELinux.
2023-04-04 21:07:19 +02:00
Camille GILLOT
8528ac6e35 Do not suppress temporary_cstring_as_ptr in macros. 2023-04-04 18:55:02 +00:00
bors
540a50df0f Auto merge of #109941 - compiler-errors:rollup-5lsst2u, r=compiler-errors
Rollup of 9 pull requests

Successful merges:

 - #109723 (Pull some tuple variant fields out into their own struct)
 - #109838 (Fix `non_exhaustive_omitted_patterns` lint span)
 - #109901 (Enforce VarDebugInfo::Place in MIR validation.)
 - #109913 (Doc-comment  `IndexVec::from_elem` and use it in a few more places)
 - #109914 (Emit feature error for parenthesized generics in associated type bounds)
 - #109919 (rustdoc: escape GAT args in more cases)
 - #109937 (Don't collect return-position impl traits for documentation)
 - #109938 (Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible)
 - #109940 (Add regression test for #93911)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-04 16:39:26 +00:00
Michael Goulet
678d7c505d
Rollup merge of #109940 - JohnTitor:issue-93911, r=compiler-errors
Add regression test for #93911

r? `@compiler-errors`
Closes #93911
2023-04-04 09:27:48 -07:00
Michael Goulet
b0483e8004
Rollup merge of #109938 - oli-obk:try_norm, r=compiler-errors
Move a const-prop-lint specific hack from mir interpret to const-prop-lint and make it fallible

fixes #109743

This hack didn't need to live in the mir interpreter. For const-prop-lint it is entirely correct to avoid doing any const prop if normalization fails at this stage. Most likely we couldn't const propagate anything anyway, and if revealing was needed (so opaque types were involved), we wouldn't want to be too smart and leak the hidden type anyway.
2023-04-04 09:27:47 -07:00
Michael Goulet
d984671246
Rollup merge of #109937 - compiler-errors:rustdoc-rpit-cant-be-documented, r=GuillaumeGomez
Don't collect return-position impl traits for documentation

#104889 modified the rustdoc ast collection step to use a HIR visitor, which more thoroughly walks the HIR tree. that means that we're going to encounter inner items (incl return-position impl traits and async fn opaque futures) that are not possible to document.

FIxes (but does not close due to being a beta regression) #109931

r? `@GuillaumeGomez`
2023-04-04 09:27:47 -07:00
Michael Goulet
72e535ea99
Rollup merge of #109919 - fmease:rustdoc-fix-issue-109488, r=notriddle
rustdoc: escape GAT args in more cases

Fixes #109488.

Previously we printed the *un*escaped form of GAT arguments not only when `f.alternate()` was true but *also* when we failed to compute the URL of the trait associated with the type projection, i.e. when `href(…)` returned an `Err(_)`.

In this PR the argument printing logic is entirely separate from the link resolution code above as it should be.
Further, we now only try to compute the URL if the HTML format was requested with `!f.alternate()`. Before, we would sometimes compute the `href` only to throw it away later.
2023-04-04 09:27:46 -07:00