Commit Graph

213460 Commits

Author SHA1 Message Date
bors
92c1937a90 Auto merge of #97176 - kraktus:cmd_debug, r=the8472
More verbose `Debug` implementation of `std::process:Command`

Mainly based on commit: ccc019aabf from https://github.com/zackmdavis

close https://github.com/rust-lang/rust/issues/42200
2022-12-27 18:13:23 +00:00
bors
db79625326 Auto merge of #106183 - matthiaskrgr:rollup-ww6yzhi, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #105817 (Remove unreasonable help message for auto trait)
 - #105994 (Add regression test for #99647)
 - #106066 (Always suggest as `MachineApplicable` in `recover_intersection_pat`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-27 15:44:53 +00:00
Matthias Krüger
b7657e9cec
Rollup merge of #106066 - JohnTitor:rm-bindings-after-at-fixme, r=compiler-errors
Always suggest as `MachineApplicable` in `recover_intersection_pat`

This resolves one FIXME in `recover_intersection_pat` by always applying `MachineApplicable` when suggesting, as `bindings_after_at` is now stable.
This also separates a test to apply `// run-rustfix`.

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-27 16:37:48 +01:00
Matthias Krüger
d5b975cb7c
Rollup merge of #105994 - JohnTitor:issue-99647, r=compiler-errors
Add regression test for #99647

Closes #99647
r? `@compiler-errors`

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-12-27 16:37:47 +01:00
Matthias Krüger
a0bf4f9b72
Rollup merge of #105817 - chenyukang:yukang/fix-105788-sugg-for-auto-trait, r=TaKO8Ki
Remove unreasonable help message for auto trait

Fixes #105788
2022-12-27 16:37:47 +01:00
bors
b38a6d373c Auto merge of #106168 - jyn514:clean-crates, r=Mark-Simulacrum
Allow cleaning individual crates

As a bonus, this stops special casing `clean` in `Builder`.

## Motivation

Cleaning artifacts isn't strictly necessary to get cargo to rebuild; `touch compiler/rustc_driver/src/lib.rs` (for example) will also work. There's two reasons I thought making this part of bootstrap proper was a better approach:
1. `touch` does not *remove* artifacts, it just causes a rebuild. This is unhelpful for when you want to measure how long the compiler itself takes to build (e.g. for https://github.com/rust-lang/rust/issues/65031).
2. It seems a little more discoverable; and I want to extend it in the future to things like `x clean --stage 1 rustc`, which makes it easier to work around https://github.com/rust-lang/rust/issues/76720 without having to completely wipe all the stage 0 artifacts, or having to be intimately familiar with which directories to remove.
2022-12-27 13:04:08 +00:00
bors
a1fc71196a Auto merge of #106177 - matthiaskrgr:rollup-oe7z8ix, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #105515 (Account for macros in const generics)
 - #106146 (Readme: update section on how to run `x.py`)
 - #106150 (Detect when method call on LHS might be shadowed)
 - #106174 (Remove unused empty CSS rules in ayu theme)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-27 10:23:32 +00:00
kraktus
eb63dea57f More verbose Debug implementation of std::process:Command
based on commit: ccc019aabf from https://github.com/zackmdavis

close https://github.com/rust-lang/rust/issues/42200

Add env variables and cwd to the shell-like debug output.

Also use the alternate syntax to display a more verbose display, while not showing internal fields and hiding fields when they have their default value.
2022-12-27 09:50:01 +01:00
Matthias Krüger
d5810e8339
Rollup merge of #106174 - GuillaumeGomez:rm-unused-ayu-css-rules, r=notriddle
Remove unused empty CSS rules in ayu theme

r? `@notriddle`
2022-12-27 08:57:48 +01:00
Matthias Krüger
e31e8b1176
Rollup merge of #106150 - estebank:issue-39232, r=compiler-errors
Detect when method call on LHS might be shadowed

Address #39232.
2022-12-27 08:57:48 +01:00
Matthias Krüger
bb08f37a1c
Rollup merge of #106146 - kadiwa4:readme-x-py, r=jyn514
Readme: update section on how to run `x.py`

`./x.py` currently looks for `python3` (not `python`) in the `PATH`. I updated that in the readme and also mentioned a convenient way to run `x.py` on Windows. The PowerShell script is actually quite inconvenient to use (and not really necessary on the `cmd.exe` prompt) so I left it out.

In addition I adapted `./x` in one of the CI scripts.
2022-12-27 08:57:46 +01:00
Matthias Krüger
b8d71fc41f
Rollup merge of #105515 - estebank:issue-104141, r=oli-obk
Account for macros in const generics

Fix #104141.
2022-12-27 08:57:45 +01:00
bors
0ca50032ce Auto merge of #106095 - estebank:pin-mut-reborrow, r=compiler-errors
Suggest `Pin::as_mut` when encountering borrow error

Fix #65409 for `Pin<&mut T>`.
2022-12-27 07:31:42 +00:00
yukang
90753de099 fix #105788, Remove unreasonable help message for auto trait 2022-12-27 12:56:40 +08:00
bors
e396186407 Auto merge of #106166 - jyn514:print-paths, r=Mark-Simulacrum
Fix panic on `x build --help --verbose`

See https://github.com/rust-lang/rust/issues/106165 for a detailed description of what went wrong here.

This also makes the panic message a little more informative in case it happens again.
2022-12-27 04:44:42 +00:00
Guillaume Gomez
ac8952e8fd Remove unused empty CSS rules in ayu theme 2022-12-27 04:59:33 +01:00
Joshua Nelson
6d388a4ee3 Allow cleaning individual crates
As a bonus, this stops special casing `clean` in `Builder`.
2022-12-26 19:31:40 -06:00
Joshua Nelson
3890992d0a Fix panic on x build --help --verbose
This also makes the panic message a little more informative in case it
happens again.
2022-12-26 17:53:57 -06:00
bors
58f5a0180c Auto merge of #103020 - lyming2007:issue-102598-fix, r=jackh726
error parsing lifetime following by Sized and message + between them

Fixes #102598
2022-12-26 21:50:05 +00:00
Esteban Küber
8a13a7c148 review comments 2022-12-26 13:35:35 -08:00
Esteban Küber
2cc22cee96 fix rebase 2022-12-26 12:47:08 -08:00
Esteban Küber
8bde5bbc07 Fix suggestion when there are arguments in the method 2022-12-26 12:43:52 -08:00
Esteban Küber
85ff8889e4 Tweak wording 2022-12-26 12:31:53 -08:00
Esteban Küber
34b9594f6d Detect when method call on LHS might be shadowed
Address #39232.
2022-12-26 12:31:53 -08:00
bors
88c58e3c2c Auto merge of #106156 - fee1-dead-contrib:rollup-3ir0951, r=fee1-dead
Rollup of 2 pull requests

Successful merges:

 - #106151 (Remove unused imports)
 - #106153 (Fix missing renaming for #titles into #search-tabs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-26 18:36:10 +00:00
fee1-dead
786e0b5577
Rollup merge of #106153 - GuillaumeGomez:search-tabs-headers, r=notriddle
Fix missing renaming for #titles into #search-tabs

We forgot to update this selector in the themes in https://github.com/rust-lang/rust/pull/106069.

r? `@notriddle`
2022-12-27 00:34:53 +08:00
fee1-dead
24265827c8
Rollup merge of #106151 - TaKO8Ki:remove-unused-imports, r=jackh726
Remove unused imports
2022-12-27 00:34:53 +08:00
bors
caa64e5b5e Auto merge of #106149 - notriddle:notriddle/src-sidebar-toggle-pos, r=GuillaumeGomez
rustdoc: clean up src sidebar toggle position CSS

This PR makes the `464px` version of `#src-sidebar-toggle` the same as the `700px` version, with the button lower on the page so that it doesn't cover up the search form, and removes the left margin to make space for it.

## Before

![image](https://user-images.githubusercontent.com/1593513/209507474-0463e4b2-0bd4-497b-958c-ec4fdbb524fb.png)

## After

![image](https://user-images.githubusercontent.com/1593513/209507499-a32c1728-d4c9-46d9-821d-ba6f8d4d94d4.png)
2022-12-26 15:46:53 +00:00
Guillaume Gomez
caa201fb96 Add GUI test for search tab headers 2022-12-26 13:09:40 +01:00
Guillaume Gomez
ade755d251 Fix missing renaming for #titles into #search-tabs 2022-12-26 13:09:23 +01:00
bors
731e0bf721 Auto merge of #103828 - cassaundra:fix-format-args-span2, r=cjgillot
Fix incorrect span when using byte-escaped rbrace

Fix #103826, a format args span issue introduced in #102214.

The current solution for tracking skipped characters made it so that certain situations were ambiguous enough that the original span couldn't be worked out later. This PR improves on the original solution by keeping track of groups of skipped characters using a map, and fixes the previous bug. See an example of this ambiguity in the [previous PR's discussion](https://github.com/rust-lang/rust/pull/102214#issuecomment-1258711015).
2022-12-26 12:03:47 +00:00
bors
f206533fd4 Auto merge of #105605 - inquisitivecrystal:attr-validation, r=cjgillot
Don't perform invalid checks in `codegen_attrs`

The attributes `#[track_caller]` and `#[cmse_nonsecure_entry]` are only valid on functions. When validating one of these attributes, codegen_attrs previously called `fn_sig`, [which can only be used on functions](https://github.com/rust-lang/rust/pull/105201), on the item the attribute was attached to, assuming that the item was a function without checking. This led to [ICEs in situations where the attribute was incorrectly used on non-functions](https://github.com/rust-lang/rust/issues/105594).

With this change, we skip calling `fn_sig` if the item the attribute is attached to must be a function but isn't, because `check_attr` will reject such cases without codegen_attrs's intervention.

As a side note, some of the attributes in codegen_attrs are only valid on functions, but that property isn't actually checked. I'm planning to fix that in a follow up PR since it's a behavior change that will need to be validated rather than an obvious bugfix. Thankfully, all the attributes like that I've found so far are unstable.

Fixes #105594.

r? `@cjgillot`
2022-12-26 09:06:51 +00:00
Takayuki Maeda
a8f468f5c6 remove unused imports 2022-12-26 15:01:20 +09:00
Michael Howell
4ee16b8aea rustdoc: clean up src sidebar toggle position CSS
This PR makes the `464px` version of `#src-sidebar-toggle` the same as the
`700px` version, with the button lower on the page so that it doesn't cover
up the search form, and removes the left margin to make space for it.
2022-12-25 22:39:31 -07:00
Esteban Küber
bd890f9cd1 Remove redundant clone suggestion 2022-12-25 17:16:54 -08:00
Esteban Küber
2d6a2ff76e Create new inference context 2022-12-25 16:51:11 -08:00
bors
797b5f0f8e Auto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #105375 (Fix an outdated comment mentioning parameter that doesn't exist anymore)
 - #105955 (Remove wrapper functions for some unstable options)
 - #106137 (fix more clippy::style findings)
 - #106140 (Migrate links-color.goml to functions)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-12-25 23:47:11 +00:00
KaDiWa
9bf4036d17
readme: update section on how to run x.py 2022-12-26 00:33:32 +01:00
Matthias Krüger
a054e703b1
Rollup merge of #106140 - GuillaumeGomez:migrate-links-color, r=notriddle
Migrate links-color.goml to functions

r? `@notriddle`
2022-12-25 22:15:01 +01:00
Matthias Krüger
23967a9990
Rollup merge of #106137 - matthiaskrgr:clippy_style, r=jyn514
fix more clippy::style findings

match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed

r? `@compiler-errors`
2022-12-25 22:15:00 +01:00
Matthias Krüger
6689d2df08
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses-for-that, r=cjgillot
Remove wrapper functions for some unstable options

They are trivial and just forward to the option. Like most other options, we can just access it directly.
2022-12-25 22:15:00 +01:00
Matthias Krüger
44065e4184
Rollup merge of #105375 - WaffleLapkin:docfix, r=cjgillot
Fix an outdated comment mentioning parameter that doesn't exist anymore

I'm not too familiar with the code in question, but from what I see I think the new comment makes sense.

r? `@cjgillot` (you touched these arguments lately https://github.com/rust-lang/rust/pull/91557/files#diff-ad0c15bbde97a607d4758ec7eaf88248be5d6b8ae084dfc84127f81e3f7a9bb4L1702, https://github.com/rust-lang/rust/pull/104048/files#diff-ad0c15bbde97a607d4758ec7eaf88248be5d6b8ae084dfc84127f81e3f7a9bb4L1682)
2022-12-25 22:14:59 +01:00
bors
8dfb339541 Auto merge of #105997 - RalfJung:immediate-abort, r=eholk
abort immediately on bad mem::zeroed/uninit

Now that we have non-unwinding panics, let's use them for these assertions. This re-establishes the property that `mem::uninitialized` and `mem::zeroed` will never unwind -- the earlier approach of causing panics here sometimes led to hard-to-debug segfaults when the surrounding code was not able to cope with the unexpected unwinding.

Cc `@bjorn3` I did not touch cranelift but I assume it needs a similar patch. However it has a `codegen_panic` abstraction that I did not want to touch since I didn't know how else it is used.
2022-12-25 20:51:37 +00:00
Guillaume Gomez
eb1ac04746 Migrate links-color.goml to functions 2022-12-25 20:14:40 +01:00
bors
298d763fc0 Auto merge of #106121 - RalfJung:miri, r=RalfJung
update Miri

Noteworthy PRs:
- https://github.com/rust-lang/miri/pull/2357
- https://github.com/rust-lang/miri/pull/2646
- https://github.com/rust-lang/miri/pull/2718
- https://github.com/rust-lang/miri/pull/2721
- https://github.com/rust-lang/miri/pull/2725
2022-12-25 17:39:06 +00:00
Matthias Krüger
d8874f259a fix more clippy::style findings
match_result_ok
obfuscated_if_else
single_char_add
writeln_empty_string
collapsible_match
iter_cloned_collect
unnecessary_mut_passed
2022-12-25 17:32:26 +01:00
Ralf Jung
c1b443de0e fix codegen test 2022-12-25 15:46:20 +01:00
bors
300aa907a6 Auto merge of #105701 - RedDocMD:bug-105634, r=cjgillot
Allow .. to be parsed as let initializer

.. and ..= are valid expressions, however when used in a let statement
it is not parsed.
Fixes #105634
2022-12-25 14:42:49 +00:00
bors
d8b48d450d Auto merge of #2739 - RalfJung:misc, r=RalfJung
enable some warnings that rustc bootstrap enables

also use cargo-install to install josh-proxy, since the docker version cannot access SSH keys (needed for pushing)
2022-12-25 13:21:26 +00:00
Ralf Jung
92b6562a25 enable some warnings that rustc bootstrap enables 2022-12-25 14:18:41 +01:00