Commit Graph

213517 Commits

Author SHA1 Message Date
bors
46160e6fa9 Auto merge of #106110 - GuillaumeGomez:toggle-line-background, r=notriddle
Migrate toggle-line-inner background to CSS variable

r? `@notriddle`
2022-12-24 20:23:45 +00:00
bors
7e4f4660eb 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
2022-12-24 17:14:26 +00:00
Gimbles
93ebf46526
Update README.md 2022-12-24 21:18:35 +05:30
Gimbles
d403d1af6d
Update README.md 2022-12-24 21:16:14 +05:30
Gimbles
a3cf58533f
Bold 2022-12-24 21:02:15 +05:30
bors
f5c3dfdbbf Auto merge of #105085 - oli-obk:stop_promoting_all_the_things, r=RalfJung
Stop promoting all the things

fixes #91009

r? `@RalfJung`
2022-12-24 14:00:37 +00:00
bors
8766bbdc30 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
2022-12-24 10:46:43 +00:00
Ralf Jung
15f72dd29d add tracking issue, fix typo 2022-12-24 10:47:31 +01:00
bors
d23554fae8 Auto merge of #2738 - RalfJung:rustup, r=RalfJung
Rustup
2022-12-24 09:41:11 +00:00
Ralf Jung
e52e0d8557 fix warnings 2022-12-24 10:40:50 +01:00
Ralf Jung
9c01e9f7f5 Merge from rustc 2022-12-24 10:12:14 +01:00
Ralf Jung
6fb314ed7d add lib tests for vec::IntoIter alignment issues 2022-12-24 10:08:27 +01:00
Ralf Jung
0c14ad4d9f Preparing for merge from rustc 2022-12-24 09:58:29 +01:00
bors
245357f619 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.
2022-12-24 08:13:31 +00:00
Matthias Krüger
750bf73aea
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
2022-12-24 08:53:48 +01:00
Matthias Krüger
09ee7048fd
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).
2022-12-24 08:53:48 +01:00
Matthias Krüger
edb2b71fdb
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.
2022-12-24 08:53:48 +01:00
Matthias Krüger
74a9b08517
Rollup merge of #106032 - mcha-forks:lfs-musl-fix, r=thomcc
std: only use LFS function on glibc

see #94173 and commit 27011b4185.
2022-12-24 08:53:47 +01:00
Matthias Krüger
a952b61e94
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
2022-12-24 08:53:47 +01:00
Matthias Krüger
9ae98804e5
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
2022-12-24 08:53:46 +01:00
Ralf Jung
26e01397bf ignore some targets 2022-12-24 08:44:11 +01:00
bors
5e8bab91d3 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
2022-12-24 07:35:23 +00:00
Guillaume Gomez
457f6c8332 Extend GUI test for toggle-line background 2022-12-24 08:29:17 +01:00
Guillaume Gomez
518ca9c16f Migrate toggle-line-inner background to CSS variable 2022-12-24 08:28:59 +01:00
Michael Howell
f451717157 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
2022-12-23 22:55:04 -07:00
bors
4f4d0586ad 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>
2022-12-24 04:54:39 +00:00
bors
6c0c6d6eb3 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
2022-12-24 01:42:00 +00:00
Joshua Nelson
70a0e0a277 Remove ancient and outdated references to config.mk 2022-12-23 19:08:53 -06:00
Joshua Nelson
1bd1b25be8 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.
2022-12-23 19:08:53 -06:00
Joshua Nelson
7dae1b0b07 Add detail about dependencies from the dev-guide
The goal is to remove this altogether from the dev-guide once this PR is merged.
2022-12-23 19:08:53 -06:00
Joshua Nelson
a06e5decaf 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.
2022-12-23 19:03:50 -06:00
Esteban Küber
ea7de0d485 Do not use hir_ty_to_ty 2022-12-23 16:45:16 -08:00
Matthias Krüger
da4be75b53
Rollup merge of #106102 - compiler-errors:oops-triagebot-broke, r=scottmcm
Fix `triagebot.toml`
2022-12-24 00:31:43 +01:00
Matthias Krüger
2ace0c6402
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.
2022-12-24 00:31:43 +01:00
Matthias Krüger
cc0dc028fc
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``
2022-12-24 00:31:43 +01:00
Matthias Krüger
61fadf805f
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``
2022-12-24 00:31:42 +01:00
Matthias Krüger
ae6107070d
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.
2022-12-24 00:31:41 +01:00
Matthias Krüger
d23cb738d2
Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
rustc: Remove needless lifetimes
2022-12-24 00:31:41 +01:00
Matthias Krüger
e08dd9d998
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``
2022-12-24 00:31:40 +01:00
Michael Goulet
e97e55f87b Fix triagebot.toml 2022-12-23 23:28:02 +00:00
Scott McMurray
4cb7bd36d7 Codegen test for derived < on trivial newtype [TEST ONLY] 2022-12-23 15:14:54 -08:00
Esteban Küber
12fd9011b8 Verify receiver is of self: Pin<&mut Self> 2022-12-23 15:13:04 -08:00
bors
2c3f284003 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`
2022-12-23 23:01:08 +00:00
Esteban Küber
a929316aed Suggest .clone() on method call move errors 2022-12-23 12:49:20 -08:00
bors
af3e06f1bf 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
2022-12-23 19:46:36 +00:00
Michael Howell
1c05d4b02a 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.
2022-12-23 12:02:23 -07:00
Ben Kimock
81fe37a900 Mention and number the components of a race in the order the interpreter sees them 2022-12-23 13:45:43 -05:00
Guillaume Gomez
ddd9591a85 Use correct CSS pseudo-element selector 2022-12-23 19:30:44 +01:00
Esteban Küber
c79db9c5e5 Suggest Pin::as_mut when encountering borrow error 2022-12-23 09:59:39 -08:00
Weihang Lo
5d3c22dae5
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)
2022-12-23 17:05:41 +00:00