Commit Graph

206007 Commits

Author SHA1 Message Date
Dylan DPC
53e08f36be
Rollup merge of #102119 - steffahn:fix-pararmeter, r=dtolnay
Fix a typo “pararmeter” in error message

Issue reported on IRLO: https://internals.rust-lang.org/t/fixing-a-typo/17427
2022-09-22 18:25:56 +05:30
Dylan DPC
83bea3ddec
Rollup merge of #102107 - Urgau:rustdoc-missing-space-before-where-clause, r=GuillaumeGomez
Add missing space between notable trait tooltip and where clause

This PR add a missing space between the notable trait tooltip and the where clause.

The issue can be seeing on the [BufRead](https://doc.rust-lang.org/nightly/std/io/trait.BufRead.html) page.

Added a simple snapshot regression test in `src/test/rustdoc/where.rs`.

Before:
![image](https://user-images.githubusercontent.com/3616612/191566999-2f80e138-29c9-4f66-8bed-07781cbd9783.png)

After:
![image](https://user-images.githubusercontent.com/3616612/191567025-0ed3f7d4-7cec-4788-901f-5980fc241daa.png)

r? `@GuillaumeGomez`
2022-09-22 18:25:55 +05:30
Dylan DPC
7cac18e1be
Rollup merge of #102076 - cuviper:transmute-discr-endian, r=jackh726
rustc_transmute: fix big-endian discriminants

I noticed that some new tests were failing in Fedora on s390x only, which usually means there's a problem with big-endian, and sure enough there's a FIXME(``@jswrenn)`` for that in `rustc_transmute`. This patch implements the appropriate consideration for target endianness, rather than using native (host) endian.
2022-09-22 18:25:54 +05:30
Dylan DPC
8bf533593d
Rollup merge of #102069 - compiler-errors:no-eq-in-register-opaque, r=oli-obk
Skip `Equate` relation in `handle_opaque_type`

r? ``@oli-obk``
2022-09-22 18:25:54 +05:30
Dylan DPC
d5ae6737bf
Rollup merge of #102037 - jyn514:normalize-docs, r=lcnr
Make cycle errors recoverable

In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation.

In the past, ```@jackh726``` has said we need to be careful about overflow errors: https://github.com/rust-lang/rust/pull/91430#issuecomment-983997013

> Off the top of my head, we definitely should be careful about treating overflow errors the same as
"not implemented for some reason" errors. Otherwise, you could end up with behavior that is
different depending on recursion depth. But, that might be context-dependent.

But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.

Helps with https://github.com/rust-lang/rust/issues/81091.

r? ```@lcnr``` cc ```@matthewjasper```
2022-09-22 18:25:53 +05:30
Dylan DPC
c99a603b87
Rollup merge of #102036 - Patiga:remove-io-errorkind-other-use-in-std, r=Mark-Simulacrum
Remove use of `io::ErrorKind::Other` in std

The documentation states that this `ErrorKind` is not used by the standard library. Instead, `io::ErrorKind::Uncategorized` should be used.

The two instances are in the unstable API [linux_pidfd](https://github.com/rust-lang/rust/issues/82971).
2022-09-22 18:25:52 +05:30
Dylan DPC
b36a10af7e
Rollup merge of #101598 - chriswailes:sanitizers, r=nagisa,eholk
Update rustc's information on Android's sanitizers

This patch updates sanitizer support definitions for Android inside the compiler.  It also adjusts the logic to make sure no pre-built sanitizer runtime libraries are emitted as these are instead provided dynamically on Android targets.
2022-09-22 18:25:51 +05:30
bors
8ab71ab59f Auto merge of #100980 - compiler-errors:normalize-opaque-w-bound-vars, r=lcnr
Normalize opaques w/ bound vars

First, we reenable normalization of opaque types with escaping late bound regions to fix rust-lang/miri#2433. This essentially reverts #89285.

Second, we mitigate the perf regression found in #88862 by simplifying the way that we relate (sub and eq) GeneratorWitness types.

This relies on the fact that we construct these GeneratorWitness types somewhat particularly (with all free regions found in the witness types replaced with late bound regions) -- but those bound regions really should be treated as existential regions, not universal ones. Those two facts leads me to believe that we do not need to use the full `higher_ranked_sub` machinery to relate two generator witnesses. I'm pretty confident that this is correct, but I'm glad to discuss this further.
2022-09-22 12:47:31 +00:00
b-naber
a9e657dbfc don't convert valtree to constvalue during normalization 2022-09-22 14:46:14 +02:00
Luca Palmieri
e572d513bd Distribute rust-json-docs via rustup. 2022-09-22 12:22:49 +01:00
b-naber
e8594257f6 use valtrees for comparison 2022-09-22 13:10:53 +02:00
Guillaume Gomez
d3f97a331c Improve some AllTypes fields name 2022-09-22 13:08:59 +02:00
b-naber
efb908991b address review 2022-09-22 12:35:29 +02:00
b-naber
db7df59418 bless tests 2022-09-22 12:35:28 +02:00
b-naber
9f3784df89 introduce mir::Unevaluated 2022-09-22 12:35:28 +02:00
bors
c10f7d7395 Auto merge of #102028 - oli-obk:miri_subtree, r=oli-obk
Make miri a subtree instead of a submodule

r? `@RalfJung`

fixes #101867
fixes https://github.com/rust-lang/rust/issues/100134
2022-09-22 09:45:04 +00:00
Orson Peters
186debc650
Added which number is computed in compute_float. 2022-09-22 11:34:42 +02:00
Oli Scherer
13438ee29c Const unification is already infallible, remove the error handling logic 2022-09-22 08:20:13 +00:00
Oli Scherer
2ce88a5894 Allow miri docs to keep failing for now 2022-09-22 07:17:26 +00:00
Takayuki Maeda
2d7f987715 use appropriate variable names 2022-09-22 16:11:51 +09:00
bors
3e50038a2d Auto merge of #101999 - the8472:source-lines-partition-point, r=davidtwco
use partition_point instead of binary_search when looking up source lines

In local benchmarks this results in 0.4% fewer cycles in a critical sequential section when compiling libcore.
2022-09-22 07:03:42 +00:00
Venus Xeon-Blonde
ca26dec15f
Add missing assertion 2022-09-22 02:12:06 -04:00
Michael Howell
876c7076c8 rustdoc: remove no-op CSS .content .item-info { position: relative }
This rule was added to help position the marker line in
110e7270ab, which was a `position: absolute`
pseudo-element that relied on its parent to put it in the right spot.

The arrow was removed in 73d0f7c7b6, so the
`relative` position is no longer necessary.
2022-09-21 21:55:08 -07:00
bors
7a8636c843 Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, r=oli-obk
Require `#[const_trait]` on `Trait` for `impl const Trait`

r? `@oli-obk`
2022-09-22 04:22:24 +00:00
Venus Xeon-Blonde
804cd8499b
Remove trailing whitespace
Trailing whitespace seemed to be causing the CI checks to error out.
2022-09-21 23:23:14 -04:00
Dan Johnson
d0a07495be Split out async_fn_in_trait into a separate feature
PR #101224 added support for async fn in trait desuraging behind the
return_position_impl_trait_in_trait feature.

Split this out so that it's behind its own feature gate, since async fn
in trait doesn't need to follow the same stabilization schedule.
2022-09-21 19:26:23 -07:00
Michael Goulet
3fc328dfd3 Normalize generator interior type before erasing 2022-09-22 02:17:39 +00:00
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