Commit Graph

200205 Commits

Author SHA1 Message Date
Dylan DPC
b763cd53f4
Rollup merge of #101722 - aDotInTheVoid:rdy-ty-prim-docs, r=CraftSpider
Rustdoc-Json: Fix Type docs.

Primitive doesn't include Array/Slice/Tuple, as they are their own variants.

ResolvedPath doesn't include Traits, as they appear in the DynTrait variant.
2022-09-16 11:17:00 +05:30
Takayuki Maeda
7510a1b15e remove an unused struct field 2022-09-16 14:34:05 +09:00
Takayuki Maeda
527292a1a6 do not suggest a placeholder to const and static without a type 2022-09-16 11:24:14 +09:00
Michael Howell
7c8e4ef49d rustdoc: remove no-op CSS .block { padding: 0 }
This rule was changed in 8fb1250aba from the
original version that had a non-zero padding. It's not needed, because
it's not overriding anything that would've given `.block` a padding.
2022-09-15 17:16:59 -07:00
bors
0ee5a1ac19 Auto merge of #101711 - chenyukang:fix-101691, r=jyn514
Copy stage0 binaries into stage0-sysroot

Fixes #101691
2022-09-16 00:02:46 +00:00
Maybe Waffle
532e3a50eb Allow building rust-analyzer-proc-macro-srv as a standalone tool 2022-09-16 01:27:47 +04:00
bors
cf9ed0dd58 Auto merge of #101831 - compiler-errors:issue-75899, r=jackh726
Normalize struct field types in `confirm_builtin_unsize_candidate`

Fixes #75899

---

edited to move the normalization into `confirm_builtin_unsize_candidate` instead of the coercion code.
2022-09-15 21:06:36 +00:00
b-naber
d77248e6d2 nits 2022-09-15 22:27:41 +02:00
Michael Howell
669498ca0a rustdoc: fix test cases 2022-09-15 13:14:30 -07:00
Michael Howell
ef24747703 rustdoc: use more precise URLs for jump-to-definition links
As an example, this cuts down
<https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/ty/mod.rs.html>
by about 11%.

    $ du -h new_mod.rs.html old_mod.rs.html
    296K	new_mod.rs.html
    332K	old_mod.rs.html
2022-09-15 13:03:04 -07:00
est31
37dde3fb58 Fix clippy 2022-09-15 21:21:18 +02:00
est31
9c7ae381e6 Remove the let_else feature gate from the testsuite
Result of running:

rg -l "feature.let_else" src/test/  | xargs sed -s -i "s#^...feature.let_else..\$##"

Plus manual tidy fixes.
2022-09-15 21:21:14 +02:00
est31
173eb6f407 Only enable the let_else feature on bootstrap
On later stages, the feature is already stable.

Result of running:

rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-15 21:06:45 +02:00
est31
5633e863bd Remove feature gate from let else suggestion
The let else suggestion added by 0d92752b8a
does not need a feature gate any more.
2022-09-15 21:06:45 +02:00
est31
bca3cf7e86 Stabilize the let_else feature 2022-09-15 21:06:45 +02:00
bors
df34db9b03 Auto merge of #101858 - oli-obk:lift_derive, r=lcnr
derive various impls instead of hand-rolling them

r? `@lcnr`

This may not have been what you asked for in 964b97e845 (r84051418) but I got carried away while following the compiler team meeting today.
2022-09-15 18:14:29 +00:00
yukang
4bf7d2ca91 tweak suggestion 2022-09-16 01:09:26 +08:00
Wesley Wiser
9286c3c3f5 Update stdarch
stdarch updated their version of `cfg-if` so we need to update the one
used by libstd as well.
2022-09-15 13:05:28 -04:00
Michael Howell
7f1734cd94 rustdoc: remove no-op CSS h1-4 { color: --main-color }
Headers already inherit the font color they need from their parents.

This rule dates back to earlier versions of the rustdoc theme, where headers
and body had different text colors.

68c15be8b5/src/librustdoc/html/static/main.css (L72-L98)

Nowadays, since the two have exactly the same color (specified by the
`--main-color` variable), this rule does nothing.
2022-09-15 09:59:27 -07:00
Camille GILLOT
c9c6c507b7 Do not fetch HIR node when iterating to find lint. 2022-09-15 18:40:03 +02:00
Oli Scherer
8aed75bee0 Don't throw away information just to recompute it again 2022-09-15 16:23:10 +00:00
Rageking8
6d7beafc87 slight vertical formatting 2022-09-15 23:51:43 +08:00
Oli Scherer
c6fcb1c6a3 Merge all TypeVisitable for &List<T> impls into one generic one 2022-09-15 15:33:46 +00:00
bors
35a0407814 Auto merge of #101410 - dingxiangfei2009:fix-let-else-scoping, r=jackh726
Reorder nesting scopes and declare bindings without drop schedule

Fix #99228
Fix #99975

Storages are previously not declared before entering the `else` block of a `let .. else` statement. However, when breaking out of the pattern matching into the `else` block, those storages are recorded as scheduled for drops. This is not expected.

This MR fixes this issue by not scheduling the drops for those storages.

cc `@est31`
2022-09-15 15:19:40 +00:00
Oli Scherer
9d9306828c Replace more manual TypeFoldable and TypeVisitable impls with derives 2022-09-15 15:05:03 +00:00
lcnr
5669ce1a28 change FnMutDelegate to trait objects 2022-09-15 16:59:58 +02:00
Oli Scherer
a5ab8da1e2 derive TypeVisitable and TypeFoldable for mir types 2022-09-15 14:42:43 +00:00
Oli Scherer
d376012a43 Derive TypeFoldable and TypeVisitable for mir::PlaceElement 2022-09-15 13:43:44 +00:00
Oli Scherer
10c0560cd2 Resolve a FIXME 2022-09-15 13:37:34 +00:00
Oli Scherer
d4e986c1f0 derive various Lift impl instead of hand rolling them 2022-09-15 13:32:43 +00:00
bors
294f0eef73 Auto merge of #101173 - jyn514:simplify-macro-arguments, r=cjgillot
Further simplify the macros generated by `rustc_queries`

This doesn't actually move anything outside the macros, but it makes them simpler to read.

- Add a new `rustc_query_names` macro. This allows a much simpler syntax for the matchers in the macros passed to it as a callback.
- Convert `define_dep_nodes` and `alloc_once` to use `rustc_query_names`. This is possible because they only use the names
  (despite the quite complicated matchers in `define_dep_nodes`, none of the other arguments are used).
- Get rid of `rustc_dep_node_append`.

r? `@cjgillot`
2022-09-15 11:54:03 +00:00
Guillaume Gomez
d3529ceb6c Correctly handle parens 2022-09-15 13:53:20 +02:00
bors
00fcc82df2 Auto merge of #101811 - flip1995:clippyup, r=flip1995
Clippy pre beta branch fix

Before beta is branched on Friday, I want to move the `unused_peekable` lint  that was added in this release cycle (1.65) to `nursery`. This lint was already reported twice (https://github.com/rust-lang/rust-clippy/issues/9456, https://github.com/rust-lang/rust-clippy/issues/9462) in a short time, so it is probably a good idea to fix it before it hits beta and then stable.

r? `@Manishearth`
2022-09-15 08:53:51 +00:00
yukang
98e20c097c fix #101797: Suggest associated const for incorrect use of let in traits 2022-09-15 16:15:38 +08:00
SparrowLii
89fd6ae458 correct span, add help message and add UI test when query depth overflows 2022-09-15 16:05:44 +08:00
SparrowLii
44506f38e0 add note for layout_of when query depth overflows 2022-09-15 16:05:00 +08:00
bors
0a27ac1611 Auto merge of #101838 - matthiaskrgr:rollup-d1nm6b3, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #100415 (Add BE8 support)
 - #101559 (Adding "backtrace off" option for fuchsia targets)
 - #101740 (Adding ignore-fuchsia arg to non-applicable compiler ui tests)
 - #101778 (rustdoc: clean up DOM by removing `.dockblock-short p`)
 - #101786 (Tidy will not check coding style in bootstrap/target)
 - #101810 (Constify `PartialEq` for `Ordering`)
 - #101812 (rustdoc: clean up CSS `#titles` using flexbox)
 - #101820 (rustdoc: remove no-op rule `a { background: transparent }`)
 - #101828 (Add test for #101743)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-09-15 06:12:39 +00:00
Matthias Krüger
384fee9703
Rollup merge of #101828 - aDotInTheVoid:test-101743, r=jsha
Add test for #101743

The issue was closes as we stopped rendering `const`s like this, but if we move back to doing that, make sure we don't accidently generate tags
2022-09-15 08:00:18 +02:00
Matthias Krüger
f62dd52768
Rollup merge of #101820 - notriddle:notriddle/a, r=GuillaumeGomez
rustdoc: remove no-op rule `a { background: transparent }`

The background is transparent by default.

It was added in 5a01dbe67b to work around a bug in the JavaScript syntax highlighting engine that rustdoc used at the time.
2022-09-15 08:00:18 +02:00
Matthias Krüger
e6aef7bf38
Rollup merge of #101812 - notriddle:notriddle/titles-button, r=GuillaumeGomez
rustdoc: clean up CSS `#titles` using flexbox

This commit allows it to stop manually specifying pixel heights for the tabs on search result pages. There's less messing with manual breakpoints and less complex CSS selectors.

# Before

![image](https://user-images.githubusercontent.com/1593513/190215034-253c0f58-07c6-41c9-8848-0442c0522070.png)

# After

![image](https://user-images.githubusercontent.com/1593513/190215065-d2453dca-edf0-4353-8fc8-3a3b31f03892.png)
2022-09-15 08:00:17 +02:00
Matthias Krüger
b71b640f3c
Rollup merge of #101810 - raldone01:feat/const_partial_eq_ordering, r=fee1-dead
Constify `PartialEq` for `Ordering`

Adds `impl const PartialEq for Ordering {}` to #92391.
2022-09-15 08:00:16 +02:00
Matthias Krüger
a88b96b81b
Rollup merge of #101786 - chenyukang:fix-tidy-for-bootstrap, r=jyn514
Tidy will not check coding style in bootstrap/target

`bootstrap/target` may contains the files generated by `rust-analysis`, which we won't want to be checked.
2022-09-15 08:00:15 +02:00
Matthias Krüger
944984885a
Rollup merge of #101778 - notriddle:notriddle/docblock-short-p, r=GuillaumeGomez
rustdoc: clean up DOM by removing `.dockblock-short p`

On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103.

Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-short-p/std/index.html
2022-09-15 08:00:14 +02:00
Matthias Krüger
b22055c570
Rollup merge of #101740 - andrewpollack:add-ignore-fuchsia-ui-tests, r=tmandry
Adding ignore-fuchsia arg to non-applicable compiler ui tests

Adding `ignore-fuchsia` flag to tests involving `std::process::Command` calls, and `execve` calls
2022-09-15 08:00:13 +02:00
Matthias Krüger
93ae223951
Rollup merge of #101559 - andrewpollack:add-backtrace-off-fuchsia, r=tmandry
Adding "backtrace off" option for fuchsia targets

Used for improving compiler test suite results on Fuchsia targets
2022-09-15 08:00:12 +02:00
Matthias Krüger
ad154e41a1
Rollup merge of #100415 - WorksButNotTested:be8, r=wesleywiser
Add BE8 support

Built using the following `/config.toml`
```
changelog-seen = 2

[llvm]
download-ci-llvm = false
skip-rebuild = true
optimize = true
ninja = true
targets = "ARM;X86"
clang = false

[build]
target = ["x86_64-unknown-linux-gnu", "armeb-linux-gnueabi"]
docs = false
docs-minification = false
compiler-docs = false
[install]
prefix = "/home/user/x-tools/rust/"

[rust]
debug-logging=true
backtrace = true
incremental = true

[target.x86_64-unknown-linux-gnu]

[dist]

[target.armeb-linux-gnueabi]
cc = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc"
cxx = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-g++"
ar = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ar"
ranlib = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-ranlib"
linker = "/home/user/x-tools/armeb-linux-gnueabi/bin/armeb-linux-gnueabi-gcc"
llvm-config = "/home/user/x-tools/clang/bin/llvm-config"
llvm-filecheck = "/home/user/x-tools/clang/bin/FileCheck"
```

The following `.cargo/config` is needed inside any project directory:
```
[build]
target = "armeb-linux-gnueabi"

[target.armeb-linux-gnueabi]
linker = "armeb-linux-gnueabi-gcc"
```
2022-09-15 08:00:11 +02:00
Joshua Nelson
63b8d9b689 Allow using vendoring when running bootstrap from outside the current working directory 2022-09-14 22:02:13 -05:00
bors
c3f59295fe Auto merge of #101830 - nnethercote:streamline-register_res, r=jyn514
Streamline `register_res`.

Turns out it's only ever passed a `Res::Def`.

r? `@jyn514`
2022-09-15 02:58:21 +00:00
Ding Xiang Fei
4a5d2a561c
add diagram to explain the MIR structure 2022-09-15 10:08:14 +08:00
Ding Xiang Fei
c7d1c9b66f
add explanatory note 2022-09-15 10:08:13 +08:00