]> git.lizzy.rs Git - rust.git/log
rust.git
17 months agoRollup merge of #106066 - JohnTitor:rm-bindings-after-at-fixme, r=compiler-errors
Matthias Krüger [Tue, 27 Dec 2022 15:37:48 +0000 (16:37 +0100)]
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>
17 months agoRollup merge of #105994 - JohnTitor:issue-99647, r=compiler-errors
Matthias Krüger [Tue, 27 Dec 2022 15:37:47 +0000 (16:37 +0100)]
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>
17 months agoRollup merge of #105817 - chenyukang:yukang/fix-105788-sugg-for-auto-trait, r=TaKO8Ki
Matthias Krüger [Tue, 27 Dec 2022 15:37:47 +0000 (16:37 +0100)]
Rollup merge of #105817 - chenyukang:yukang/fix-105788-sugg-for-auto-trait, r=TaKO8Ki

Remove unreasonable help message for auto trait

Fixes #105788

17 months agoAuto merge of #106177 - matthiaskrgr:rollup-oe7z8ix, r=matthiaskrgr
bors [Tue, 27 Dec 2022 10:23:32 +0000 (10:23 +0000)]
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

17 months agoRollup merge of #106174 - GuillaumeGomez:rm-unused-ayu-css-rules, r=notriddle
Matthias Krüger [Tue, 27 Dec 2022 07:57:48 +0000 (08:57 +0100)]
Rollup merge of #106174 - GuillaumeGomez:rm-unused-ayu-css-rules, r=notriddle

Remove unused empty CSS rules in ayu theme

r? `@notriddle`

17 months agoRollup merge of #106150 - estebank:issue-39232, r=compiler-errors
Matthias Krüger [Tue, 27 Dec 2022 07:57:48 +0000 (08:57 +0100)]
Rollup merge of #106150 - estebank:issue-39232, r=compiler-errors

Detect when method call on LHS might be shadowed

Address #39232.

17 months agoRollup merge of #106146 - kadiwa4:readme-x-py, r=jyn514
Matthias Krüger [Tue, 27 Dec 2022 07:57:46 +0000 (08:57 +0100)]
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.

17 months agoRollup merge of #105515 - estebank:issue-104141, r=oli-obk
Matthias Krüger [Tue, 27 Dec 2022 07:57:45 +0000 (08:57 +0100)]
Rollup merge of #105515 - estebank:issue-104141, r=oli-obk

Account for macros in const generics

Fix #104141.

17 months agoAuto merge of #106095 - estebank:pin-mut-reborrow, r=compiler-errors
bors [Tue, 27 Dec 2022 07:31:42 +0000 (07:31 +0000)]
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>`.

17 months agofix #105788, Remove unreasonable help message for auto trait
yukang [Sat, 17 Dec 2022 00:20:46 +0000 (08:20 +0800)]
fix #105788, Remove unreasonable help message for auto trait

17 months agoAuto merge of #106166 - jyn514:print-paths, r=Mark-Simulacrum
bors [Tue, 27 Dec 2022 04:44:42 +0000 (04:44 +0000)]
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.

17 months agoRemove unused empty CSS rules in ayu theme
Guillaume Gomez [Tue, 27 Dec 2022 03:57:30 +0000 (04:57 +0100)]
Remove unused empty CSS rules in ayu theme

17 months agoFix panic on `x build --help --verbose`
Joshua Nelson [Mon, 26 Dec 2022 23:53:39 +0000 (17:53 -0600)]
Fix panic on `x build --help --verbose`

This also makes the panic message a little more informative in case it
happens again.

17 months agoAuto merge of #103020 - lyming2007:issue-102598-fix, r=jackh726
bors [Mon, 26 Dec 2022 21:50:05 +0000 (21:50 +0000)]
Auto merge of #103020 - lyming2007:issue-102598-fix, r=jackh726

error parsing lifetime following by Sized and message + between them

Fixes #102598

17 months agoreview comments
Esteban Küber [Mon, 26 Dec 2022 21:35:35 +0000 (13:35 -0800)]
review comments

17 months agofix rebase
Esteban Küber [Mon, 26 Dec 2022 20:47:08 +0000 (12:47 -0800)]
fix rebase

17 months agoFix suggestion when there are arguments in the method
Esteban Küber [Mon, 26 Dec 2022 20:29:16 +0000 (12:29 -0800)]
Fix suggestion when there are arguments in the method

17 months agoTweak wording
Esteban Küber [Mon, 26 Dec 2022 20:00:22 +0000 (12:00 -0800)]
Tweak wording

17 months agoDetect when method call on LHS might be shadowed
Esteban Küber [Mon, 26 Dec 2022 05:50:30 +0000 (21:50 -0800)]
Detect when method call on LHS might be shadowed

Address #39232.

17 months agoAuto merge of #106156 - fee1-dead-contrib:rollup-3ir0951, r=fee1-dead
bors [Mon, 26 Dec 2022 18:36:10 +0000 (18:36 +0000)]
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

17 months agoRollup merge of #106153 - GuillaumeGomez:search-tabs-headers, r=notriddle
fee1-dead [Mon, 26 Dec 2022 16:34:53 +0000 (00:34 +0800)]
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`

17 months agoRollup merge of #106151 - TaKO8Ki:remove-unused-imports, r=jackh726
fee1-dead [Mon, 26 Dec 2022 16:34:53 +0000 (00:34 +0800)]
Rollup merge of #106151 - TaKO8Ki:remove-unused-imports, r=jackh726

Remove unused imports

17 months agoAuto merge of #106149 - notriddle:notriddle/src-sidebar-toggle-pos, r=GuillaumeGomez
bors [Mon, 26 Dec 2022 15:46:53 +0000 (15:46 +0000)]
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)

17 months agoAdd GUI test for search tab headers
Guillaume Gomez [Mon, 26 Dec 2022 12:09:40 +0000 (13:09 +0100)]
Add GUI test for search tab headers

17 months agoFix missing renaming for #titles into #search-tabs
Guillaume Gomez [Mon, 26 Dec 2022 12:09:23 +0000 (13:09 +0100)]
Fix missing renaming for #titles into #search-tabs

17 months agoAuto merge of #103828 - cassaundra:fix-format-args-span2, r=cjgillot
bors [Mon, 26 Dec 2022 12:03:47 +0000 (12:03 +0000)]
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).

17 months agoAuto merge of #105605 - inquisitivecrystal:attr-validation, r=cjgillot
bors [Mon, 26 Dec 2022 09:06:51 +0000 (09:06 +0000)]
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`

17 months agoremove unused imports
Takayuki Maeda [Mon, 26 Dec 2022 06:01:20 +0000 (15:01 +0900)]
remove unused imports

17 months agorustdoc: clean up src sidebar toggle position CSS
Michael Howell [Mon, 26 Dec 2022 05:35:34 +0000 (22:35 -0700)]
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.

17 months agoRemove redundant clone suggestion
Esteban Küber [Mon, 26 Dec 2022 01:16:54 +0000 (17:16 -0800)]
Remove redundant clone suggestion

17 months agoCreate new inference context
Esteban Küber [Mon, 26 Dec 2022 00:51:11 +0000 (16:51 -0800)]
Create new inference context

17 months agoAuto merge of #106143 - matthiaskrgr:rollup-3kpy1dc, r=matthiaskrgr
bors [Sun, 25 Dec 2022 23:47:11 +0000 (23:47 +0000)]
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

17 months agoreadme: update section on how to run x.py
KaDiWa [Sun, 25 Dec 2022 23:33:32 +0000 (00:33 +0100)]
readme: update section on how to run x.py

17 months agoRollup merge of #106140 - GuillaumeGomez:migrate-links-color, r=notriddle
Matthias Krüger [Sun, 25 Dec 2022 21:15:01 +0000 (22:15 +0100)]
Rollup merge of #106140 - GuillaumeGomez:migrate-links-color, r=notriddle

Migrate links-color.goml to functions

r? `@notriddle`

17 months agoRollup merge of #106137 - matthiaskrgr:clippy_style, r=jyn514
Matthias Krüger [Sun, 25 Dec 2022 21:15:00 +0000 (22:15 +0100)]
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`

17 months agoRollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
Matthias Krüger [Sun, 25 Dec 2022 21:15:00 +0000 (22:15 +0100)]
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.

17 months agoRollup merge of #105375 - WaffleLapkin:docfix, r=cjgillot
Matthias Krüger [Sun, 25 Dec 2022 21:14:59 +0000 (22:14 +0100)]
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)

17 months agoAuto merge of #105997 - RalfJung:immediate-abort, r=eholk
bors [Sun, 25 Dec 2022 20:51:37 +0000 (20:51 +0000)]
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.

17 months agoMigrate links-color.goml to functions
Guillaume Gomez [Sun, 25 Dec 2022 19:14:40 +0000 (20:14 +0100)]
Migrate links-color.goml to functions

17 months agoAuto merge of #106121 - RalfJung:miri, r=RalfJung
bors [Sun, 25 Dec 2022 17:39:06 +0000 (17:39 +0000)]
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

17 months agofix more clippy::style findings
Matthias Krüger [Sun, 25 Dec 2022 15:42:35 +0000 (16:42 +0100)]
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

17 months agofix codegen test
Ralf Jung [Sun, 25 Dec 2022 14:46:20 +0000 (15:46 +0100)]
fix codegen test

17 months agoAuto merge of #105701 - RedDocMD:bug-105634, r=cjgillot
bors [Sun, 25 Dec 2022 14:42:49 +0000 (14:42 +0000)]
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

17 months agoAuto merge of #2739 - RalfJung:misc, r=RalfJung
bors [Sun, 25 Dec 2022 13:21:26 +0000 (13:21 +0000)]
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)

17 months agoenable some warnings that rustc bootstrap enables
Ralf Jung [Sun, 25 Dec 2022 13:18:41 +0000 (14:18 +0100)]
enable some warnings that rustc bootstrap enables

17 months agouse cargo-install to install josh-proxy
Ralf Jung [Sun, 25 Dec 2022 13:16:10 +0000 (14:16 +0100)]
use cargo-install to install josh-proxy

17 months agoAuto merge of #106112 - RalfJung:into-iter, r=thomcc
bors [Sun, 25 Dec 2022 04:26:14 +0000 (04:26 +0000)]
Auto merge of #106112 - RalfJung:into-iter, r=thomcc

add lib tests for vec::IntoIter alignment issues

This adds non-Miri tests for the issue fixed in https://github.com/rust-lang/rust/pull/106084

r? `@thomcc`

17 months agoAuto merge of #106132 - kadiwa4:typos, r=compiler-errors
bors [Sun, 25 Dec 2022 01:44:28 +0000 (01:44 +0000)]
Auto merge of #106132 - kadiwa4:typos, r=compiler-errors

Fix some typos

17 months agofix some typos
KaDiWa [Sat, 24 Dec 2022 23:43:50 +0000 (00:43 +0100)]
fix some typos

17 months agoAuto merge of #106123 - gimbles:patch-1, r=jyn
bors [Sat, 24 Dec 2022 23:22:42 +0000 (23:22 +0000)]
Auto merge of #106123 - gimbles:patch-1, r=jyn

Make note bold

~~this seems to be have occurred in a recent edit, i clearly remember just note being bold~~

the entire note was bold

17 months agoAuto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddle
bors [Sat, 24 Dec 2022 20:23:45 +0000 (20:23 +0000)]
Auto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddle

Migrate toggle-line-inner background to CSS variable

r? `@notriddle`

17 months agoAuto merge of #104977 - RalfJung:ptr-from-ref, r=dtolnay
bors [Sat, 24 Dec 2022 17:14:26 +0000 (17:14 +0000)]
Auto merge of #104977 - RalfJung:ptr-from-ref, r=dtolnay

add ptr::from_{ref,mut}

We have methods to avoid almost all `as` casts around raw pointer handling, except for the initial cast from reference to raw pointer. These new methods close that gap.

(I also moved `null_mut` next to `null` to keep the file consistently organized.)

r? libs-api

Tracking issue: https://github.com/rust-lang/rust/issues/106116

17 months agoUpdate README.md
Gimbles [Sat, 24 Dec 2022 15:48:35 +0000 (21:18 +0530)]
Update README.md

17 months agoUpdate README.md
Gimbles [Sat, 24 Dec 2022 15:46:14 +0000 (21:16 +0530)]
Update README.md

17 months agoBold
Gimbles [Sat, 24 Dec 2022 15:32:15 +0000 (21:02 +0530)]
Bold

17 months agoAuto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJung
bors [Sat, 24 Dec 2022 14:00:37 +0000 (14:00 +0000)]
Auto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJung

Stop promoting all the things

fixes #91009

r? `@RalfJung`

17 months agoAuto merge of #106111 - matthiaskrgr:rollup-nnpoe5h, r=matthiaskrgr
bors [Sat, 24 Dec 2022 10:46:43 +0000 (10:46 +0000)]
Auto merge of #106111 - matthiaskrgr:rollup-nnpoe5h, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #105465 (Improve top-level docs)
 - #105872 (Suggest remove last method call when type coerce with expected  type)
 - #106032 (std: only use LFS function on glibc)
 - #106078 (Provide more context on FileCheck failures)
 - #106100 (Codegen test for derived `<` on trivial newtype [TEST ONLY])
 - #106109 (rustdoc: make line number CSS for doc comment and scraped the same)

Failed merges:

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

17 months agoadd tracking issue, fix typo
Ralf Jung [Sat, 24 Dec 2022 09:47:31 +0000 (10:47 +0100)]
add tracking issue, fix typo

17 months agoAuto merge of #2738 - RalfJung:rustup, r=RalfJung
bors [Sat, 24 Dec 2022 09:41:11 +0000 (09:41 +0000)]
Auto merge of #2738 - RalfJung:rustup, r=RalfJung

Rustup

17 months agofix warnings
Ralf Jung [Sat, 24 Dec 2022 09:12:28 +0000 (10:12 +0100)]
fix warnings

17 months agoMerge from rustc
Ralf Jung [Sat, 24 Dec 2022 09:12:14 +0000 (10:12 +0100)]
Merge from rustc

17 months agoadd lib tests for vec::IntoIter alignment issues
Ralf Jung [Sat, 24 Dec 2022 08:09:34 +0000 (09:09 +0100)]
add lib tests for vec::IntoIter alignment issues

17 months agoPreparing for merge from rustc
Ralf Jung [Sat, 24 Dec 2022 08:58:29 +0000 (09:58 +0100)]
Preparing for merge from rustc

17 months agoAuto merge of #2646 - saethlin:data-race-spans, r=RalfJung
bors [Sat, 24 Dec 2022 08:13:31 +0000 (08:13 +0000)]
Auto merge of #2646 - saethlin:data-race-spans, r=RalfJung

Data race spans

Fixes https://github.com/rust-lang/miri/issues/2205

This adds output to data race errors very similar to the spans we emit for Stacked Borrows errors. For example, from our test suite:
```
help: The Atomic Load on thread `<unnamed>` is here
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:23:13
   |
23 | ...   (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between Atomic Load on thread `<unnamed>` and Write o...
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help: The Write on thread `<unnamed>` is here
  --> tests/fail/data_race/atomic_read_na_write_race1.rs:19:13
   |
19 |             *(c.0 as *mut usize) = 32;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^```
```

Because of https://github.com/rust-lang/miri/pull/2647 this comes without a perf regression, according to our benchmarks.

17 months agoRollup merge of #106109 - notriddle:notriddle/source-lines, r=GuillaumeGomez
Matthias Krüger [Sat, 24 Dec 2022 07:53:48 +0000 (08:53 +0100)]
Rollup merge of #106109 - notriddle:notriddle/source-lines, r=GuillaumeGomez

rustdoc: make line number CSS for doc comment and scraped the same

![image](https://user-images.githubusercontent.com/1593513/209423540-2657bb43-e6d7-4af3-9cb3-c790a8dd8cd9.png)

Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling

Preview: http://notriddle.com/notriddle-rustdoc-demos/source-lines/test_dingus/fn.test.html

17 months agoRollup merge of #106100 - scottmcm:derived-less-than-test, r=compiler-errors
Matthias Krüger [Sat, 24 Dec 2022 07:53:48 +0000 (08:53 +0100)]
Rollup merge of #106100 - scottmcm:derived-less-than-test, r=compiler-errors

Codegen test for derived `<` on trivial newtype [TEST ONLY]

I originally wrote this for #106065, but the libcore changes there aren't necessarily a win.

So I pulled out this test to be its own PR since it's important (see https://github.com/rust-lang/rust/pull/105840#discussion_r1056030324) and well-intentioned changes to core or the derive could accidentally break it without that being obvious (other than by massive unexplained perf changes).

17 months agoRollup merge of #106078 - nikic:filecheck-context, r=Mark-Simulacrum
Matthias Krüger [Sat, 24 Dec 2022 07:53:48 +0000 (08:53 +0100)]
Rollup merge of #106078 - nikic:filecheck-context, r=Mark-Simulacrum

Provide more context on FileCheck failures

FileCheck provides 5 lines of context by default. This is often insufficient to analyze failures that happen in CI. Increase the amount of context to 100 lines.

17 months agoRollup merge of #106032 - mcha-forks:lfs-musl-fix, r=thomcc
Matthias Krüger [Sat, 24 Dec 2022 07:53:47 +0000 (08:53 +0100)]
Rollup merge of #106032 - mcha-forks:lfs-musl-fix, r=thomcc

std: only use LFS function on glibc

see #94173 and commit 27011b4185f5341e579d2a02cabd3dc7d7aa7149.

17 months agoRollup merge of #105872 - chenyukang:yukang/fix-105494-remove-method-call, r=eholk
Matthias Krüger [Sat, 24 Dec 2022 07:53:47 +0000 (08:53 +0100)]
Rollup merge of #105872 - chenyukang:yukang/fix-105494-remove-method-call, r=eholk

Suggest remove last method call when type coerce with expected  type

Fixes #105494

17 months agoRollup merge of #105465 - jyn514:docs, r=Mark-Simulacrum
Matthias Krüger [Sat, 24 Dec 2022 07:53:46 +0000 (08:53 +0100)]
Rollup merge of #105465 - jyn514:docs, r=Mark-Simulacrum

Improve top-level docs

See a detailed explanation in the commit messages. This is a companion PR to https://github.com/rust-lang/rustc-dev-guide/pull/1528.

* Link to other resources instead of inlining their information
* Remove ancient and outdated reference to `config.mk`
* Suggest `profile = "user"` in the README
* Add detail about dependencies from the dev-guide
* Link to CONTRIBUTING.md instead of rustc-dev-guide in the main readme
* Link to `std-dev-guide` in CONTRIBUTING.md

17 months agoignore some targets
Ralf Jung [Sat, 24 Dec 2022 07:44:11 +0000 (08:44 +0100)]
ignore some targets

17 months agoAuto merge of #106081 - mina86:c, r=Mark-Simulacrum
bors [Sat, 24 Dec 2022 07:35:23 +0000 (07:35 +0000)]
Auto merge of #106081 - mina86:c, r=Mark-Simulacrum

char: µoptimise UTF-16 surrogates decoding

According to Godbolt¹, on x86_64 using binary and produces slightly
better code than using subtraction.  Readability of both is pretty
much equivalent so might just as well use the shorter option.

¹ https://rust.godbolt.org/z/9jM3ejbMx

17 months agoExtend GUI test for toggle-line background
Guillaume Gomez [Sat, 24 Dec 2022 07:29:17 +0000 (08:29 +0100)]
Extend GUI test for toggle-line background

17 months agoMigrate toggle-line-inner background to CSS variable
Guillaume Gomez [Sat, 24 Dec 2022 07:28:59 +0000 (08:28 +0100)]
Migrate toggle-line-inner background to CSS variable

17 months agorustdoc: make line number CSS for doc comment and scraped the same
Michael Howell [Sat, 24 Dec 2022 05:55:04 +0000 (22:55 -0700)]
rustdoc: make line number CSS for doc comment and scraped the same

Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling

17 months agoAuto merge of #105893 - Ayush1325:remote-test-server-improve, r=Mark-Simulacrum
bors [Sat, 24 Dec 2022 04:54:39 +0000 (04:54 +0000)]
Auto merge of #105893 - Ayush1325:remote-test-server-improve, r=Mark-Simulacrum

Use u32 methods instead of manual shifting

Switch to `to_le_bytes()` and `from_le_bytes()` instead of manual shifting

This was suggested [`here`](https://github.com/rust-lang/rust/pull/105145#discussion_r1051418964)

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
17 months agoAuto merge of #106103 - matthiaskrgr:rollup-8xe9ddz, r=matthiaskrgr
bors [Sat, 24 Dec 2022 01:42:00 +0000 (01:42 +0000)]
Auto merge of #106103 - matthiaskrgr:rollup-8xe9ddz, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #105970 (docs/test: add UI test and long-form error docs for E0462)
 - #105975 (rustc: Remove needless lifetimes)
 - #106069 (rustdoc: use a more evocative name for CSS/JS `#titles`)
 - #106084 (fix vec::IntoIter::drop on high-alignment ZST)
 - #106091 (Use correct CSS pseudo-element selector)
 - #106093 (rustdoc: remove no-op CSS from `.docblock-short`)
 - #106102 (Fix `triagebot.toml`)

Failed merges:

 - #106028 (docs/test: add UI test and long-form error docs for `E0461`)

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

17 months agoRemove ancient and outdated references to `config.mk`
Joshua Nelson [Sat, 24 Dec 2022 01:03:51 +0000 (19:03 -0600)]
Remove ancient and outdated references to `config.mk`

17 months agoSuggest `profile = "user"` in the README
Joshua Nelson [Sat, 24 Dec 2022 01:03:50 +0000 (19:03 -0600)]
Suggest `profile = "user"` in the README

This sets several useful defaults, like `extended = true`, and gives us a path forward for changing
global defaults without breaking distros.

17 months agoAdd detail about dependencies from the dev-guide
Joshua Nelson [Sat, 24 Dec 2022 01:03:50 +0000 (19:03 -0600)]
Add detail about dependencies from the dev-guide

The goal is to remove this altogether from the dev-guide once this PR is merged.

17 months agoLink to other resources instead of inlining their information
Joshua Nelson [Sat, 24 Dec 2022 01:03:50 +0000 (19:03 -0600)]
Link to other resources instead of inlining their information

The other places are more accurate and up-to-date.

- Link to `std-dev-guide` in CONTRIBUTING.md

  Thom and Mara said the guide is in reasonably good shape, and it's tailored more closely to people working on the standard library.

- Link to CONTRIBUTING.md instead of rustc-dev-guide in the main readme

  CONTRIBUTING.md has more information and also links the std-dev-guide.

- Link to forge for the list of tested platforms; the one in the readme
  was hopelessly out of date.

17 months agoDo not use `hir_ty_to_ty`
Esteban Küber [Sat, 24 Dec 2022 00:40:22 +0000 (16:40 -0800)]
Do not use `hir_ty_to_ty`

17 months agoRollup merge of #106102 - compiler-errors:oops-triagebot-broke, r=scottmcm
Matthias Krüger [Fri, 23 Dec 2022 23:31:43 +0000 (00:31 +0100)]
Rollup merge of #106102 - compiler-errors:oops-triagebot-broke, r=scottmcm

Fix `triagebot.toml`

17 months agoRollup merge of #106093 - notriddle:notriddle/docblock-short-overflow, r=GuillaumeGomez
Matthias Krüger [Fri, 23 Dec 2022 23:31:43 +0000 (00:31 +0100)]
Rollup merge of #106093 - notriddle:notriddle/docblock-short-overflow, r=GuillaumeGomez

rustdoc: remove no-op CSS from `.docblock-short`

The rules `overflow:hidden` and `text-overflow:ellipses` only have an effect if overflow occurs, which cannot happen because it will just line wrap instead.

These rules definitely became obsolete by https://github.com/rust-lang/rust/pull/77699, when the stylesheet was decidedly changed to have line wrapping in short docblocks, but given the bug it was fixing, this probably got broken earlier.

17 months agoRollup merge of #106091 - GuillaumeGomez:correct-css-pseudo-element, r=notriddle
Matthias Krüger [Fri, 23 Dec 2022 23:31:43 +0000 (00:31 +0100)]
Rollup merge of #106091 - GuillaumeGomez:correct-css-pseudo-element, r=notriddle

Use correct CSS pseudo-element selector

Pseudo-element should use "::" to not be confused with pseudo selectors (nice explanation here: https://css-tricks.com/to-double-colon-or-not-do-double-colon/).

r? ``@notriddle``

17 months agoRollup merge of #106084 - RalfJung:into-iter, r=thomcc
Matthias Krüger [Fri, 23 Dec 2022 23:31:42 +0000 (00:31 +0100)]
Rollup merge of #106084 - RalfJung:into-iter, r=thomcc

fix vec::IntoIter::drop on high-alignment ZST

This fixes a soundness bug: IntoIter would call `drop_in_place` on an insufficiently aligned pointer. So if a ZST with alignment greater 1 had drop glue, that would be called with an unaligned reference. Since https://github.com/rust-lang/rust/pull/103957, Miri checks alignment even if the type does not have drop glue, which is how this bug was found.

r? ``@thomcc``

17 months agoRollup merge of #106069 - notriddle:notriddle/search-tabs, r=GuillaumeGomez
Matthias Krüger [Fri, 23 Dec 2022 23:31:41 +0000 (00:31 +0100)]
Rollup merge of #106069 - notriddle:notriddle/search-tabs, r=GuillaumeGomez

rustdoc: use a more evocative name for CSS/JS `#titles`

This renames the ID, which is only used in search results, to `#search-tabs`. Also changes the `.count` to a span, so it doesn't need its display mode to be overridden.

17 months agoRollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
Matthias Krüger [Fri, 23 Dec 2022 23:31:41 +0000 (00:31 +0100)]
Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk

rustc: Remove needless lifetimes

17 months agoRollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomez
Matthias Krüger [Fri, 23 Dec 2022 23:31:40 +0000 (00:31 +0100)]
Rollup merge of #105970 - Ezrashaw:add-docs+test-e0462, r=GuillaumeGomez

docs/test: add UI test and long-form error docs for E0462

Another UI test/ docs combo.

r? ``@GuillaumeGomez``

17 months agoFix triagebot.toml
Michael Goulet [Fri, 23 Dec 2022 23:28:02 +0000 (23:28 +0000)]
Fix triagebot.toml

17 months agoCodegen test for derived `<` on trivial newtype [TEST ONLY]
Scott McMurray [Thu, 22 Dec 2022 21:44:51 +0000 (13:44 -0800)]
Codegen test for derived `<` on trivial newtype [TEST ONLY]

17 months agoVerify receiver is of `self: Pin<&mut Self>`
Esteban Küber [Fri, 23 Dec 2022 23:13:04 +0000 (15:13 -0800)]
Verify receiver is of `self: Pin<&mut Self>`

17 months agoAuto merge of #106088 - weihanglo:update-cargo, r=weihanglo
bors [Fri, 23 Dec 2022 23:01:08 +0000 (23:01 +0000)]
Auto merge of #106088 - weihanglo:update-cargo, r=weihanglo

Update cargo

7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000

- fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478)
- Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503)
- Don't scrape examples from library targets by default (rust-lang/cargo#11499)
- Stabilize terminal-width (rust-lang/cargo#11494)
- Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501)
- Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477)
- Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)

r? `@ghost`

17 months agoSuggest `.clone()` on method call move errors
Esteban Küber [Fri, 23 Dec 2022 20:44:47 +0000 (12:44 -0800)]
Suggest `.clone()` on method call move errors

17 months agoAuto merge of #106087 - Nilstrieb:rollup-2m3nies, r=Nilstrieb
bors [Fri, 23 Dec 2022 19:46:36 +0000 (19:46 +0000)]
Auto merge of #106087 - Nilstrieb:rollup-2m3nies, r=Nilstrieb

Rollup of 6 pull requests

Successful merges:

 - #105661 (implement the skeleton of the updated trait solver)
 - #105853 (Make the pre-push script work on directories with spaces)
 - #106043 (Move tests)
 - #106048 (Run `tidy` in its own job in PR CI)
 - #106055 (Check arg expressions properly on error in `confirm_builtin_call`)
 - #106067 (A few metadata nits)

Failed merges:

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

17 months agorustdoc: remove no-op CSS from `.docblock-short`
Michael Howell [Fri, 23 Dec 2022 18:42:47 +0000 (11:42 -0700)]
rustdoc: remove no-op CSS from `.docblock-short`

The rules `overflow:hidden` and `text-overflow:ellipses` only have an
effect if overflow occurs, which cannot happen because it will just line
wrap instead.

These rules definitely became obsolete by
https://github.com/rust-lang/rust/pull/77699, when the stylesheet was
decidedly changed to have line wrapping in short docblocks, but given the
bug it was fixing, this probably got broken earlier.

17 months agoMention and number the components of a race in the order the interpreter sees them
Ben Kimock [Fri, 23 Dec 2022 18:45:43 +0000 (13:45 -0500)]
Mention and number the components of a race in the order the interpreter sees them

17 months agoUse correct CSS pseudo-element selector
Guillaume Gomez [Fri, 23 Dec 2022 18:30:44 +0000 (19:30 +0100)]
Use correct CSS pseudo-element selector

17 months agoSuggest `Pin::as_mut` when encountering borrow error
Esteban Küber [Fri, 23 Dec 2022 17:59:39 +0000 (09:59 -0800)]
Suggest `Pin::as_mut` when encountering borrow error

17 months agoUpdate cargo
Weihang Lo [Fri, 23 Dec 2022 17:05:07 +0000 (17:05 +0000)]
Update cargo

7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44
2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000

- fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478)
- Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503)
- Don't scrape examples from library targets by default (rust-lang/cargo#11499)
- Stabilize terminal-width (rust-lang/cargo#11494)
- Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501)
- Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477)
- Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)