214681 Commits

Author SHA1 Message Date
Joshua Nelson
c8c849ef5c Use more consistent progress messages in bootstrap
Before:
```
Testing ["rustc_interface"] stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```

After:
```
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```

Note there is a slight consistency between `build` and `test`: The
former doesn't print "compiler artifacts". It would be annoying to fix
and doesn't hurt anything, so I left it be.

```
; x t rustc_interface --stage 0 --dry-run
Testing {rustc_interface} stage0 (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
; x b rustc_interface --stage 0 --dry-run
Building {rustc_interface} stage0 compiler artifacts (aarch64-unknown-linux-gnu -> aarch64-unknown-linux-gnu)
```
2022-12-30 20:37:48 +00:00
Obei Sideg
a74a48852a Add ui test for #106182 2022-12-30 23:08:15 +03:00
Obei Sideg
cc1dee148d Fix incorrect suggestion for extra & in pattern
see #106182
2022-12-30 23:08:01 +03:00
Michael Goulet
f6b45e399e Suppress errors due to TypeError not coercing with inference variables 2022-12-30 19:53:34 +00:00
Nilstrieb
878af66b53 Add build_helper crate to share code between tidy and bootstrap 2022-12-30 20:41:47 +01:00
Nilstrieb
72afcf2cad Use rustc_safe_intrinsic attribute to check for intrinsic safety
Instead of maintaining a list that is poorly kept in sync we can just
use the attribute.
2022-12-30 20:29:37 +01:00
bors
ce85c98575 Auto merge of #105651 - tgross35:once-cell-inline, r=m-ou-se
Add #[inline] markers to once_cell methods

Added inline markers to all simple methods under the `once_cell` feature. Relates to #74465 and  #105587

This should not block #105587
2022-12-30 19:22:33 +00:00
Michael Howell
dd0f5882d9 rustdoc: use the regular arrow indicator for dir-entry CSS
This mostly reverts 468acca108e65101b802821bded17149dc1d86c9, while still
fixing the problem it fixed by using an internal list-style-position. It
results in a slight change in the hover indicator, but nothing misleading.
2022-12-30 11:58:58 -07:00
Gary Guo
4271ed48e9
Regression test for issue 106247 2022-12-30 10:14:26 -08:00
Michael Howell
ac0bb74adb rustdoc: merge scrape-help CSS 2022-12-30 10:43:06 -07:00
bors
bbdca4c28f Auto merge of #106296 - matthiaskrgr:rollup-ukdbqwx, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #99244 (doc: clearer and more correct Iterator::scan)
 - #103707 (Replace libstd, libcore, liballoc terminology in docs)
 - #104182 (`IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` documentation.)
 - #106273 (rustdoc: remove redundant CSS `.source .content { overflow: visible }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-30 16:10:00 +00:00
Matthias Krüger
3f9909a7c4
Rollup merge of #106273 - notriddle:notriddle/source-content-overflow, r=GuillaumeGomez
rustdoc: remove redundant CSS `.source .content { overflow: visible }`

When added in 7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99 / #16066, the page itself was set to scroll. Now it's set so that the `example-wrap` is scrolling inside the page, so the overflow setting for the content is irrelevant.
2022-12-30 17:01:40 +01:00
Matthias Krüger
bd20fc1fd6
Rollup merge of #104182 - gabhijit:ipv6-in6addr-any-doc-fix, r=m-ou-se
`IN6ADDR_ANY_INIT` and `IN6ADDR_LOOPBACK_INIT` documentation.

Added documentation for IPv6 Addresses `IN6ADDR_ANY_INIT` also known as `in6addr_any` and `IN6ADDR_LOOPBACK_INIT` also known as `in6addr_loopback` similar to `INADDR_ANY` for IPv4 Addresses.
2022-12-30 17:01:39 +01:00
Matthias Krüger
25b1f1c26d
Rollup merge of #103707 - jonathanCogan:master, r=m-ou-se
Replace libstd, libcore, liballoc terminology in docs

Fixes #103551.  I changed line comments containing the outdated terms as well.

It would be great if someone with more experience could weigh in on whether these changes introduce ambiguity as suggested in https://github.com/rust-lang/rust/issues/103551#issuecomment-1291225315.
2022-12-30 17:01:39 +01:00
Matthias Krüger
80e309f798
Rollup merge of #99244 - gthb:doc-improve-iterator-scan, r=m-ou-se
doc: clearer and more correct Iterator::scan

The `Iterator::scan` documentation seemed a little misleading to my newcomer
eyes, and this tries to address that.

* I found “similar to `fold`” unhelpful because (a) the similarity is only that
  they maintain state between iterations, and (b) the _dissimilarity_ is no less
  important: one returns a final value and the other an iterator. So this
  replaces that with “which, like `fold`, holds internal state, but unlike
  `fold`, produces a new iterator.

* I found “the return value from the closure, an `Option`, is yielded by the
  iterator” to be downright incorrect, because “yielded by the iterator” means
  “returned by the `next` method wrapped in `Some`”, so this implied that `scan`
  would convert an input iterator of `T` to an output iterator of `Option<T>`.
  So this replaces “yielded by the iterator” with “returned by the `next`
  method” and elaborates: “Thus the closure can return `Some(value)` to yield
  `value`, or `None` to end the iteration.”

* This also changes the example to illustrate the latter point by returning
  `None` to terminate the iteration early based on `state`.
2022-12-30 17:01:38 +01:00
Nilstrieb
0047e25090 Add some docs to bug, span_bug and delay_span_bug 2022-12-30 16:47:56 +01:00
Nilstrieb
a8f50453d0 Use some more const_eval_select in pointer methods for compile times 2022-12-30 16:39:58 +01:00
Guillaume Gomez
87bc29d02b Extend scraped examples layout GUI test for position of buttons 2022-12-30 16:27:56 +01:00
Nilstrieb
2675848b0a Add codegen test for Box::new(uninit) of big arrays 2022-12-30 16:14:38 +01:00
joboet
898302e685
std: remove unnecessary #[cfg] on NetBSD 2022-12-30 15:50:31 +01:00
joboet
9abda03da6
std: rename Parker::new to Parker::new_in_place, add safe Parker::new constructor for SGX 2022-12-30 15:49:47 +01:00
Laurențiu Nicola
d96c489120 Rephrase clippy policy 2022-12-30 16:10:17 +02:00
Laurențiu Nicola
3aae785693 Avoid useless format 2022-12-30 16:10:07 +02:00
jonathanCogan
78691e3589 Update paths in comments. 2022-12-30 14:00:42 +01:00
jonathanCogan
db47071df2 Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
jonathanCogan
72067c77bd Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
bors
7c991868c6 Auto merge of #105426 - flba-eb:fix_tls_destructor_unwinding, r=m-ou-se
Catch panics/unwinding in destruction of TLS values

`destroy_value` is/can be called from C code (libc). Unwinding from Rust to C code is undefined behavior, which is why unwinding is caught here.

This problem caused an infinite loop inside the unwinding code when running `src/test/ui/threads-sendsync/issue-24313.rs` on a tier 3 target (QNX/Neutrino) on aarch64.

See also https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Infinite.20unwinding.20bug.
2022-12-30 12:58:50 +00:00
Daniel Eades
ba5067a6f0 suppress 'clippy::approx_constant' lint in test case 2022-12-30 11:28:06 +00:00
Nilstrieb
f9cc011269 Tidy up tidy error codes check 2022-12-30 12:17:17 +01:00
Daniel Eades
da7ce6f810 derive 'Hash' 2022-12-30 11:14:15 +00:00
Nilstrieb
ad9806b73c Checkout master branch in CI 2022-12-30 11:23:01 +01:00
Nilstrieb
e15272d8d6 Add tidy check to deny merge commits
This will prevent users with the pre-push hook from pushing a merge
commit.

Exceptions are added for subtree updates. These exceptions are a little
hacky and may be non-exhaustive but can be extended in the future.
2022-12-30 11:23:01 +01:00
bors
f6cc345be4 Auto merge of #106264 - Swatinem:higher-lifetime-regression, r=petrochenkov
Add regression test for #105501

The test was minified from the published crate `msf-ice:0.2.1` which failed in a crater run.

A faulty compiler was triggering a `higher-ranked lifetime error`:
> could not prove `[async block@...]: Send`

The testcase has some complexity, as it has a simplified subset of `futures::StreamExt` in it, but the error is only being triggered by a few layers of nesting. For example removing the noop `then` call would have been enough to make the error go away.
2022-12-30 09:47:19 +00:00
Arpad Borsos
42e7df998c
Add regression test for #105501
The test was minified from the published `msf-ice:0.2.1` crate which failed in a crater run.

A faulty compiler was triggering a `higher-ranked lifetime error`:

> could not prove `[async block@...]: Send`
2022-12-30 08:52:35 +01:00
bors
e5e5fcb0b7 Auto merge of #106268 - kraktus:patch-2, r=Nilstrieb
fix comment for `TokenCursor::desugar`

the hashes of the text were forgotten.
2022-12-30 06:59:13 +00:00
bors
808be91da0 Auto merge of #106262 - GuillaumeGomez:migrate-more-scraped-examples-css, r=notriddle
Migrate more scraped examples CSS rules to CSS variables

It's based on https://github.com/rust-lang/rust/pull/106218 so it will need to wait for it to be merged first.

r? `@notriddle`
2022-12-30 03:58:49 +00:00
Ezra Shaw
2c4ecffb77
docs: add link to Path::join in PathBuf::push 2022-12-30 14:24:12 +13:00
bors
973a4db8d5 Auto merge of #106210 - fee1-dead-contrib:const-closure-trait-method, r=compiler-errors
Allow trait method paths to satisfy const Fn bounds

r? `@oli-obk`
2022-12-30 01:09:31 +00:00
bors
2c7536eaae Auto merge of #105920 - MarcusCalhoun-Lopez:respect_set, r=jyn514
Respect --set=target.platform when building rustbuild itself

`--set=target.platform.cc` and `--set=target.platform.cxx` are ignored if target is quoted.

`--set=target.platform.linker` is ignored if RUSTFLAGS is not set.

Undo parts of
d1291dc8b4 and
1532fd8cd0
2022-12-29 22:21:16 +00:00
Joshua Nelson
cbede85538 Support x clean --stage 1 rustc_query_impl
Previously, clean only supported `--stage 0` for specific crates.

The new `crate_description` function generates a string that looks
like
```
: {rustc_query_impl}
```
2022-12-29 21:58:14 +00:00
Michael Howell
44fb7e2ea3 rustdoc: remove redundant CSS .source .content { overflow: visible }
When added in 7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99 / #16066, the page
itself was set to scroll. Now it's set so that the `example-wrap` is
scrolling inside the page, so the overflow setting for the content is
irrelevant.
2022-12-29 14:16:33 -07:00
bors
ad8ae0504c Auto merge of #106266 - matthiaskrgr:rollup-cxrdbzy, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #104531 (Provide a better error and a suggestion for `Fn` traits with lifetime params)
 - #105899 (`./x doc library --open` opens `std`)
 - #106190 (Account for multiple multiline spans with empty padding)
 - #106202 (Trim more paths in obligation types)
 - #106234 (rustdoc: simplify settings, help, and copy button CSS by not reusing)
 - #106236 (docs/test: add docs and a UI test for `E0514` and `E0519`)
 - #106259 (Update Clippy)
 - #106260 (Fix index out of bounds issues in rustdoc)
 - #106263 (Formatter should not try to format non-Rust files)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-29 19:40:06 +00:00
Marcus Calhoun-Lopez
480297d216 Respect --set=target.platform during build
Avoid quoting targets that do not contain a period.
See 1532fd8cd0

`--set=target.platform.linker` is ignored if RUSTFLAGS is not set.
Undo parts of d1291dc8b4
2022-12-29 12:22:49 -07:00
kraktus
d08134f1d2
fix comment for TokenCursor::desugar
the hashes of the text were forgotten.
2022-12-29 19:45:31 +01:00
Matthew Maurer
fb2c27d73f CFI: Monomorphize transparent ADTs before typeid
Monomorphise `#[repr(transparent)]` parameterized ADTs before turning
them into an Itanium mangled String.

`#[repr(transparent)]` ADTs currently use the single field to represent
them in their CFI type ID to ensure that they are compatible. However,
if that type involves a type parameter instantiated at the ADT level, as
in `ManuallyDrop`, this will currently ICE as the `Parameter` type
cannot be mangled. Since this happens at lowering time, it should always
be concrete after substitution.

Fixes #106230
2022-12-29 10:21:07 -08:00
clubby789
771a2eb485 Add codegen test for issue 103840 2022-12-29 17:33:04 +00:00
Matthias Krüger
65fb70304a
Rollup merge of #106263 - chenyukang:yukang/fix-106261-formater, r=jyn514
Formatter should not try to format non-Rust files

Fixes #106261
2022-12-29 18:24:34 +01:00
Matthias Krüger
caa33bfc75
Rollup merge of #106260 - chenyukang:yukang/fix-106213-doc, r=GuillaumeGomez
Fix index out of bounds issues in rustdoc

Fixes #106213
r? `@matthiaskrgr`
2022-12-29 18:24:33 +01:00
Matthias Krüger
b75b0a8f94
Rollup merge of #106259 - flip1995:clippyup, r=matthiaskrgr
Update Clippy

r? `@Manishearth`

I think this was the very first sync with no conflicts whatsoever. I love this time of the year :D
2022-12-29 18:24:32 +01:00
Matthias Krüger
51534b897e
Rollup merge of #106236 - Ezrashaw:add-test+docs-e0519-e0514, r=GuillaumeGomez
docs/test: add docs and a UI test for `E0514` and `E0519`

No UI test on `E0514`, it would need to compile with a different `rustc` version.

r? `@GuillaumeGomez`
2022-12-29 18:24:32 +01:00