Commit Graph

213410 Commits

Author SHA1 Message Date
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
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
Ralf Jung
fed7e2c935 use cargo-install to install josh-proxy 2022-12-25 14:16:10 +01:00
bors
d9ee0f468f 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`
2022-12-25 04:26:14 +00:00
bors
40d7940bda Auto merge of #106132 - kadiwa4:typos, r=compiler-errors
Fix some typos
2022-12-25 01:44:28 +00:00
KaDiWa
7b371d2ad9
fix some typos 2022-12-25 00:43:50 +01:00
bors
3468044521 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
2022-12-24 23:22:42 +00:00
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
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