]> git.lizzy.rs Git - rust.git/log
rust.git
17 months agoclippy
Ralf Jung [Tue, 3 Jan 2023 13:49:53 +0000 (14:49 +0100)]
clippy

17 months agoMerge from rustc
Ralf Jung [Tue, 3 Jan 2023 11:22:11 +0000 (12:22 +0100)]
Merge from rustc

17 months agoPreparing for merge from rustc
Ralf Jung [Tue, 3 Jan 2023 11:21:37 +0000 (12:21 +0100)]
Preparing for merge from rustc

17 months agoUpdate LLVM submodule
Nikita Popov [Tue, 3 Jan 2023 11:08:02 +0000 (12:08 +0100)]
Update LLVM submodule

17 months agoAuto merge of #105609 - bjorn3:shrink_rustc_dev, r=jyn514
bors [Tue, 3 Jan 2023 08:05:54 +0000 (08:05 +0000)]
Auto merge of #105609 - bjorn3:shrink_rustc_dev, r=jyn514

Only include metadata for non-dynamic libraries in rustc-dev

The actual object code should be linked from librustc_driver.so, which is still included in rustc-dev. This saves on download time and disk usage.

Fixes https://github.com/rust-lang/rust/issues/103538

17 months agoAuto merge of #106371 - RalfJung:no-ret-position-noalias, r=nikic
bors [Tue, 3 Jan 2023 04:54:03 +0000 (04:54 +0000)]
Auto merge of #106371 - RalfJung:no-ret-position-noalias, r=nikic

do not add noalias in return position

`noalias` as a return attribute in LLVM indicates that the returned pointer does not alias anything else that is reachable from the caller, *including things reachable before this function call*. This is clearly not the case with a function like `fn id(Box<T>) -> Box<T>`, so we cannot use this attribute.

Fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/385 (including an actual miscompilation that `@comex` managed to produce).

17 months agoAuto merge of #106386 - compiler-errors:rollup-dxjv18b, r=compiler-errors
bors [Tue, 3 Jan 2023 01:45:33 +0000 (01:45 +0000)]
Auto merge of #106386 - compiler-errors:rollup-dxjv18b, r=compiler-errors

Rollup of 8 pull requests

Successful merges:

 - #95985 (Add PhantomData marker to Context to make Context !Send and !Sync)
 - #104298 (Add notes and examples about non-intuitive `PathBuf::set_extension` behavior)
 - #105558 (Reduce HIR debug output)
 - #106315 (Cleanup `mingw-tidy` docker job)
 - #106354 (Rustdoc-Json: Report discriminant on all kinds of enum variant.)
 - #106366 (Fix rustdoc ICE on bad typedef with mismatching types)
 - #106376 (Update books)
 - #106383 (Document some of the AST nodes)

Failed merges:

 - #106356 (clean: Remove `ctor_kind` from `VariantStruct`.)

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoRollup merge of #106383 - Manishearth:ast-docs, r=compiler-errors
Michael Goulet [Mon, 2 Jan 2023 23:39:19 +0000 (15:39 -0800)]
Rollup merge of #106383 - Manishearth:ast-docs, r=compiler-errors

Document some of the AST nodes

Someone was confused about some of this on Zulip, added some docs

We probably should make sure every last field/variant in the AST/HIR is documented at some point

`@bors` rollup

17 months agoRollup merge of #106376 - rustbot:docs-update, r=ehuss
Michael Goulet [Mon, 2 Jan 2023 23:39:19 +0000 (15:39 -0800)]
Rollup merge of #106376 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/book

3 commits in a60f4316ec923a5ac2ed6a2eba6960edb832d855..2bd5d42c9956369132228da6409f0e68da56c51a
2022-12-22 21:37:10 UTC to 2022-12-22 21:36:14 UTC

- fix macos installation problem (rust-lang/book#3469)
- Update -guessing-game-tutorial incorrect output (rust-lang/book#3462)
- FIX: IT repo updated (rust-lang/book#3454)

## rust-lang/nomicon

1 commits in dd37e21ccee43918ed18a71581bb2af537ffe4fc..8ca261268068d80c0969260fff15199bad87b587
2022-12-30 16:32:09 UTC to 2022-12-30 16:32:09 UTC

- Discourage the use of transmute to construct invalid values (rust-lang/nomicon#388)

## rust-lang/rust-by-example

6 commits in 995df09b65c582eb6290ab7ea5d9485983eb4c37..8888f9428fe9a48f31de6bd2cef9b9bf80791edc
2023-01-01 12:53:50 UTC to 2022-12-21 10:18:31 UTC

- types/alias: use io::{Result,Error} instead of Io{Result,Error} (rust-lang/rust-by-example#1660)
- Fix sample code mismatching its comments (rust-lang/rust-by-example#1659)
- fix: add missing space (rust-lang/rust-by-example#1658)
- diverging: fix issues with example code (rust-lang/rust-by-example#1631)
- Update enum.md (rust-lang/rust-by-example#1645)
- Clean up Chapter 2 (Primitives) (rust-lang/rust-by-example#1651)

## rust-lang/rustc-dev-guide

5 commits in 8b42eb5f57d3d8ed2257a22d0e850d9db52afed3..b3e2a6e6c8a3aae5b5d950c63046f23bae07096d
2023-01-01 05:20:47 UTC to 2022-12-25 12:11:21 UTC

- Add help for when you update a submodule by accident (rust-lang/rustc-dev-guide#1537)
- Simplify "how to build and run" section (rust-lang/rustc-dev-guide#1528)
- Replace `$TARGET` with `host` (rust-lang/rustc-dev-guide#1514)
- Add more rebasing help (rust-lang/rustc-dev-guide#1536)
- Fix rustc_borrowck crate name typo (rust-lang/rustc-dev-guide#1535)

17 months agoRollup merge of #106366 - GuillaumeGomez:fix-rustdoc-ice-typedef-type-mismatch, r...
Michael Goulet [Mon, 2 Jan 2023 23:39:19 +0000 (15:39 -0800)]
Rollup merge of #106366 - GuillaumeGomez:fix-rustdoc-ice-typedef-type-mismatch, r=notriddle

Fix rustdoc ICE on bad typedef with mismatching types

Fixes https://github.com/rust-lang/rust/issues/106226.
Fixes #105742.
Fixes #105737.
Fixes #105334.
Fixes #96287.

In this case, it's ok to replace the panic with `rustc_error::raise` because the compiler provided us with a `Error`.

r? `@notriddle`

17 months agoRollup merge of #106354 - aDotInTheVoid:rdj-always-discr, r=GuillaumeGomez
Michael Goulet [Mon, 2 Jan 2023 23:39:18 +0000 (15:39 -0800)]
Rollup merge of #106354 - aDotInTheVoid:rdj-always-discr, r=GuillaumeGomez

Rustdoc-Json: Report discriminant on all kinds of enum variant.

Closes https://github.com/rust-lang/rust/issues/106299

Probably easier to review one commit at a time.

r? `@GuillaumeGomez`

17 months agoRollup merge of #106315 - jyn514:cleanup-mingw-tidy, r=fee1-dead
Michael Goulet [Mon, 2 Jan 2023 23:39:17 +0000 (15:39 -0800)]
Rollup merge of #106315 - jyn514:cleanup-mingw-tidy, r=fee1-dead

Cleanup `mingw-tidy` docker job

Fixes a couple small regressions from https://github.com/rust-lang/rust/pull/106048 and https://github.com/rust-lang/rust/pull/105714.

- Avoid `/checkout/src/ci/run.sh: line 187: [: =: unary operator expected`: https://github.com/rust-lang/rust/actions/runs/3809902408/jobs/6481611301#step:26:1701
- Avoid running `x check` in the tidy test, to get faster feedback. It's already run on the normal `mingw-check` job.

r? `@fee1-dead`

17 months agoRollup merge of #105558 - Nilstrieb:less-spam-hir-tree, r=cjgillot
Michael Goulet [Mon, 2 Jan 2023 23:39:17 +0000 (15:39 -0800)]
Rollup merge of #105558 - Nilstrieb:less-spam-hir-tree, r=cjgillot

Reduce HIR debug output

HIR debug output is currently very verbose, especially when used with the alternate (`#`) flag. This commit reduces the amount of noisy newlines by forcing a few small key types to stay on one line, which makes the output easier to read and scroll by.

```
$ rustc +after hello_world.rs -Zunpretty=hir-tree | wc -l
582
$ rustc +before hello_world.rs -Zunpretty=hir-tree | wc -l
932
```

17 months agoRollup merge of #104298 - tbu-:pr_set_extension_caveats, r=m-ou-se
Michael Goulet [Mon, 2 Jan 2023 23:39:16 +0000 (15:39 -0800)]
Rollup merge of #104298 - tbu-:pr_set_extension_caveats, r=m-ou-se

Add notes and examples about non-intuitive `PathBuf::set_extension` behavior

Basically, passing the empty string will actually remove the extension instead of setting it to the empty string. This might change what is considered to be an extension. Additionally, passing an extension that contains dots will make the path only consider the last part of it to be the new extension.

17 months agoRollup merge of #95985 - jihiggins:issue-66481, r=dtolnay
Michael Goulet [Mon, 2 Jan 2023 23:39:16 +0000 (15:39 -0800)]
Rollup merge of #95985 - jihiggins:issue-66481, r=dtolnay

Add PhantomData marker to Context to make Context !Send and !Sync

Adds `PhantomData<*mut ()>` to `Context` in order to allow for future `!Send` or `!Sync` additions to `Context`'s fields. This would allow for things like future single threaded async executor optimizations, or (re)adding `LocalWaker`, etc.

Closes #66481.

Per https://github.com/rust-lang/rust/issues/66481#issuecomment-561289725, this is a breaking change that needs a Crater run as the next step.

(So far have tested the change locally with `cargotest` on WSL)

17 months agoAuto merge of #106364 - JakobDegen:top-down-inlining, r=cjgillot
bors [Mon, 2 Jan 2023 22:52:58 +0000 (22:52 +0000)]
Auto merge of #106364 - JakobDegen:top-down-inlining, r=cjgillot

Reenable limited top-down MIR inlining

Reverts most of #105119 and uses an alternative strategy to prevent exponential blowup. Specifically, we allow doing top-down inlining up to depth at most five, and for at most one call site per nested body.

r? `@cjgillot`

17 months agoDocument rustc_ast::FnHeader fields
Manish Goregaokar [Mon, 2 Jan 2023 22:26:43 +0000 (14:26 -0800)]
Document rustc_ast::FnHeader fields

17 months agoDocument rustc_ast::Extern variants
Manish Goregaokar [Mon, 2 Jan 2023 22:25:24 +0000 (14:25 -0800)]
Document rustc_ast::Extern variants

17 months agoAuto merge of #106307 - Nilstrieb:dynamic->static, r=cjgillot
bors [Mon, 2 Jan 2023 20:12:16 +0000 (20:12 +0000)]
Auto merge of #106307 - Nilstrieb:dynamic->static, r=cjgillot

Abolish `QueryVTable` in favour of more assoc items on `QueryConfig`

This may introduce additional mono _but_ may help const fold things better and especially may help not constructing a `QueryVTable` anymore which is cheap but not free.

17 months agoAbolish `QueryVTable` in favour of more assoc items on `QueryConfig`
Nilstrieb [Fri, 30 Dec 2022 22:25:19 +0000 (23:25 +0100)]
Abolish `QueryVTable` in favour of more assoc items on `QueryConfig`

This may introduce additional mono _but_ may help const fold things
better and especially may help not constructing a `QueryVTable` anymore
which is cheap but not free.

17 months agoReduce HIR debug output
Nilstrieb [Sun, 11 Dec 2022 11:10:55 +0000 (12:10 +0100)]
Reduce HIR debug output

HIR debug output is currently very verbose, especially when used with
the alternate (`#`) flag. This commit reduces the amount of noisy
newlines by forcing a few small key types to stay on one line, which
makes the output easier to read and scroll by.

```
$ rustc +after hello_world.rs -Zunpretty=hir-tree | wc -l
582
$ rustc +before hello_world.rs -Zunpretty=hir-tree | wc -l
932
```

17 months agoRemove test of static Context
David Tolnay [Mon, 2 Jan 2023 18:31:50 +0000 (10:31 -0800)]
Remove test of static Context

Context is no longer Sync so this doesn't work.

    error[E0277]: `*mut ()` cannot be shared between threads safely
      --> library/core/tests/task.rs:24:21
       |
    24 |     static CONTEXT: Context<'static> = Context::from_waker(&WAKER);
       |                     ^^^^^^^^^^^^^^^^ `*mut ()` cannot be shared between threads safely
       |
       = help: within `Context<'static>`, the trait `Sync` is not implemented for `*mut ()`
       = note: required because it appears within the type `PhantomData<*mut ()>`
       = note: required because it appears within the type `Context<'static>`
       = note: shared static variables must have a type that implements `Sync`

17 months agoAdd PhantomData marker to Context to make Context !Send and !Sync
James Higgins [Tue, 12 Apr 2022 16:54:36 +0000 (13:54 -0300)]
Add PhantomData marker to Context to make Context !Send and !Sync

17 months agoAuto merge of #106272 - clubby789:codegen-test-103840, r=nikic
bors [Mon, 2 Jan 2023 17:18:58 +0000 (17:18 +0000)]
Auto merge of #106272 - clubby789:codegen-test-103840, r=nikic

Add codegen test for issue 103840

Closes #103840

17 months agoUpdate books
rustbot [Mon, 2 Jan 2023 17:00:31 +0000 (12:00 -0500)]
Update books

17 months agoAuto merge of #2746 - RalfJung:retag-diagnostic, r=RalfJung
bors [Mon, 2 Jan 2023 15:06:40 +0000 (15:06 +0000)]
Auto merge of #2746 - RalfJung:retag-diagnostic, r=RalfJung

tweaks to retag diagnostic handling

Salvaged from https://github.com/rust-lang/rust/pull/106212

17 months agotweaks to retag diagnostic handling
Ralf Jung [Mon, 2 Jan 2023 15:05:49 +0000 (16:05 +0100)]
tweaks to retag diagnostic handling

17 months agodo not add noalias in return position
Ralf Jung [Mon, 2 Jan 2023 14:11:19 +0000 (15:11 +0100)]
do not add noalias in return position

17 months agoAdd regression test for #96287
Guillaume Gomez [Mon, 2 Jan 2023 13:29:56 +0000 (14:29 +0100)]
Add regression test for #96287

17 months agoAdd regression test for #105742
Guillaume Gomez [Mon, 2 Jan 2023 13:29:38 +0000 (14:29 +0100)]
Add regression test for #105742

17 months agoAdd regression test for #105737
Guillaume Gomez [Mon, 2 Jan 2023 13:29:22 +0000 (14:29 +0100)]
Add regression test for #105737

17 months agoAdd regression test for #105334
Guillaume Gomez [Mon, 2 Jan 2023 13:29:02 +0000 (14:29 +0100)]
Add regression test for #105334

17 months agoAdd regression test for #106226
Guillaume Gomez [Mon, 2 Jan 2023 10:47:56 +0000 (11:47 +0100)]
Add regression test for #106226

17 months agoAuto merge of #84762 - cjgillot:resolve-span-opt, r=petrochenkov
bors [Mon, 2 Jan 2023 13:10:16 +0000 (13:10 +0000)]
Auto merge of #84762 - cjgillot:resolve-span-opt, r=petrochenkov

Encode spans relative to the enclosing item -- enable on nightly

Follow-up to #84373 with the flag `-Zincremental-relative-spans` set by default.

This PR seeks to remove one of the main shortcomings of incremental: the handling of spans.
Changing the contents of a function may require redoing part of the compilation process for another function in another file because of span information is changed.
Within one file: all the spans in HIR change, so typechecking had to be re-done.
Between files: spans of associated types/consts/functions change, so type-based resolution needs to be re-done (hygiene information is stored in the span).

The flag `-Zincremental-relative-spans` encodes local spans relative to the span of an item, stored inside the `source_span` query.

Trap: stashed diagnostics are referenced by the "raw" span, so stealing them requires to remove the span's parent.

In order to avoid too much traffic in the span interner, span encoding uses the `ctxt_or_tag` field to encode:
- the parent when the `SyntaxContext` is 0;
- the `SyntaxContext` when the parent is `None`.
Even with this, the PR creates a lot of traffic to the Span interner, when a Span has both a LocalDefId parent and a non-root SyntaxContext. They appear in lowering, when we add a parent to all spans, including those which come from macros, and during inlining when we mark inlined spans.

The last commit changes how queries of `LocalDefId` manage their cache. I can put this in a separate PR if required.

Possible future directions:
- validate that all spans are marked in HIR validation;
- mark macro-expanded spans relative to the def-site and not the use-site.

17 months agoFix rustdoc ICE on bad typedef with mismatching types
Guillaume Gomez [Mon, 2 Jan 2023 10:47:36 +0000 (11:47 +0100)]
Fix rustdoc ICE on bad typedef with mismatching types

17 months agoAuto merge of #106301 - notriddle:notriddle/dir-entry, r=GuillaumeGomez
bors [Mon, 2 Jan 2023 10:21:53 +0000 (10:21 +0000)]
Auto merge of #106301 - notriddle:notriddle/dir-entry, r=GuillaumeGomez

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.

Preview: http://notriddle.com/notriddle-rustdoc-demos/dir-entry/src/std/lib.rs.html

## Before

![image](https://user-images.githubusercontent.com/1593513/210104247-642e6df0-07d3-452a-a2ab-4c700bc22e0e.png)

## After

![image](https://user-images.githubusercontent.com/1593513/210104271-a3832784-1e4d-4516-983e-6ecb9051857b.png)

17 months agoAuto merge of #106284 - estebank:merge-mut-errors, r=jyn514
bors [Mon, 2 Jan 2023 07:30:23 +0000 (07:30 +0000)]
Auto merge of #106284 - estebank:merge-mut-errors, r=jyn514

Merge multiple mutable borrows of immutable binding errors

Fix #53466.

17 months agoReenable limited top-down MIR inlining
Jakob Degen [Mon, 2 Jan 2023 06:01:29 +0000 (22:01 -0800)]
Reenable limited top-down MIR inlining

17 months agoVerbose suggestions
Esteban Küber [Sun, 1 Jan 2023 08:06:31 +0000 (00:06 -0800)]
Verbose suggestions

17 months agoAuto merge of #106358 - TroyNeubauer:improve-foreign-orphan-error, r=estebank
bors [Mon, 2 Jan 2023 04:32:39 +0000 (04:32 +0000)]
Auto merge of #106358 - TroyNeubauer:improve-foreign-orphan-error, r=estebank

Implement fix for #67535

Implements a fix for #67535
r? `@estebank`

17 months agorustdoc: add test case for dir entry summary position
Michael Howell [Sat, 31 Dec 2022 18:23:30 +0000 (11:23 -0700)]
rustdoc: add test case for dir entry summary position

17 months agoImplement fix for #67535
Troy Neubauer [Mon, 2 Jan 2023 02:08:02 +0000 (18:08 -0800)]
Implement fix for #67535

17 months agoAuto merge of #106352 - kornelski:read_line-doc, r=scottmcm
bors [Mon, 2 Jan 2023 01:15:25 +0000 (01:15 +0000)]
Auto merge of #106352 - kornelski:read_line-doc, r=scottmcm

Document read_line gotchas

1. The "You do not need to clear the buffer before appending" advice is ambiguous, because it depends what you use this function for. For a rather common case of reading individual lines in a loop, it _is_ necessary to clear the buffer.

2. The docs warn about a DoS risk. I've added a hint how to mitigate unbounded memory growth.

17 months agoCleanup `mingw-tidy` docker job
Joshua Nelson [Sat, 31 Dec 2022 01:02:10 +0000 (01:02 +0000)]
Cleanup `mingw-tidy` docker job

- Avoid `/checkout/src/ci/run.sh: line 187: [: =: unary operator expected`: https://github.com/rust-lang/rust/actions/runs/3809902408/jobs/6481611301#step:26:1701
- Avoid running `x check` in the tidy test, to get faster feedback. It's
  already run on the normal `mingw-check` job.

17 months agoAuto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726
bors [Sun, 1 Jan 2023 21:41:35 +0000 (21:41 +0000)]
Auto merge of #106349 - LeSeulArtichaut:dyn-star-tracking-issue, r=jackh726

Use the correct tracking issue for `dyn_star`

`#![feature(dyn_star)]` now has its own tracking issue, #102425.

17 months agoRustdoc-Json: Report discriminant on all kinds of enum variant.
Nixon Enraght-Moony [Sun, 1 Jan 2023 18:53:50 +0000 (18:53 +0000)]
Rustdoc-Json: Report discriminant on all kinds of enum variant.

Closes #106299

17 months agoUse the correct tracking issue for `dyn_star`
Léo Lanteri Thauvin [Sun, 1 Jan 2023 11:25:21 +0000 (12:25 +0100)]
Use the correct tracking issue for `dyn_star`

17 months agoAuto merge of #106350 - GuillaumeGomez:gui-test-explanation-2, r=notriddle
bors [Sun, 1 Jan 2023 18:35:04 +0000 (18:35 +0000)]
Auto merge of #106350 - GuillaumeGomez:gui-test-explanation-2, r=notriddle

Add comment explaining what docblock-table GUI test is about

r? `@notriddle`

17 months agoclean: Always store enum disriminant.
Nixon Enraght-Moony [Sun, 1 Jan 2023 18:11:53 +0000 (18:11 +0000)]
clean: Always store enum disriminant.

17 months agoMerge multiple mutable borrows of immutable binding errors
Esteban Küber [Fri, 30 Dec 2022 06:46:17 +0000 (22:46 -0800)]
Merge multiple mutable borrows of immutable binding errors

Fix #53466.

17 months agoDocument a way to limit read_line length
Kornel [Sun, 1 Jan 2023 18:04:26 +0000 (18:04 +0000)]
Document a way to limit read_line length

17 months agoDocument read_line gotcha
Kornel [Sun, 1 Jan 2023 17:49:05 +0000 (17:49 +0000)]
Document read_line gotcha

17 months agoAdd comment explaining what docblock-table GUI test is about
Guillaume Gomez [Sun, 1 Jan 2023 16:21:19 +0000 (17:21 +0100)]
Add comment explaining what docblock-table GUI test is about

17 months agoAuto merge of #106312 - tgross35:update-book-target, r=JohnTitor
bors [Sun, 1 Jan 2023 05:20:48 +0000 (05:20 +0000)]
Auto merge of #106312 - tgross35:update-book-target, r=JohnTitor

Added link from Targets to Platform Support in the book

If you search the web for "rust targets", the first result is the [targets page](https://doc.rust-lang.org/nightly/rustc/targets/index.html). However, usually when searching for this I'm interested in seeing the available triples with host information, so I just added a link to the correct page.

The entire `Targets` chapter could probably be combined into one page, since its three subchapters each only have a tiny section (I'll do this if requested)

17 months agoAuto merge of #106336 - matthiaskrgr:rollup-4p6bgwf, r=matthiaskrgr
bors [Sat, 31 Dec 2022 23:22:06 +0000 (23:22 +0000)]
Auto merge of #106336 - matthiaskrgr:rollup-4p6bgwf, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #106280 (docs: add link to `Path::join` in `PathBuf::push`)
 - #106297 (rustdoc: merge scrape-help CSS)
 - #106328 (Add comment explaining what the GUI scrape-examples-fonts test is about)
 - #106334 (Fix tidy unittest.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoRollup merge of #106334 - ehuss:fix-tidy-unittests, r=jyn514
Matthias Krüger [Sat, 31 Dec 2022 22:51:35 +0000 (23:51 +0100)]
Rollup merge of #106334 - ehuss:fix-tidy-unittests, r=jyn514

Fix tidy unittest.

The tidy unittests weren't compiling due to a change made a long while ago to the `Version` type.

17 months agoRollup merge of #106328 - GuillaumeGomez:gui-test-explanation, r=notriddle
Matthias Krüger [Sat, 31 Dec 2022 22:51:35 +0000 (23:51 +0100)]
Rollup merge of #106328 - GuillaumeGomez:gui-test-explanation, r=notriddle

Add comment explaining what the GUI scrape-examples-fonts test is about

r? `@notriddle`

17 months agoRollup merge of #106297 - notriddle:notriddle/scrape-help, r=GuillaumeGomez
Matthias Krüger [Sat, 31 Dec 2022 22:51:34 +0000 (23:51 +0100)]
Rollup merge of #106297 - notriddle:notriddle/scrape-help, r=GuillaumeGomez

rustdoc: merge scrape-help CSS

17 months agoRollup merge of #106280 - Ezrashaw:path-join-docs-better, r=thomcc
Matthias Krüger [Sat, 31 Dec 2022 22:51:34 +0000 (23:51 +0100)]
Rollup merge of #106280 - Ezrashaw:path-join-docs-better, r=thomcc

docs: add link to `Path::join` in `PathBuf::push`

Fixes #106219

Hopefully my wording is alright.

17 months agoRun `cargo test` on tidy itself.
Eric Huss [Sat, 31 Dec 2022 20:31:42 +0000 (12:31 -0800)]
Run `cargo test` on tidy itself.

17 months agoAuto merge of #106282 - Ezrashaw:merge-e0465, r=estebank
bors [Sat, 31 Dec 2022 20:10:02 +0000 (20:10 +0000)]
Auto merge of #106282 - Ezrashaw:merge-e0465, r=estebank

refactor: merge error code `E0465` into `E0464`

`E0465` is an undocumented and untested error code that is functionally identical to `E0464`. This PR merges `E0465` into `E0464`, thus documenting and testing another error code (#61137).

r? `@GuillaumeGomez` (not sure if you want to review this but it's relevant to my other PRs that you have reviewed)

17 months agoFix tidy unittest.
Eric Huss [Sat, 31 Dec 2022 19:52:16 +0000 (11:52 -0800)]
Fix tidy unittest.

17 months agoAdd missing extern crate rustc_driver
bjorn3 [Mon, 12 Dec 2022 19:37:28 +0000 (19:37 +0000)]
Add missing extern crate rustc_driver

17 months agoAdd help for the error message when missing rustc_driver
bjorn3 [Tue, 13 Dec 2022 11:30:58 +0000 (11:30 +0000)]
Add help for the error message when missing rustc_driver

17 months agoOnly include metadata for non-dynamic libraries in rustc-dev
bjorn3 [Mon, 12 Dec 2022 12:35:21 +0000 (12:35 +0000)]
Only include metadata for non-dynamic libraries in rustc-dev

The actual object code should be linked from librustc_driver.so,
which is still included in rustc-dev. This saves on download time and
disk usage.

17 months agoAuto merge of #106275 - Nilstrieb:const-eval-select-me-some-compile-time, r=thomcc
bors [Sat, 31 Dec 2022 17:19:10 +0000 (17:19 +0000)]
Auto merge of #106275 - Nilstrieb:const-eval-select-me-some-compile-time, r=thomcc

Use some more `const_eval_select` in pointer methods for compile times

Builds on top of #105435

`is_aligned_to` is _huge_ with calling `align_offset`, so this should cut it down a lot.

This shows up in https://github.com/rust-lang/rust/issues/65031#issuecomment-1367574340

17 months agoAuto merge of #106302 - compiler-errors:terr-coerce-w-infer, r=estebank
bors [Sat, 31 Dec 2022 11:32:15 +0000 (11:32 +0000)]
Auto merge of #106302 - compiler-errors:terr-coerce-w-infer, r=estebank

Suppress errors due to TypeError not coercing with inference variables

Fixes #75331
Fixes #68507
Fixes #82323

cc `@estebank`

17 months agoAdd comment explaining what the GUI scrape-examples-fonts test is about
Guillaume Gomez [Sat, 31 Dec 2022 10:15:02 +0000 (11:15 +0100)]
Add comment explaining what the GUI scrape-examples-fonts test is about

17 months agoAuto merge of #106245 - estebank:mutability-suggestions, r=jyn514
bors [Sat, 31 Dec 2022 08:43:24 +0000 (08:43 +0000)]
Auto merge of #106245 - estebank:mutability-suggestions, r=jyn514

Use verbose suggestions for mutability errors

17 months agorefactor: merge `E0465` into `E0464`
Ezra Shaw [Thu, 22 Dec 2022 07:21:43 +0000 (20:21 +1300)]
refactor: merge `E0465` into `E0464`

17 months agoAuto merge of #106324 - compiler-errors:rollup-2m9njin, r=compiler-errors
bors [Sat, 31 Dec 2022 05:27:07 +0000 (05:27 +0000)]
Auto merge of #106324 - compiler-errors:rollup-2m9njin, r=compiler-errors

Rollup of 9 pull requests

Successful merges:

 - #105903 (Unify id-based thread parking implementations)
 - #106232 (CFI: Monomorphize transparent ADTs before typeid)
 - #106248 (Revert "Implement allow-by-default `multiple_supertrait_upcastable` lint")
 - #106286 (Make tidy errors red)
 - #106295 (Extend scraped examples layout GUI test for position of buttons)
 - #106305 ( bootstrap: Get rid of tail_args in stream_cargo)
 - #106310 (Dont use `--merge-base` during bootstrap formatting subcommand)
 - #106314 (Fix panic on `x build --help`)
 - #106317 (Only deduplicate stack traces for good path bugs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

17 months agoRollup merge of #106317 - compiler-errors:restore-the-backtraces, r=jyn514
Michael Goulet [Sat, 31 Dec 2022 05:26:36 +0000 (21:26 -0800)]
Rollup merge of #106317 - compiler-errors:restore-the-backtraces, r=jyn514

Only deduplicate stack traces for good path bugs

Fixes #106267

Restores backtraces for `bug!` and `delay_span_bug` after #106056. Only `delay_good_path_bug` needed its backtraces to be deduplicated, since it spits out the backtrace where it was created when it's being emitted.

Before:

```
error: internal compiler error: /home/ubuntu/rust2/compiler/rustc_middle/src/ty/relate.rs:638:13: var types encountered in super_relate_consts: Const { ty: usize, kind: Infer(Var(_#0c)) } Const { ty: usize, kind: Param(N/#1) }

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.68.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `<impl at /home/ubuntu/test.rs:7:1: 7:34>::trigger`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors
```

Hmm... that's a little bare.

After:

```
error: internal compiler error: /home/ubuntu/rust2/compiler/rustc_middle/src/ty/relate.rs:638:13: var types encountered in super_relate_consts: Const { ty: usize, kind: Infer(Var(_#0c)) } Const { ty: usize, kind: Param(N/#1) }

thread 'rustc' panicked at 'Box<dyn Any>', /home/ubuntu/rust2/compiler/rustc_errors/src/lib.rs:1599:9
stack backtrace:
   0:     0x7ffb5b41bdd1 - std::backtrace_rs::backtrace::libunwind::trace::h26056f81198c6594
                               at /home/ubuntu/rust2/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7ffb5b41bdd1 - std::backtrace_rs::backtrace::trace_unsynchronized::hacfb345a0c6d5bb1
                               at /home/ubuntu/rust2/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7ffb5b41bdd1 - std::sys_common::backtrace::_print_fmt::h18ea6016ac8030f3
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7ffb5b41bdd1 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he35dde201d0c2d09
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7ffb5b4a0308 - core::fmt::write::h094ad263467a053c
                               at /home/ubuntu/rust2/library/core/src/fmt/mod.rs:1208:17
   5:     0x7ffb5b43caf1 - std::io::Write::write_fmt::hd47b4e2324b4d9b7
                               at /home/ubuntu/rust2/library/std/src/io/mod.rs:1682:15
   6:     0x7ffb5b41bbfa - std::sys_common::backtrace::_print::h43044162653a17fc
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x7ffb5b41bbfa - std::sys_common::backtrace::print::hc8605da258fa5aeb
                               at /home/ubuntu/rust2/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x7ffb5b3ffb87 - std::panicking::default_hook::{{closure}}::h9e37f23f75122a15
   9:     0x7ffb5b3ff97b - std::panicking::default_hook::h602873a063f84da2
                               at /home/ubuntu/rust2/library/std/src/panicking.rs:286:9
  10:     0x7ffb5be192b2 - <alloc[48d7b30605060536]::boxed::Box<dyn for<'a, 'b> core[672e3947e150d6c6]::ops::function::Fn<(&'a core[672e3947e150d6c6]::panic::panic_info::PanicInfo<'b>,), Output = ()> + core[672e3947e150d6c6]::marker::Send + core[672e3947e150d6c6]::marker::Sync> as core[672e3947e150d6c6]::ops::function::Fn<(&core[672e3947e150d6c6]::panic::panic_info::PanicInfo,)>>::call
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:2002:9
  11:     0x7ffb5be192b2 - rustc_driver[f5b6d32d8905ecdd]::DEFAULT_HOOK::{closure#0}::{closure#0}
                               at /home/ubuntu/rust2/compiler/rustc_driver/src/lib.rs:1204:17
  12:     0x7ffb5b4000d3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hfd13333ca953ae8e
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:2002:9
  13:     0x7ffb5b4000d3 - std::panicking::rust_panic_with_hook::h45753e10264ebe7e
                               at /home/ubuntu/rust2/library/std/src/panicking.rs:692:13
  14:     0x7ffb5e8b3a63 - std[3330b4673efabfce]::panicking::begin_panic::<rustc_errors[1b15f4e7e49d1fd5]::ExplicitBug>::{closure#0}

[... FRAMES INTENTIONALLY OMITTED BECAUSE GITHUB GOT ANGRY ...]

 186:     0x7ffb5bea5554 - <std[3330b4673efabfce]::thread::Builder>::spawn_unchecked_::<rustc_interface[947706ead88047d0]::util::run_in_thread_pool_with_globals<rustc_interface[947706ead88047d0]::interface::run_compiler<core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>, rustc_driver[f5b6d32d8905ecdd]::run_compiler::{closure#1}>::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#1}
                               at /home/ubuntu/rust2/library/std/src/thread/mod.rs:549:30
 187:     0x7ffb5bea5554 - <<std[3330b4673efabfce]::thread::Builder>::spawn_unchecked_<rustc_interface[947706ead88047d0]::util::run_in_thread_pool_with_globals<rustc_interface[947706ead88047d0]::interface::run_compiler<core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>, rustc_driver[f5b6d32d8905ecdd]::run_compiler::{closure#1}>::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[672e3947e150d6c6]::result::Result<(), rustc_errors[1b15f4e7e49d1fd5]::ErrorGuaranteed>>::{closure#1} as core[672e3947e150d6c6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
                               at /home/ubuntu/rust2/library/core/src/ops/function.rs:250:5
 188:     0x7ffb5b433968 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he8b26fc22c6f51ec
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:1988:9
 189:     0x7ffb5b433968 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h5cf9cbe75a8c3ddc
                               at /home/ubuntu/rust2/library/alloc/src/boxed.rs:1988:9
 190:     0x7ffb5b41199c - std::sys::unix::thread::Thread::new::thread_start::h2d6dd4455e97d031
                               at /home/ubuntu/rust2/library/std/src/sys/unix/thread.rs:108:17
 191:     0x7ffb5441b609 - start_thread
 192:     0x7ffb5b282133 - clone
 193:                0x0 - <unknown>

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.68.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [typeck] type-checking `<impl at /home/ubuntu/test.rs:7:1: 7:34>::trigger`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0601`.
```

17 months agoRollup merge of #106314 - jyn514:fix-panic, r=jyn514
Michael Goulet [Sat, 31 Dec 2022 05:26:36 +0000 (21:26 -0800)]
Rollup merge of #106314 - jyn514:fix-panic, r=jyn514

Fix panic on `x build --help`

Fixes https://github.com/rust-lang/rust/issues/106313. This avoids trying to run `get_help` unless we actually need to see the paths that are available for the subcommand.

This originally regressed in https://github.com/rust-lang/rust/pull/106166.

17 months agoRollup merge of #106310 - compiler-errors:old-git, r=jyn514
Michael Goulet [Sat, 31 Dec 2022 05:26:36 +0000 (21:26 -0800)]
Rollup merge of #106310 - compiler-errors:old-git, r=jyn514

Dont use `--merge-base` during bootstrap formatting subcommand

I use a development image with Ubuntu 20.04 LTS, which has git 2.25.

Recently, `./x.py test tidy --bless` regressed in #105702 because it uses the `--merge-base` option on `diff-index`, which was only introduced in git 2.30 (git/git@0f5a1d449b9538c2765de9d6683abbb83a7fb4e2). Luckily, it can be replicated via two calls to `git merge-base` + `git diff-index`, so let's just use that.

17 months agoRollup merge of #106305 - jyn514:tail-args, r=Mark-Simulacrum
Michael Goulet [Sat, 31 Dec 2022 05:26:35 +0000 (21:26 -0800)]
Rollup merge of #106305 - jyn514:tail-args, r=Mark-Simulacrum

 bootstrap: Get rid of tail_args in stream_cargo

Based on https://github.com/rust-lang/rust/pull/106303 for convenience.

r? ````@Mark-Simulacrum````

17 months agoRollup merge of #106295 - GuillaumeGomez:extend-scraped-examples-layout-test, r=notriddle
Michael Goulet [Sat, 31 Dec 2022 05:26:35 +0000 (21:26 -0800)]
Rollup merge of #106295 - GuillaumeGomez:extend-scraped-examples-layout-test, r=notriddle

Extend scraped examples layout GUI test for position of buttons

This is a regression test for https://github.com/rust-lang/rust/pull/106279.

r? ````@notriddle````

17 months agoRollup merge of #106286 - Nilstrieb:tidy-cowows, r=jyn514
Michael Goulet [Sat, 31 Dec 2022 05:26:34 +0000 (21:26 -0800)]
Rollup merge of #106286 - Nilstrieb:tidy-cowows, r=jyn514

Make tidy errors red

This makes it easier to see them (and makes people go owo).

I also changes the error codes check to not print too many things and use `tidy_error`.

r? ```@jyn514```

17 months agoRollup merge of #106248 - dtolnay:revertupcastlint, r=jackh726
Michael Goulet [Sat, 31 Dec 2022 05:26:34 +0000 (21:26 -0800)]
Rollup merge of #106248 - dtolnay:revertupcastlint, r=jackh726

Revert "Implement allow-by-default `multiple_supertrait_upcastable` lint"

This is a clean revert of #105484.

I confirmed that reverting that PR fixes the regression reported in #106247. ~~I can't say I understand what this code is doing, but maybe it can be re-landed with a different implementation.~~ **Edit:** https://github.com/rust-lang/rust/issues/106247#issuecomment-1367174384 has an explanation of why #105484 ends up surfacing spurious `where_clause_object_safety` errors. The implementation of `where_clause_object_safety` assumes we only check whether a trait is object safe when somebody actually uses that trait with `dyn`. However the implementation of `multiple_supertrait_upcastable` added in the problematic PR involves checking *every* trait for whether it is object-safe.

FYI `@nbdd0121` `@compiler-errors`

17 months agoRollup merge of #106232 - maurer:transparent-subst, r=rcvalle
Michael Goulet [Sat, 31 Dec 2022 05:26:33 +0000 (21:26 -0800)]
Rollup merge of #106232 - maurer:transparent-subst, r=rcvalle

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

17 months agoRollup merge of #105903 - joboet:unify_parking, r=m-ou-se
Michael Goulet [Sat, 31 Dec 2022 05:26:33 +0000 (21:26 -0800)]
Rollup merge of #105903 - joboet:unify_parking, r=m-ou-se

Unify id-based thread parking implementations

Multiple platforms currently use thread-id-based parking implementations (NetBSD and SGX[^1]). Even though the strategy does not differ, these are duplicated for each platform, as the id is encoded into an atomic thread variable in different ways for each platform.

Since `park` is only called by one thread, it is possible to move the thread id into a separate field. By ensuring that the field is only written to once, before any other threads access it, these accesses can be unsynchronized, removing any restrictions on the size and niches of the thread id.

This PR also renames the internal `thread_parker` modules to `thread_parking`, as that name now better reflects their contents. I hope this does not add too much reviewing noise.

r? `@m-ou-se`

`@rustbot` label +T-libs

[^1]: SOLID supports this as well, I will switch it over in a follow-up PR.

17 months agoOnly deduplicate stack traces for good path bugs
Michael Goulet [Sat, 31 Dec 2022 01:20:59 +0000 (01:20 +0000)]
Only deduplicate stack traces for good path bugs

17 months agoAuto merge of #106320 - jyn514:revert-merge-check, r=jyn514
bors [Sat, 31 Dec 2022 01:58:51 +0000 (01:58 +0000)]
Auto merge of #106320 - jyn514:revert-merge-check, r=jyn514

Revert "Auto merge of #105058 - Nilstrieb:no-merge-commits, r=jyn514"

This reverts commit 4839886f0abe208ab8f2bb73a3076a59fe2ab60c, reversing changes made to ce85c98575e3016cf2007d90a85be321e592aa96.

Fixes https://github.com/rust-lang/rust/pull/106232#issuecomment-1368144655.

r? `@jyn514`

17 months agoRevert "Auto merge of #105058 - Nilstrieb:no-merge-commits-for-you-only-bors-is-allow...
Joshua Nelson [Sat, 31 Dec 2022 01:55:24 +0000 (01:55 +0000)]
Revert "Auto merge of #105058 - Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to-do-that, r=jyn514"

This reverts commit 4839886f0abe208ab8f2bb73a3076a59fe2ab60c, reversing
changes made to ce85c98575e3016cf2007d90a85be321e592aa96.

17 months agoFix panic on `x build --help`
Joshua Nelson [Sat, 31 Dec 2022 00:53:46 +0000 (00:53 +0000)]
Fix panic on `x build --help`

17 months agoAdd notes and examples about non-intuitive `PathBuf::set_extension` behavior
Tobias Bucher [Fri, 30 Dec 2022 23:56:43 +0000 (00:56 +0100)]
Add notes and examples about non-intuitive `PathBuf::set_extension` behavior

Basically, passing the empty string will actually remove the extension
instead of setting it to the empty string. This might change what is
considered to be an extension. Additionally, passing an extension that
contains dots will make the path only consider the last part of it to be
the new extension.

17 months agoAdded link from Targets to Platform Support in the book
Trevor Gross [Fri, 30 Dec 2022 23:06:13 +0000 (18:06 -0500)]
Added link from Targets to Platform Support in the book

17 months agoAuto merge of #105058 - Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to...
bors [Fri, 30 Dec 2022 22:55:51 +0000 (22:55 +0000)]
Auto merge of #105058 - Nilstrieb:no-merge-commits-for-you-only-bors-is-allowed-to-do-that, r=jyn514

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.

I added a link to `@jyn514's` blog post for the error case because that's the best resource to solve merge commits. But it would probably be better if it was integrated into https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy, then we could link that instead.

r? `@jyn514`

17 months agoDont use `--merge-base` during bootstrap formatting subcommand
Michael Goulet [Fri, 30 Dec 2022 22:43:54 +0000 (22:43 +0000)]
Dont use `--merge-base` during bootstrap formatting subcommand

17 months agoMake tidy errors red
Nilstrieb [Fri, 30 Dec 2022 11:23:05 +0000 (12:23 +0100)]
Make tidy errors red

This makes it easier to see them (and makes people go owo).

17 months agobootstrap: Get rid of `tail_args` in `stream_cargo`
Joshua Nelson [Fri, 30 Dec 2022 20:36:31 +0000 (20:36 +0000)]
bootstrap: Get rid of `tail_args` in `stream_cargo`

17 months agoUse more consistent progress messages in bootstrap
Joshua Nelson [Fri, 30 Dec 2022 20:03:24 +0000 (20:03 +0000)]
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)
```

17 months agoSuppress errors due to TypeError not coercing with inference variables
Michael Goulet [Fri, 30 Dec 2022 18:40:16 +0000 (18:40 +0000)]
Suppress errors due to TypeError not coercing with inference variables

17 months agoAdd `build_helper` crate to share code between tidy and bootstrap
Nilstrieb [Fri, 30 Dec 2022 10:11:33 +0000 (11:11 +0100)]
Add `build_helper` crate to share code between tidy and bootstrap

17 months agoAuto merge of #105651 - tgross35:once-cell-inline, r=m-ou-se
bors [Fri, 30 Dec 2022 19:22:33 +0000 (19:22 +0000)]
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

17 months agorustdoc: use the regular arrow indicator for dir-entry CSS
Michael Howell [Fri, 30 Dec 2022 18:58:58 +0000 (11:58 -0700)]
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.

17 months agoRegression test for issue 106247
Gary Guo [Thu, 29 Dec 2022 09:59:49 +0000 (09:59 +0000)]
Regression test for issue 106247

17 months agorustdoc: merge scrape-help CSS
Michael Howell [Fri, 30 Dec 2022 17:43:06 +0000 (10:43 -0700)]
rustdoc: merge scrape-help CSS

17 months agoAuto merge of #106296 - matthiaskrgr:rollup-ukdbqwx, r=matthiaskrgr
bors [Fri, 30 Dec 2022 16:10:00 +0000 (16:10 +0000)]
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

17 months agoRollup merge of #106273 - notriddle:notriddle/source-content-overflow, r=GuillaumeGomez
Matthias Krüger [Fri, 30 Dec 2022 16:01:40 +0000 (17:01 +0100)]
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.

17 months agoRollup merge of #104182 - gabhijit:ipv6-in6addr-any-doc-fix, r=m-ou-se
Matthias Krüger [Fri, 30 Dec 2022 16:01:39 +0000 (17:01 +0100)]
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.