Commit Graph

238375 Commits

Author SHA1 Message Date
bors
28acba3c61 Auto merge of #115460 - zachs18:borrowedcursor_write_no_panic, r=dtolnay
Don't panic in `<BorrowedCursor as io::Write>::write`

Instead of panicking if the BorrowedCursor does not have enough capacity for the whole buffer, just return a short write, [like `<&mut [u8] as io::Write>::write` does](https://doc.rust-lang.org/src/std/io/impls.rs.html#349).

(cc `@ChayimFriedman2` https://github.com/rust-lang/rust/issues/78485#issuecomment-1493129588)

(I'm not sure if this needs an ACP? since it's not changing the "API", just what the function does)
2023-11-08 14:08:48 +00:00
Jake Goulding
6909992501 Run tests in CI for aarch64-apple-darwin 2023-11-08 08:54:42 -05:00
Jake Goulding
64090536d4 Install tidy for aarch64-apple-darwin
The GitHub Actions image has this preinstalled for x86_64 but not M1.
2023-11-08 08:54:42 -05:00
Jake Goulding
469d34b39b Mark Rustdoc test as Linux-only
Due to incorrect CI configuration, this test was not being run on
macOS. aarch64-apple-darwin will start running it, so we correct the
configuration.
2023-11-08 08:53:58 -05:00
bors
755629fe59 Auto merge of #117706 - matthiaskrgr:rollup-lscx7dg, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #114316 (Add AIX platform support document)
 - #117531 (rustdoc: properly elide cross-crate host effect args)
 - #117650 (Add -Zcross-crate-inline-threshold=yes)
 - #117663 (bump some deps)
 - #117667 (Document clippy_config in nightly-rustc docs)
 - #117698 (Clarify `space_between`)
 - #117700 (coverage: Rename the `run-coverage` test mode to `coverage-run`)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-08 12:06:04 +00:00
lcnr
bf360d407e instrument constituent types computation 2023-11-08 12:24:42 +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
55306535dd
Rollup merge of #117698 - nnethercote:space_between-2, r=petrochenkov
Clarify `space_between`

r? ``@petrochenkov``
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
8198864377
Rollup merge of #117650 - saethlin:inline-me-please, r=davidtwco
Add -Zcross-crate-inline-threshold=yes

``@thomcc`` says this would be useful for

>  seeing if it makes a difference in some code if i do it when building the sysroot, since -Zbuild-std + lto helps more than it seems like it should

And I've changed the possible values as a reference to ``@Manishearth`` saying

> LLVM's inlining heuristic is "yes".
2023-11-08 11:25:54 +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
Tshepang Mbambo
03435e6fdd
accept review suggestion
Co-authored-by: joboet <jonasboettiger@icloud.com>
2023-11-08 12:19:32 +02:00
bors
fab1054e17 Auto merge of #117542 - compiler-errors:only-normalize-predicate, r=lcnr
Only use `normalize_param_env` when normalizing predicate in `check_item_bounds`

Only use the `normalize_param_env` when normalizing the item bound predicate in `check_item_bounds`, instead of using it when processing this obligation as well. This causes <BUG> to reoccur, but hopefully with better caching in the future, we can fix this would having such bad effects on perf.

This PR also fixes #117598. It turns out that the GAT predicate that we install is actually wrong -- given code like:

```
impl<'r> HasValueRef<'r> for Any {
    type Database = Any;
}
```

We currently generate a predicate that looks like `<Any as HasValueRef<'r>>::Database = Any`, where `'r` is an early-bound variable. Really this GAT assumption should be universally quantified over the impl's args, i.e. `for<'r> <Any as HasValueRef<'r>>::Database = Any`, but then we'd need the binder to also include all the WC of the impl as well, which we don't support yet, lol.
2023-11-08 10:08:44 +00:00
Tshepang Mbambo
769ad29c3e
triagebot.toml: use inclusive language 2023-11-08 11:21:44 +02: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
David Wood
ef7ebaa788
rustc_target: move file for uniformity
Signed-off-by: David Wood <david@davidtw.co>
2023-11-08 14:37:54 +08:00
David Wood
1af256fe8a
targets: move target specs to spec/targets
Signed-off-by: David Wood <david@davidtw.co>
2023-11-08 14:25:45 +08:00
David Wood
76aa83e3e1
target: move base specs to spec/base
Signed-off-by: David Wood <david@davidtw.co>
2023-11-08 14:15:26 +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
Nicholas Nethercote
438b9a6e82 More tests for token stream pretty-printing with adjacent punctuation.
We currently do the wrong thing on a lot of these. The next commit will
fix things.
2023-11-08 14:39:59 +11:00
Nicholas Nethercote
783d4b8b26 Clarify space_between.
To avoid `!matches!(...)`, which is hard to think about. Instead every
case now uses direct pattern matching and returns true or false.

Also add a couple of cases to the `stringify.rs` test that currently
print badly.
2023-11-08 14:39:59 +11: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
scottmcm
545175ce87
Fix addition formatting 2023-11-07 18:39:09 -08:00
Michael Goulet
97c9d8f405 Only use normalize_param_env when normalizing predicate in check_item_bounds 2023-11-08 02:35:25 +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
f72e974e3f
Rollup merge of #117655 - compiler-errors:method-tweaks, r=estebank
Method suggestion code tweaks

I was rummaging around the method suggestion code after https://github.com/rust-lang/rust/pull/117006#discussion_r1384153722 and saw a few things to simplify.

This is two unrelated commits, both in the same file. Review them separately, if you'd like.

r? estebank
2023-11-08 00:47:52 +01: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
Matthias Krüger
3c6307240c
Rollup merge of #116399 - WaffleLapkin:erase_small_things, r=cjgillot
Small changes w/ `query::Erase<_>`

r? `@cjgillot`
cc `@Zoxc`
2023-11-08 00:47:51 +01:00
Matthias Krüger
b724d9c90e
Rollup merge of #113925 - clubby789:const-ctor-repeat, r=estebank
Improve diagnostic for const ctors in array repeat expressions

Fixes #113912
2023-11-08 00:47:50 +01:00
Ben Kimock
fcdd99edca Add -Zcross-crate-inline-threshold=yes 2023-11-07 18:45:11 -05: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
Nicholas Nethercote
1b3733e5a4 rustc: minor changes suggested by clippy perf lints. 2023-11-08 08:57:57 +11:00
Maybe Waffle
102384523a Document how rust atomics work wrt mixed-sized and non-atomic accesses 2023-11-07 21:38:13 +00:00
Maybe Waffle
eca9a1533f Add an explanation for transmute_unchecked 2023-11-07 20:31:55 +00:00
bors
7adc89b69b Auto merge of #117680 - matthiaskrgr:rollup-kgaa4ma, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #115485 (Format macro const literals with pretty printer)
 - #117616 (warn when using an unstable feature with -Ctarget-feature)
 - #117639 (Update books)
 - #117675 (llvm-wrapper: Remove include of non-existant Vectorize.h)

r? `@ghost`
`@rustbot` modify labels: rollup
2023-11-07 20:08:06 +00:00
bjorn3
82487a9447
Merge pull request #1417 from rust-lang/implement_xgetbv
Implement a lot of SIMD intrinsics
2023-11-07 19:49:50 +01:00
Matthias Krüger
518fe492f1
Rollup merge of #117675 - zmodem:vectorize_h, r=durin42
llvm-wrapper: Remove include of non-existant Vectorize.h

LLVM recently removed the header: 2400c54c37

It only contained a declaration of `createLoadStoreVectorizerPass()`, which Rust doesn't reference.
2023-11-07 19:29:57 +01: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
Matthias Krüger
f8c67704f2
Rollup merge of #117616 - RalfJung:unstable-target-features, r=compiler-errors
warn when using an unstable feature with -Ctarget-feature

Setting or unsetting the wrong target features can cause ABI incompatibility (https://github.com/rust-lang/rust/issues/116344, https://github.com/rust-lang/rust/issues/116558). We need to carefully audit features for their ABI impact before stabilization. I just learned that we currently accept arbitrary unstable features on stable and if they are in the list of Rust target features, even unstable, then we don't even warn about that!1 That doesn't seem great, so I propose we introduce a warning here.

This has an obvious loophole via `-Ctarget-cpu`. I'm not sure how to best deal with that, but it seems better to fix what we can and think about the other cases later, maybe once we have a better idea for how to resolve the general mess that are ABI-affecting target features.
2023-11-07 19:29:56 +01:00
Matthias Krüger
cd5b5e08fe
Rollup merge of #115485 - DaniPopes:rustdoc-macro-consts, r=jackh726,fmease
Format macro const literals with pretty printer

Fixes #115295
2023-11-07 19:29:56 +01:00