Commit Graph

213427 Commits

Author SHA1 Message Date
yukang
90753de099 fix #105788, Remove unreasonable help message for auto trait 2022-12-27 12:56:40 +08: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
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
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