Commit Graph

140677 Commits

Author SHA1 Message Date
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
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
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
Guillaume Gomez
906bdd3bdb Improve display of logo on very small screens 2023-04-05 17:13:28 +02: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
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
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
jyn
8a399555f0 Move comment about python2 closer to the place it's used 2023-04-04 20:45:20 -04: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
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
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
Oli Scherer
373807a95c Rename ast::Static to ast::StaticItem to match ast::ConstItem 2023-04-04 15:34:40 +00:00
Guillaume Gomez
6f9b988578 Move scrollbar on the <main> element rather than only on the code block to improve UX 2023-04-04 16:35:36 +02:00
Michael Goulet
72ef85d83e Don't collect return-position impl traits for documentation 2023-04-04 14:03:50 +00:00
Oli Scherer
4bebdd7104 box a bunch of large types 2023-04-04 13:58:50 +00:00
jyn
92b7591371 Add a best guess at what line-directives-only means 2023-04-04 07:37:33 -04:00
Oli Scherer
ec74653652 Split out ast::ItemKind::Const into its own struct 2023-04-04 09:44:50 +00:00
Oli Scherer
e3828777a6 rust-analyzer guided tuple field to named field 2023-04-04 09:44:50 +00:00
Oli Scherer
b08a557f80 rust-analyzer guided enum variant structification 2023-04-04 09:44:45 +00:00
SparrowLii
8b21f9ee22 write threads info into log only when debugging 2023-04-04 15:31:37 +08:00
bors
bd991d9953 Auto merge of #109888 - Mark-Simulacrum:balanced-compression, r=pietroalbini
Remove optimal xz settings from CI

This is a companion PR to rust-lang/promote-release#58, which moves the relevant optimal code to rust-lang/promote-release. As mentioned in the comments of that PR, this is expected to cut CI costs (and time, though predominantly felt on fast builders) and reduce wasted resources due to in-practice single-threaded compression not using the full 8+ vCPU builders we have available.

This probably shouldn't land before that PR + a simpleinfra change to enable the recompression of xz artifacts. But if it does land, it's just a matter of a few nightlies with slightly larger artifacts, so not a big deal.

r? `@pietroalbini`
2023-04-04 03:54:22 +00:00
bors
eb48e9771a Auto merge of #109876 - jsha:uniquify-intra-doc, r=notriddle
rustdoc: make intra-doc link pass non-quadratic for repeated links

In the collect_intra_doc_links pass, links to a given item that occurred repeatedly were getting inserted into a `Vec<clean::ItemLink>` repeatedly. This led to n^2 behavior (where n = the number of pages generated), particularly for the intra-doc link on the `Into<U> for T where U: From<T>` blanket implementation, since that link appears on every single struct page.

Fixes #109851
2023-04-04 01:12:24 +00:00
León Orell Valerian Liehr
6567bc9a47
rustdoc: escape GAT args in more cases 2023-04-04 02:09:23 +02:00
bors
cf7ada217c Auto merge of #109911 - JohnTitor:rollup-7gjiqim, r=JohnTitor
Rollup of 6 pull requests

Successful merges:

 - #109783 (Update contributing links for rustc-dev-guide changes)
 - #109883 (Add links to <cell.rs>)
 - #109889 (Update book, rustc-dev-guide, rust-by-example)
 - #109896 (Never consider int and float vars for `FnPtr` candidates)
 - #109902 (Add async-await test for #107414)
 - #109903 (Add Chris Denton to `.mailmap`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-03 22:29:54 +00:00
Yuki Okushi
4e25d20f95
Rollup merge of #109889 - ferrocene:pa-update-books, r=ehuss
Update book, rustc-dev-guide, rust-by-example

Changes from `rust-lang/book`:

* https://github.com/rust-lang/book/pull/3598

Changes from `rust-lang/rust-by-example`:

* https://github.com/rust-lang/rust-by-example/pull/1695
* https://github.com/rust-lang/rust-by-example/pull/1694
* https://github.com/rust-lang/rust-by-example/pull/1693
* https://github.com/rust-lang/rust-by-example/pull/1688
* https://github.com/rust-lang/rust-by-example/pull/1696

Changes from `rust-lang/rustc-dev-guide`:

* https://github.com/rust-lang/rustc-dev-guide/pull/1655
* https://github.com/rust-lang/rustc-dev-guide/pull/1657
* https://github.com/rust-lang/rustc-dev-guide/pull/1659
* d436bf134e...fca8af6c15

r? `@ehuss`
2023-04-04 05:52:35 +09:00
bors
48829ea74b Auto merge of #109771 - uweigand:s390x-miri-libffi, r=oli-obk
Increase libffi version to 3.2 to support s390x

libffi versions prior to 3.2 have no support for s390x, causing the Miri build to fail on our platform.
2023-04-03 19:53:24 +00:00
Pietro Albini
a6431e96b1
update rust-by-example 2023-04-03 14:12:48 +02:00
Pietro Albini
49795b40cf
update rustc dev guide 2023-04-03 14:12:13 +02:00
Mark Rousskov
0da526b5f3 Remove optimal xz settings from CI
This is a companion PR to rust-lang/promote-release#58, which moves the
relevant optimal code to rust-lang/promote-release. As mentioned in the
comments of that PR, this is expected to cut CI costs (and time, though
predominantly felt on fast builders) and reduce wasted resources due to
in-practice single-threaded compression not using the full 8+ vCPU
builders we have available.
2023-04-03 07:44:58 -04:00
Ulrich Weigand
09541b5e1b Increase libffi version to 3.2 to support s390x 2023-04-03 13:27:51 +02:00
Pietro Albini
5d842a6f32
update book 2023-04-03 11:44:06 +02:00
Pietro Albini
9a2d1b85ed
restore check for both target os and env
This is better than the old impl of target.ends_with("windows-gnu"),
because it also catches things like windows-gnullvm
2023-04-03 10:23:12 +02:00
Pietro Albini
5b0a0d8254
add support for ignore-gdb-version 2023-04-03 10:23:11 +02:00
Pietro Albini
60f2761503
add support for ignore-llvm-version 2023-04-03 09:30:36 +02:00
Pietro Albini
54c4762a86
fix remaining tests 2023-04-03 09:30:35 +02:00
Pietro Albini
91be8cadcb
properly match multiple families 2023-04-03 09:30:33 +02:00
Pietro Albini
4cdb783cb9
migrate existing behavior of matches_arch 2023-04-03 09:30:32 +02:00
Pietro Albini
e085192729
allow some out of tree archs 2023-04-03 09:30:31 +02:00
Pietro Albini
bc991de233
reduce allocations when validating cfgs 2023-04-03 09:30:29 +02:00
Pietro Albini
9cb4373a84
move cfg handling into its own module 2023-04-03 09:30:28 +02:00
Pietro Albini
8eb3def446
handle "ignore-" and "only-" 2023-04-03 09:30:26 +02:00
Pietro Albini
55121a9c46
avoid cloning the whole compiletest configuration for every test 2023-04-03 09:30:23 +02:00
bors
932c173ca1 Auto merge of #109884 - matthiaskrgr:rollup-5wapig9, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #109526 (LIBPATH is used as dylib's path environment variable on AIX)
 - #109642 (check for missing codegen backeng config)
 - #109722 (Implement read_buf for RustHermit)
 - #109856 (fix(middle): emit error rather than delay bug when reaching limit)
 - #109868 (Improve PR job names in Github Actions preview)
 - #109871 (Include invocation start times)
 - #109873 (Move some UI tests into subdirectories)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2023-04-03 07:27:58 +00:00
Pietro Albini
c075691b82
use --print=all-target-specs-json for stage1+ 2023-04-03 09:24:16 +02:00
Pietro Albini
0e6d2053b4
use target specs rather than --print=cfg to discover targets 2023-04-03 09:24:15 +02:00
Pietro Albini
0aaf9d58a2
reduce boilerplate with common enums 2023-04-03 09:24:04 +02:00
Pietro Albini
9bc8bb91de
validate ignore-FOO/only-FOO directives and output only-FOO reasoning 2023-04-03 09:24:01 +02:00