Commit Graph

144483 Commits

Author SHA1 Message Date
Guillaume Gomez
e05e4f38b5
Rollup merge of #117263 - onur-ozkan:change-id-fix, r=saethlin
handle the case when the change-id isn't found

When we switch back and forth between the old and recent branches, if there was a breaking change in the bootstrap configuration in between, we have to update the change-id in the build configuration with each checkout, which can be exhausting. This change fixes that.

r? saethlin
2023-11-08 17:14:35 +01:00
onur-ozkan
e0cb1cc296 bootstrap: add more detail on change-id comments
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08 14:06:45 +03:00
onur-ozkan
e878100386 bootstrap: improve fn check_version
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08 14:06:01 +03:00
onur-ozkan
ae4d18b2da handle the case when the change-id isn't found
When we switch back and forth between the old and recent branches,
if there was a breaking change in the bootstrap configuration in
between, we have to update the change-id in the build configuration
with each checkout, which can be exhausting. This change fixes that.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-08 14:05:56 +03:00
Matthias Krüger
7e4ffa98b5
Rollup merge of #117700 - Zalathar:rename-run-coverage, r=onur-ozkan
coverage: Rename the `run-coverage` test mode to `coverage-run`

Follow-up to https://github.com/rust-lang/rust/pull/117484#issuecomment-1788916563.

Renaming this test mode to `coverage-run` makes it more consistent with the `coverage-map` mode and the shared `tests/coverage` test directory.

---

``@rustbot`` label +A-code-coverage
2023-11-08 11:25:56 +01:00
Matthias Krüger
b1b5a8ea9d
Rollup merge of #117667 - Alexendoo:doc-clippy-config, r=albertlarsan68
Document clippy_config in nightly-rustc docs

A new clippy crate added in https://github.com/rust-lang/rust-clippy/pull/11685
2023-11-08 11:25:56 +01:00
Matthias Krüger
adf4981969
Rollup merge of #117663 - klensy:bump-deps, r=davidtwco
bump some deps

* drop `num_cpus` from rust-installer as not used
* update `rayon`, `rayon-core`, which drops it's deps on `num_cpus` and `crossbeam-channel` (for bootstrap too) (https://github.com/rayon-rs/rayon/blob/v1.8.0/RELEASES.md)
* update `errno`, which drops `errno-dragonfly` (5341791935/CHANGELOG.md)
2023-11-08 11:25:55 +01:00
Matthias Krüger
ba7ec56639
Rollup merge of #117531 - fmease:rustdoc-effects-properly-elide-x-crate-host-args, r=GuillaumeGomez
rustdoc: properly elide cross-crate host effect args

Fixes FIXMEs introduced in #116670.
2023-11-08 11:25:54 +01:00
Matthias Krüger
b74a84c0bc
Rollup merge of #114316 - ecnelises:aix_doc, r=workingjubilee
Add AIX platform support document
2023-11-08 11:25:54 +01:00
bors
750c2ecd15 Auto merge of #116881 - LuuuXXX:issue-110087, r=onur-ozkan
Add a new `download-ci-llvm = if-unchanged` option and enable it by default for `profile = codegen`

Three tasks have been implemented here.

Add a new `download-ci-llvm = if-unchange` option and enable if by
default for `profile = codegen`.

Include all build artifacts by traversing the llvm-project build output,
Keep the downloadable llvm the same state as if you have just run a full
source build.

After selecting the codegen profile during ./x.py setup, the submodule
will be automatically downloaded.

Resolves #110087
2023-11-08 08:08:50 +00:00
Qiu Chaofan
b9b7982f72 Add AIX platform-support doc 2023-11-08 15:03:56 +08:00
Zalathar
a573880373 coverage: Rename the run-coverage test mode to coverage-run
This makes it more consistent with the `coverage-map` mode and the shared
`tests/coverage` test directory.
2023-11-08 16:41:24 +11:00
bors
7cc997d373 Auto merge of #117699 - weihanglo:update-cargo, r=weihanglo
Update cargo

7 commits in 65e297d1ec0dee1a74800efe600b8dc163bcf5db..7046d992f9f32ba209a8079f662ebccf9da8de25
2023-11-03 20:56:31 +0000 to 2023-11-08 03:24:57 +0000
- fix: Report more detailed semver errors (rust-lang/cargo#12924)
- Fix some broken links in the man pages (rust-lang/cargo#12929)
- Add better error message when it can not find the search section (rust-lang/cargo#12865)
- Bug 12920 (rust-lang/cargo#12923)
- Update link in environment-variables.md (rust-lang/cargo#12922)
- refactor(toml): Pull out the schema (rust-lang/cargo#12911)
- tests: Remove plugin tests (rust-lang/cargo#12921)

r? ghost
2023-11-08 05:05:04 +00:00
Weihang Lo
0670466e2c
Update cargo 2023-11-07 23:40:22 -05:00
bors
91cfcb0219 Auto merge of #117484 - Zalathar:tests, r=cjgillot
coverage: Unify `tests/coverage-map` and `tests/run-coverage` into `tests/coverage`

Ever since the introduction of the `coverage-map` suite, it's been awkward to have to manage two separate coverage test directories containing dozens of mostly-identical files.

However, those two suites were separate for good reasons. They have very different requirements (since only one of them requires actually running the test program), running only one suite is noticeably faster than running both, and having separate suites allows them to be blessed separately if desired. So while unifying them was an obvious idea, actually doing so was non-trivial.

---

Nevertheless, this PR finds a way to merge the two suites into one directory while retaining almost all of the developer-experience benefits of having two suites. This required non-trivial implementations of `Step`, but the end result works very smoothly.

---

The first 5 commits are a copy of #117340, which has been closed in favour of this PR.
2023-11-08 03:00:14 +00:00
LuuuX
1b8dee19e8 Fix issue #110087
Three tasks have been implemented here.

Add a new `download-ci-llvm = if-unchange` option and enable if by
default for `profile = codegen`.

Include all build artifacts by traversing the llvm-project build output,
Keep the downloadable llvm the same state as if you have just run a full
source build.

After selecting the codegen profile during ./x.py setup, the submodule
will be automatically downloaded.
2023-11-08 09:22:28 +08:00
bors
0d5ec963bb Auto merge of #117692 - matthiaskrgr:rollup-umaf5pr, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #113925 (Improve diagnostic for const ctors in array repeat expressions)
 - #116399 (Small changes w/ `query::Erase<_>`)
 - #117625 (Fix some clippy perf lints)
 - #117655 (Method suggestion code tweaks)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-08 01:01:58 +00:00
Matthias Krüger
7552dd19ad
Rollup merge of #117625 - nnethercote:clippy-perf, r=cuviper
Fix some clippy perf lints

`@matthiaskrgr` gave me the output of a clippy run with perf lints enabled. This PR fixes ones that I thought were worth fixing.

r? `@cuviper`
2023-11-08 00:47:51 +01:00
Nicholas Nethercote
e8cf29b584 rustdoc: minor changes suggested by clippy perf lints. 2023-11-08 09:35:35 +11:00
bors
ff0b4b6091 Auto merge of #117672 - lqd:ci-gcc-lld, r=Kobzol
ci: bump gcc on dist x64 linux builder to 9.5

Support for `-fuse-ld=lld` was added in GCC 9, so this PR bumps gcc to the latest 9.x release, to prepare for switching to LLD.

`-Clinker-flavor=gnu-lld-cc -Clink-self-contained=+linker` will require our CI's GCC to understand `-fuse-ld=lld` when bootstrapping in a future where `x86_64-unknown-linux-gnu` is using `rust-lld` by default.
2023-11-07 22:07:23 +00:00
Matthias Krüger
f6f6fd1d1a
Rollup merge of #117639 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/reference

4 commits in 16fd3c06d9e558dae2d52000818274ae70c9e90a..cd8193e972f61b92117095fc73b67af767b4d6bc
2023-11-04 17:19:39 UTC to 2023-10-30 16:04:52 UTC

- Guarantee that raw pointer conversions preserve slice element count (rust-lang/reference#1417)
- some asm block flags also mean there can be no fences (rust-lang/reference#1413)
- Guarantee `char` layout (rust-lang/reference#1401)
- Doc: Add the RISC-V stabilized target features (rust-lang/reference#1415)

## rust-lang/rust-by-example

3 commits in 6709beeb7d0fbc5ffc91ac4893a24434123b9bfa..311b84962016b28c75525c86e7b3f49fd9101a39
2023-10-31 18:32:09 UTC to 2023-10-31 18:30:39 UTC

- Fixed explanation mistake in comment (rust-lang/rust-by-example#1761)
- Fix typos (rust-lang/rust-by-example#1759)
- docs(9.2): fix typo (rust-lang/rust-by-example#1754)

## rust-lang/rustc-dev-guide

6 commits in b0ee9ec8fa59a6c7620165e061f4747202377a62..77dbe5782b2488af3bb489ad702eaff438f465bf
2023-11-06 16:14:34 UTC to 2023-10-29 17:16:02 UTC

- add a new type system invariant (rust-lang/rustc-dev-guide#1822)
- Update some outdated descriptions of coverage instrumentation (rust-lang/rustc-dev-guide#1809)
- Add some documentation for unsizing (rust-lang/rustc-dev-guide#1817)
- Bibliography: fixing author of "You Can't Spell Trust Without Rust" (rust-lang/rustc-dev-guide#1815)
- remove change-id from sample build configuration (rust-lang/rustc-dev-guide#1813)
- Update name of "active" features to "unstable" (rust-lang/rustc-dev-guide#1814)
2023-11-07 19:29:57 +01:00
Rémy Rakic
1d1fe9a205 add note to remember to update a url when bumping to gcc 10.1.0 2023-11-07 18:26:20 +00:00
bors
9bd71afb90 Auto merge of #115904 - notriddle:notriddle/preload-bold, r=GuillaumeGomez
rustdoc: stop preloading Source Serif 4 Bold

According to #91170, italic fonts are not preloaded because they're rarely used, but bold fonts are. This seems to be true of bold Source Code Pro and bold Fira Sans, but bold and italic Source Serif Pro seem to be equally heavily used.

This is, I assume, the result of using Fira Sans Bold and Source Code Bold headings, so you only get bold Serif text when the doc author uses strong `**` emphasis (or within certain kinds of tooltip, which shouldn't be preloaded because they only show up long after the page is loaded).

To check this, run these two commands in the browser console to measure how much they're used. The measurement is extremely rough, but it gets the idea across: the two styles are about equally popular.

    // count bold elements
    Array.prototype.slice.call(document.querySelectorAll("*")).filter(x => { const y = document.defaultView.getComputedStyle(x); return y.fontFamily.indexOf("Source Serif 4") !== -1 && y.fontWeight > 400 }).length
    // count italic elements
    Array.prototype.slice.call(document.querySelectorAll("*")).filter(x => { const y = document.defaultView.getComputedStyle(x); return y.fontFamily.indexOf("Source Serif 4") !== -1 && y.fontStyle == "italic" }).length

| URL          | Bold | Italic |
|--------------|-----:|-------:|
| [std]        |    2 |      9 |
| [Vec]        |    8 |     89 |
| [regex]      |   33 |     17 |
| [test_suite] |    0 |      0 |

[std]: https://doc.rust-lang.org/nightly/std/index.html
[Vec]: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html
[regex]: https://docs.rs/regex/1.9.5/regex/index.html
[test_suite]: https://docs.rs/test-suite/3.2.9/test_suite/
2023-11-07 15:14:59 +00:00
Rémy Rakic
d73eaaac5f ci: bump gcc on dist x64 linux builder to 9.5
Support for `-fuse-ld=lld` was added in GCC 9
2023-11-07 14:25:46 +00:00
Alex Macleod
f2fd8ad788 Document clippy_config in nightly-rustc docs 2023-11-07 13:21:04 +00:00
klensy
eed89185bb bump some deps
drop num_cpus from rust-installer as not used
update rayon, rayon-core, which drops it's deps on num_cpus and crossbeam-channel (for bootstrap too) (https://github.com/rayon-rs/rayon/blob/v1.8.0/RELEASES.md)
update erro, which drops errno-dragonfly (5341791935/CHANGELOG.md)
2023-11-07 15:33:59 +03:00
Zalathar
4e6f438d2a coverage: Register test::Coverage as the test suite for tests/coverage
This restores the ability to run a coverage test by specifying its path, e.g.
`./x.py test tests/coverage/if.rs`. This runs the test in both modes.
2023-11-07 11:15:19 +11:00
Zalathar
49127c64d6 coverage: Migrate tests/coverage-map into tests/coverage 2023-11-07 11:15:19 +11:00
Zalathar
e9d04c5e24 coverage: Migrate tests/run-coverage into tests/coverage 2023-11-07 11:15:19 +11:00
Zalathar
aea7c27eae coverage: Set up a macro for declaring unified coverage test suites 2023-11-07 11:15:19 +11:00
Zalathar
3509aed632 coverage: Add ./x.py test coverage, an alias for coverage-map and run-coverage 2023-11-07 11:15:19 +11:00
Zalathar
e585a99230 coverage: Give each coverage test mode a separate output directory
When multiple test modes share the same test directory, this will allow them to
avoid interfering with each others' files and timestamps.
2023-11-07 11:15:19 +11:00
Zalathar
211d4cee8e coverage: Copy all remaining run-coverage tests into coverage-map
These multi-file tests were not copied over in #114843 because they weren't
working, but it turns out that they just need the correct crate-type.
2023-11-07 11:15:19 +11:00
Zalathar
7f8a6de72c coverage: Use -Copt-level=2 by default in run-coverage tests
This is a step towards being able to unify the two coverage test directories.

There are two tests that require adjustment:

- `overflow.rs` requires an explicit `-Coverflow-checks=yes`
- `sort_groups.rs` is sensitive to provably unused instantiations
2023-11-07 11:15:18 +11:00
rustbot
bf65e3bddb Update books 2023-11-06 12:00:35 -05:00
Matthew Jasper
2b2c0f9886 Allow tests with rust-rustfix and revisions 2023-11-06 16:23:08 +00:00
bors
f9b644636f Auto merge of #117435 - SparrowLii:nightly_parallel, r=oli-obk,davidtwco
enable parallel rustc front end in nightly builds

Refers to the [MCP](https://github.com/rust-lang/compiler-team/issues/681), this pr does:
1. Enable the parallel front end in nightly builds, and keep the default number of threads as 1. Then users can use the parallel rustc front end via -Z threads=n option.

2. Set it up to serial front end for beta/stable builds via bootstrap.

3. Switch over the alt builders from parallel rustc to serial, so we have artifacts without parallel to test against the artifacts with parallel.

r? `@oli-obk`

cc `@cjgillot` `@nnethercote` `@bjorn3` `@Kobzol`
2023-11-06 07:41:22 +00:00
bors
fcca978aa0 Auto merge of #117607 - klensy:clang-17.0.4, r=Mark-Simulacrum
bump clang version for dist-x86_64-linux from 17.0.2 to 17.0.4

This fixes few miscompiles, so nice to have.

Release notes:
https://discourse.llvm.org/t/llvm-17-0-3-released/74172
https://discourse.llvm.org/t/llvm-17-0-4-released/74548

>The next release will be 17.0.5, in two weeks 14th of November.

Or maybe delay until 17.0.5?
2023-11-06 04:08:15 +00:00
bors
152a4e90d1 Auto merge of #117585 - dnbln:feat/move-kw-span, r=cjgillot
Add the `Span` of the `move` keyword to the HIR.

This is required to implement a lint like the one described here: https://github.com/rust-lang/rust-clippy/issues/11721
2023-11-06 02:07:34 +00:00
SparrowLii
f2a40e99ff use portable AtomicU64 for powerPC and MIPS 2023-11-06 09:58:51 +08:00
bors
c1ccc29cd6 Auto merge of #117191 - Skgland:easy-beta-channels, r=Mark-Simulacrum
generate beta manifests as pre-requisit to rust-lang/rustup#1329

<https://github.com/rust-lang/rustup/issues/1329#issuecomment-1134946736> mentioned (a while ago) this would be the next step
2023-11-05 19:43:04 +00:00
bors
6c7de3181b Auto merge of #117574 - onur-ozkan:fix-compiler-crate-linking, r=Mark-Simulacrum
improve compiler&tool documenting and re-enable cranelift on CI

First commit addresses the linking issue with compiler crates. Second one ensures that compiler crates are linked correctly (with later commits we added this check for tools as well), allowing us to detect these hard-to-catch bugs on CI. Following three commits cherry-picked from #117328 to re-enable the Cranelift backend on CI.

More info: https://github.com/rust-lang/rust/issues/117430

cc `@bjorn3` `@RalfJung`
2023-11-05 15:41:35 +00:00
onur-ozkan
b0df8216ed bootstrap: improve linking of tool docs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-05 17:01:53 +03:00
Matthias Krüger
fb30270cdc
Rollup merge of #117524 - unleashed:bootstrap-create-hooks-dir, r=Mark-Simulacrum
bootstrap/setup: create hooks directory if non-existing

When running `./x setup` on a local repository I chose to install a `pre-push` git hook, but this happened:

```shell
Would you like to install the git hook?: [y/N] y
error: could not create hook .git/hooks/pre-push: do you already have the git hook installed?
No such file or directory (os error 2)
thread 'main' panicked at src/core/build_steps/setup.rs:462:9:
install_git_hook_maybe(&config) failed with No such file or directory (os error 2)
```

This was caused because the `.git/hooks` directory did not exist in my local repository. Creating it manually and re-running the command works fine.

This PR tests for the above directory and if it does not exist then it _tries_ to create it before hard linking the pre-push hook - we use `fs::create_dir()` and disregard the result (ie. it could fail if the directory was created in the meantime) and proceed to call `fs::hard_link()` all the same.
2023-11-05 12:41:47 +01:00
Matthias Krüger
db665980e9
Rollup merge of #116017 - Zalathar:darwin-stdlib, r=albertlarsan68
Don't pass `-stdlib=libc++` when building C files on macOS

When using *Command Line Tools for Xcode* version 15.0, clang will warn about `argument unused during compilation: '-stdlib=libc++'` if this flag is present when compiling C files only (i.e. no C++ files).

To avoid this warning, we can add the flag only to CXXFLAGS and not to CFLAGS.

---

[Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/clang.20warning.3A.20argument.20unused.20during.20compilation.20.28libc.2B.2B.29)
2023-11-05 12:41:46 +01:00
klensy
38ff91c453 bump clang version for dist-x86_64-linux from 17.0.2 to 17.0.4
This fixes few miscompiles, so nice to have.
2023-11-05 14:09:19 +03:00
León Orell Valerian Liehr
1dcdf83927
rustdoc: properly elide cross-crate host effect args 2023-11-05 00:56:54 +01:00
Dinu Blanovschi
c077147200 fix clippy author and failing test 2023-11-04 21:43:18 +01:00
Dinu Blanovschi
df85b28b72 fixes for rustfmt + ast visitor 2023-11-04 20:39:15 +01:00
bors
9c8a2694fa Auto merge of #117579 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2023-11-04 17:21:07 +00:00