Commit Graph

206176 Commits

Author SHA1 Message Date
Michael Goulet
02ad984d74 Comment, and bail early if bound vars list differs 2022-09-22 02:17:39 +00:00
Michael Goulet
d018144761 Optimize subtyping and equation of GeneratorWitness 2022-09-22 02:17:39 +00:00
Michael Goulet
43119d6438 Normalize opaques with escaping bound vars 2022-09-22 02:17:39 +00:00
bors
626b02a8f9 Auto merge of #102121 - JohnTitor:rollup-3fb1wrt, r=JohnTitor
Rollup of 12 pull requests

Successful merges:

 - #101952 (Avoid panicking on missing fallback)
 - #102030 (Don't crate-locally reexport walk functions in tidy)
 - #102032 (Adding ignore fuchsia tests for signal interpretation cases)
 - #102033 (Adding needs-unwind to nicer-assert-messages compiler ui tests)
 - #102054 (Unify "all items" page's sidebar with other pages)
 - #102071 (Adding needs-unwind for tests testing memory size of Futures/Closures)
 - #102073 (Adding ignore fuchsia tests for execvp)
 - #102075 (rustdoc: remove no-op CSS `.content > .methods > .method`)
 - #102079 (Update books)
 - #102084 (Adding needs-unwind for test using panic::catch_unwind)
 - #102100 (Prevent usage of .stab elements to create scrollable areas in doc blocks)
 - #102102 (Add doc aliases on Sized trait)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-22 01:41:03 +00:00
Michael Howell
f528d49c23 rustdoc: update test case for headers without max-width 2022-09-21 17:29:47 -07:00
Michael Howell
ba5f05b1c4 rustdoc: remove unnecessary max-width on headers
This code was added in 003b2bc1c6 to prevent
these headers from overlapping `.out-of-band` side items. That stopped
being a problem when 3f92ff34b5 switched
rustdoc over to using `float`, rather than `position: absolute`, to
implement this.
2022-09-21 17:20:09 -07:00
Yuki Okushi
15b4788e36
Rollup merge of #102102 - GuillaumeGomez:doc-aliases-sized-trait, r=thomcc
Add doc aliases on Sized trait

Fixes #101267.

It adds both `?` and `?Sized` doc aliases for the `Sized` trait.

Some screenshots of the result:

![Screenshot from 2022-09-21 16-19-55](https://user-images.githubusercontent.com/3050060/191529854-65a79b75-6c20-4fd4-88c2-56d617d1acff.png)
![Screenshot from 2022-09-21 16-20-04](https://user-images.githubusercontent.com/3050060/191529857-2d11b477-5c5d-4080-9382-0b07950fd7f6.png)
2022-09-22 09:03:57 +09:00
Yuki Okushi
9aa3180dfc
Rollup merge of #102100 - GuillaumeGomez:stab-in-docblocks, r=notriddle
Prevent usage of .stab elements to create scrollable areas in doc blocks

Fixes #101874.

You can test it online [here](https://rustdoc.crud.net/imperio/stab-in-doblocks/foo/index.html).

r? `@notriddle`
2022-09-22 09:03:56 +09:00
Yuki Okushi
3c6dbf911e
Rollup merge of #102084 - andrewpollack:add-issue-panic-unwind, r=bjorn3
Adding needs-unwind for test using panic::catch_unwind

Adding needs-unwind for test using panic::catch_unwind

cc. `@djkoloski`

r? `@tmandry`
2022-09-22 09:03:56 +09:00
Yuki Okushi
6c47d295f1
Rollup merge of #102079 - ehuss:update-books, r=ehuss
Update books

## nomicon

1 commits in d880e6ac2acf133dce640da24b9fb692844f02d4..f53bfa056929217870a5d2df1366d2e7ba35096d
2022-08-24 12:42:34 -0700 to 2022-09-05 07:19:02 -0700
- Small typo (rust-lang/nomicon#379)

## reference

9 commits in f62e93c28323ed9637d0a205a0c256498674a509..a7cdac33ca7356ad49d5c2b5e2c5010889b33eee
2022-08-28 10:01:28 -0700 to 2022-09-19 17:39:58 -0700
- Clarify wording for references. (rust-lang/reference#1223)
- Update Unicode reference to match rustc implementation (rust-lang/reference#1271)
- Add documentation for raw-dylib and link_ordinal (rust-lang/reference#1244)
- Specify guarantees for repr(rust) structs (rust-lang/reference#1152)
- Classify AsyncBlockExpression as ExpressionWithoutBlock (rust-lang/reference#1268)
- Update closure-expr.md (rust-lang/reference#1269)
- Clarify that 0 is a valid multiple of a type's alignment (rust-lang/reference#1260)
- Remove `ne` from derive example (rust-lang/reference#1264)
- Clarify reference on async blocks (rust-lang/reference#1262)

## book

6 commits in 0a5421ceb238357b3634fb75234eba4d1dad643c..f1e5ad844d0c61738006cdef26227beeb136948e
2022-08-28 19:51:04 -0400 to 2022-09-19 09:48:21 -0400
- Fix punctuation in ch05-02
- Ownership move chapter link fix
- Wrong listing number
- Reword text around box
- `Box<T>` instead of "box"
- Update Clippy output in Appendix D

## rust-by-example

2 commits in 03301f8ae55fa6f20f7ea152a517598e6db2cdb7..767a6bd9727a596d7cfdbaeee475e65b2670ea3a
2022-08-14 08:51:44 -0300 to 2022-09-14 09:17:18 -0300
- struct_visibility.md:  Remove unneeded '#[allow(dead_code)]' (rust-lang/rust-by-example#1609)
- Fix assorted typos (rust-lang/rust-by-example#1601)

## rustc-dev-guide

15 commits in 04892c1a6fc145602ac7367945fda9d4ee83c9fb..f587d6e7cddeaa3cf0a33ec1e368df1a408fa0aa
2022-08-29 20:07:51 +0200 to 2022-09-20 07:43:59 +0900
- Update stability guide to use CURRENT_RUSTC_VERSION (rust-lang/rustc-dev-guide#1468)
- Add a note about building `rust-analyzer-proc-macro-srv` (rust-lang/rustc-dev-guide#1467)
- Link from "implementing to new features" to mcp.md (rust-lang/rustc-dev-guide#1465)
- remove stray **
- Explain the new valtree system for type level constants. (rust-lang/rustc-dev-guide#1097)
- fix typos and formatting
- Say "bootstrap" instead of "rustbuild"; the latter is not explained anywhere and is not much more clear.
- Rewrite the section on passing flags to subcommands
- Remove the diagram of all outputs generated by x.py
- "symbol names" => ABI
- Add symbol-addition to the how-to for new features (rust-lang/rustc-dev-guide#1457)
- Fix typo (rust-lang/rustc-dev-guide#1459)
- Document multipart_suggestion derive on SessionSubdiagnostic
- Add reference for updating Windows PATH and fix typo
- Update for removal of RLS (rust-lang/rustc-dev-guide#1450)

## embedded-book

1 commits in befe6840874311635c417cf731377f07234ee373..4ce51cb7441a6f02b5bf9b07b2eb755c21ab7954
2022-07-25 07:51:14 +0000 to 2022-09-15 08:53:09 +0000
- Create CITATION.bib (as per rust-embedded/book#327)  (rust-embedded/book#329)
2022-09-22 09:03:55 +09:00
Yuki Okushi
dc236181b4
Rollup merge of #102075 - notriddle:notriddle/content-methods-method, r=GuillaumeGomez
rustdoc: remove no-op CSS `.content > .methods > .method`

# `font-size: 1rem`

This rule was added in 22dad4b044, back when the `method` class was attached to headers instead of DIVs that wrap headers.

Old method rendering:

a96247bcac/src/librustdoc/html/render.rs (L2062)

Current method rendering:

432abd86f2/src/librustdoc/html/render/print_item.rs (L721)

# `position: relative`

This rule was added in 88fe6dfa31 to assist in position the hide/show togges on methods. This is no longer needed, because these toggles are no longer implemented as absolutely positioned links nested inside headers.
2022-09-22 09:03:55 +09:00
Yuki Okushi
6d7ee6839c
Rollup merge of #102073 - andrewpollack:add-execvp-call-ignore, r=tmandry
Adding ignore fuchsia tests for execvp

Adding ignore fuchsia tests for execvp

cc. ``@djkoloski``

r? ``@tmandry``
2022-09-22 09:03:54 +09:00
Yuki Okushi
aa176c1ba5
Rollup merge of #102071 - andrewpollack:add-needs-unwind-for-binary-size, r=tmandry
Adding needs-unwind for tests testing memory size of Futures/Closures

Adding needs-unwind for tests testing memory size of Futures/Closures

cc. ``@djkoloski``

r? ``@tmandry``
2022-09-22 09:03:54 +09:00
Yuki Okushi
9cbae7dfe5
Rollup merge of #102054 - GuillaumeGomez:sidebar-all-page, r=notriddle
Unify "all items" page's sidebar with other pages

Currently, the "all types" page's sidebar doesn't list the different categories of type available. This PR fixes it.

Before:

![Screenshot from 2022-09-20 17-11-15](https://user-images.githubusercontent.com/3050060/191296348-95d8771d-a887-432e-96bd-d5284d87d743.png)

After:

![Screenshot from 2022-09-20 17-11-09](https://user-images.githubusercontent.com/3050060/191296344-8e7318a3-eb51-4037-ae94-7ae2115363ce.png)

r? `@notriddle`
2022-09-22 09:03:54 +09:00
Yuki Okushi
d8dc60ac8a
Rollup merge of #102033 - andrewpollack:add-unwind-on-pretty, r=tmandry
Adding needs-unwind to nicer-assert-messages compiler ui tests

Tests where unwind is required for asserting on contents of error message

cc. ``@djkoloski``

r? ``@tmandry``
2022-09-22 09:03:53 +09:00
Yuki Okushi
5542e504ab
Rollup merge of #102032 - andrewpollack:bad-signal-compiler-tests, r=tmandry
Adding ignore fuchsia tests for signal interpretation cases

Tests where Signal interpreting is required. Since Fuchsia currently does not return signals of type `libc::SIGSEGV` etc., instead, use generalized `!status.success()` case.

cc. `@djkoloski`

r? `@tmandry`
2022-09-22 09:03:53 +09:00
Yuki Okushi
614e18bf59
Rollup merge of #102030 - est31:tidy_walk_no_reexport, r=Mark-Simulacrum
Don't crate-locally reexport walk functions in tidy

I've moved the walk functions into their own module in #100591 and didn't want to make changing the paths everywhere in tidy part of the PRs diff, so I just reexported the functions locally. This PR removes the crate-local reexport and instead does module level reexports. I'm not sure how much it's worth it and whether the new state is better, idk. Feel free to have any opinion on this.
2022-09-22 09:03:52 +09:00
Yuki Okushi
b08c8cb7e0
Rollup merge of #101952 - Mark-Simulacrum:missing-fallback, r=ehuss
Avoid panicking on missing fallback

This just prints a message but continues on if a fallback is missing, which can happen when we're building a partial set of builders and producing a dev-static build from it (e.g., when no Apple builder runs at all).

Probably the more extensive fix is to allow the build-manifest invoker to specify the expected set of targets & hosts, but that's a far more extensive change. The main risk from this is that we accidentally start falling back to linux docs across all platforms without noticing. I'm not sure that we can do much about that though at this time.

cc `@ehuss` since IIRC you participated in adding this system

This comes up when building a test nightly from a try build, e.g., https://github.com/rust-lang/rust/pull/101855#issuecomment-1250123298. For now I'm going to manually cherry pick this onto that PR for testing purposes.
2022-09-22 09:03:52 +09:00
Steve Heindel
51c752a375 Add note to clippy::non_expressive_names doc 2022-09-21 19:45:57 -04:00
Michael Howell
8b4c0d90dc rustdoc: adjust test to cope with slightly different scrolling behaviour 2022-09-21 16:44:33 -07:00
Frank Steffahn
07767784ad Bless test output changes 2022-09-22 01:32:37 +02:00
Frank Steffahn
696472a586 Fix a typo in error message 2022-09-22 01:28:45 +02:00
Michael Howell
f66769fe8d rustdoc: dynamically show-hide line numbers on code examples 2022-09-21 16:12:15 -07:00
bors
4a4fd12ebf Auto merge of #102106 - djkoloski:sync-from-clippy, r=Manishearth
Update clippy

r? `@Manishearth`
2022-09-21 22:59:40 +00:00
Michael Howell
7a718f3be2 rustdoc: use block flex for line-number CSS
`display: inline-flex` was used as part of
e961d397ca, the original commit that added
these line numbers. Does anyone know why it was done this way?
2022-09-21 15:27:55 -07:00
Venus Xeon-Blonde
758ca9dc3a
Add examples to bool::then and bool::then_some
Added examples to `bool::then` and `bool::then_some` to show the distinction between the eager evaluation of `bool::then_some` and the lazy evaluation of `bool::then`.
2022-09-21 17:07:50 -04:00
Ralf Jung
0f4d7b6de8 OpTy: fix a method taking self rather than &self 2022-09-21 22:20:40 +02:00
bors
9062b780b3 Auto merge of #101558 - JhonnyBillM:session-diagnostic-to-diagnostic-handler-refactor, r=davidtwco
Move and rename `SessionDiagnostic` & `SessionSubdiagnostic` traits and macros

After PR #101434, we want to:
- [x] Move `SessionDiagnostic` to `rustc_errors`.
- [x] Add `emit_` methods that accept `impl SessionDiagnostic` to `Handler`.
- [x] _(optional)_ Rename trait `SessionDiagnostic` to `DiagnosticHandler`.
- [x] _(optional)_ Rename macro `SessionDiagnostic` to `DiagnosticHandler`.
- [x] Update Rustc Dev Guide and Docs to reflect these changes. https://github.com/rust-lang/rustc-dev-guide/pull/1460

Now I am having build issues getting the compiler to build when trying to rename the macro.

<details>
  <summary>See diagnostics errors and context when building.</summary>

```
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
  --> compiler/rustc_attr/src/session_diagnostics.rs:13:10
   |
13 |   #[derive(DiagnosticHandler)]
   |            ^^^^^^^^^^^^^^^^^ in this derive macro expansion
   |
  ::: /Users/jhonny/.cargo/registry/src/github.com-1ecc6299db9ec823/synstructure-0.12.6/src/macros.rs:94:9
   |
94 | /         pub fn $derives(
95 | |             i: $crate::macros::TokenStream
96 | |         ) -> $crate::macros::TokenStream {
   | |________________________________________- in this expansion of `#[derive(DiagnosticHandler)]`
   |
note: the lint level is defined here
  --> compiler/rustc_attr/src/lib.rs:10:9
   |
10 | #![deny(rustc::diagnostic_outside_of_impl)]
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```

And also this one:

```
error: diagnostics should only be created in `SessionDiagnostic`/`AddSubdiagnostic` impls
   --> compiler/rustc_attr/src/session_diagnostics.rs:213:32
    |
213 |         let mut diag = handler.struct_span_err_with_code(
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^
```

> **Note**
> Can't find where this message is coming from, because you can see in [this experimental branch](https://github.com/JhonnyBillM/rust/tree/experimental/trying-to-rename-session-diagnostic-macro)  that I updated all errors and diags to say:
> error: diagnostics should only be created in **`DiagnosticHandler`**/`AddSubdiagnostic` impls
> and not:
> error: diagnostics should only be created in **`SessionDiagnostic`**/`AddSubdiagnostic` impls

</details>

I tried building the compiler in different ways (playing with the stages etc), but nothing worked.

## Question

**Do we need to build or do something different when renaming a macro and identifiers?**

For context, see experimental commit f2193a98b4 where the macro and symbols are renamed, but it doesn't compile.
2022-09-21 19:58:39 +00:00
Josh Stone
5d8083360a Allow full relro on powerpc64-unknown-linux-gnu
This was previously limited to partial relro, citing issues on RHEL6,
but that's no longer a supported platform since #95026. We have long
been enabling full relro in RHEL7's own Rust builds for ppc64, without
trouble, so it should be fine to drop this workaround.
2022-09-21 11:53:50 -07:00
bors
db4b4d3bec Auto merge of #102097 - Dylan-DPC:rollup-gc75oh4, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #89891 (`alloc`: add unstable cfg features `no_rc` and `no_sync`)
 - #101995 (Add another example for `uN::carrying_mul`)
 - #102031 (Adding ignore fuchsia tests for Backtrace, ErrorKind cases)
 - #102041 (Improve `-Zmeta-stats` some more)
 - #102045 (fix ConstProp handling of written_only_inside_own_block_locals)
 - #102058 (Clarify Path::extension() semantics in docs abstract)
 - #102059 (Use rebind instead of dummy binder in `SameTypeModuloInfer` relation)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-21 17:17:25 +00:00
David Koloski
0650c4078c Merge commit '7248d06384c6a90de58c04c1f46be88821278d8b' into sync-from-clippy 2022-09-21 13:13:27 -04:00
Urgau
e214385a4d Add missing space between notable trait tooltip and where clause 2022-09-21 19:01:49 +02:00
Andrew Pollack
6c29716d0a Adding ignore fuchsia tests for signal cases 2022-09-21 15:57:19 +00:00
Jhonny Bill Mena
e52e2344dc FIX - adopt new Diagnostic naming in newly migrated modules
FIX - ambiguous Diagnostic link in docs

UPDATE - rename diagnostic_items to IntoDiagnostic and AddToDiagnostic

[Gardening] FIX - formatting via `x fmt`

FIX - rebase conflicts. NOTE: Confirm wheather or not we want to handle TargetDataLayoutErrorsWrapper this way

DELETE - unneeded allow attributes in Handler method

FIX - broken test

FIX - Rebase conflict

UPDATE - rename residual _SessionDiagnostic and fix LintDiag link
2022-09-21 11:43:22 -04:00
Jhonny Bill Mena
5f91719f75 UPDATE - rename SessionSubdiagnostic macro to Subdiagnostic
Also renames:
- sym::AddSubdiagnostic to sym:: Subdiagnostic
- rustc_diagnostic_item = "AddSubdiagnostic" to rustc_diagnostic_item = "Subdiagnostic"
2022-09-21 11:39:53 -04:00
Jhonny Bill Mena
a3396b2070 UPDATE - rename DiagnosticHandler macro to Diagnostic 2022-09-21 11:39:53 -04:00
Jhonny Bill Mena
191fac6826 UPDATE - rename AddSubdiagnostic trait to AddToDiagnostic 2022-09-21 11:39:53 -04:00
Jhonny Bill Mena
19b348fed4 UPDATE - rename DiagnosticHandler trait to IntoDiagnostic 2022-09-21 11:39:52 -04:00
Jhonny Bill Mena
5b8152807c UPDATE - move SessionDiagnostic from rustc_session to rustc_errors 2022-09-21 11:39:52 -04:00
Oli Scherer
47cb378526 Remove unused imports 2022-09-21 15:37:10 +00:00
Oli Scherer
f45b570e08 Add 'src/tools/miri/' from commit '75dd959a3a40eb5b4574f8d2e23aa6efbeb33573'
git-subtree-dir: src/tools/miri
git-subtree-mainline: 3f3167fb59
git-subtree-split: 75dd959a3a
2022-09-21 15:36:26 +00:00
Ralf Jung
3f3167fb59 miri is not in toolstate any more 2022-09-21 15:35:53 +00:00
Oli Scherer
7e23244ef1 HACK: Treat miri as if it were a submodule 2022-09-21 15:35:53 +00:00
Oli Scherer
6cfa7ef2ba Remove miri from the submodule list and require it for CI to pass 2022-09-21 15:35:53 +00:00
Oli Scherer
d9382d03bd Remove miri submodule 2022-09-21 15:35:53 +00:00
Aaron Hill
3d8b3e6ca1
Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests
This allows the tests to pass even if the user has RUST_BACKTRACE
set when running 'x.py'
2022-09-21 10:25:03 -05:00
Deadbeef
898c76cd82 Make error messages great again (and fix clippy and add test) 2022-09-21 15:02:15 +00:00
Guillaume Gomez
6069f71e6c Add GUI test for .stab elements in docblocks 2022-09-21 16:40:31 +02:00
Guillaume Gomez
efbde853af Add doc aliases on Sized trait 2022-09-21 16:20:15 +02:00
Guillaume Gomez
150623eb6c Prevent usage of .stab elements to create scrollable areas in doc blocks 2022-09-21 16:12:14 +02:00