Commit Graph

213332 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Guillaume Gomez
ddd9591a85 Use correct CSS pseudo-element selector 2022-12-23 19:30:44 +01: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
nils
659c218b3a
Rollup merge of #106067 - Nilstrieb:meta-cleanup, r=petrochenkov
A few metadata nits

Found while reading through the code. The `NOTE` is outdated now after #97376.
2022-12-23 18:02:16 +01:00
nils
de99a87926
Rollup merge of #106055 - compiler-errors:too-many-calls, r=estebank
Check arg expressions properly on error in `confirm_builtin_call`

Makes sure we don't regress diagnostic output when we have an expr error nested inside of a bad fn call: https://github.com/rust-lang/rust/pull/105973#issuecomment-1363152232

Fixes #106030
Fixes #105244
2022-12-23 18:02:15 +01:00
nils
9192874b29
Rollup merge of #106048 - fee1-dead-contrib:tidy-ci-continuation, r=jyn514
Run `tidy` in its own job in PR CI

This duplicates mingw-check into two jobs where one job runs `tidy` only while the other job does not. The tidy job will not cancel other jobs on failure.
2022-12-23 18:02:15 +01:00
nils
a8000516a6
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
Move tests

r? ``@petrochenkov``

* 6470 is an ancient LLVM compilation bug
* 22375 to typeck because of https://github.com/rust-lang/rust/pull/23013
2022-12-23 18:02:14 +01:00
nils
85d39ba646
Rollup merge of #105853 - jyn514:prepush-windows, r=Mark-Simulacrum
Make the pre-push script work on directories with spaces

As a secondary benefit, it's also a lot simpler.

cc `@caass` - would love to have a review if you have time :)
2022-12-23 18:02:13 +01:00
nils
fd5af8cc23
Rollup merge of #105661 - lcnr:evaluate-new, r=compiler-errors
implement the skeleton of the updated trait solver

cc ```@rust-lang/initiative-trait-system-refactor```

This is mostly following the architecture discussed in the types team meetup.

After discussing the desired changes for the trait solver, we encountered cyclic dependencies between them. Most notably between changing evaluate to be canonical and returning inference constraints. We cannot canonicalize evaluate without returning inference constraints due to coinductive cycles. However, caching inference constraints also relies on canonicalization. Implementing both of these changes at once in-place is not feasible.

This somewhat closely mirrors the current `evaluate` implementation with the following notable differences:
- it moves `project` into the core solver, allowing us to correctly deal with coinductive projections (will be required for implied bounds, perfect derive)
- it changes trait solver overflow to be non-fatal (required to backcompat breakage from changes to the iteration order of nested goals, deferred projection equality, generally very useful)
- it returns inference constraints and canonicalizes inputs and outputs (required for a lot things, most notably merging fulfill and evaluate, and deferred projection equality)
- it is implemented to work with lazy normalization

A lot of things aren't yet implemented, but the remaining FIXMEs should all be fairly self-contained and parallelizable. If the architecture looks correct and is what we want here, I would like to quickly merge this and then split the work.

r? ```@compiler-errors``` / ```@rust-lang/types``` :3
2022-12-23 18:02:13 +01:00
bors
c2ff8ad035 Auto merge of #105550 - gimbles:master, r=Nilstrieb
Use `DepKind` instead of `&'static str` in `QueryStackFrame`

`@rustbot` author

Fixes #105168
2022-12-23 16:57:21 +00:00
Jeremy Stucki
1174aacf59
Indicate anonymous lifetime 2022-12-23 15:59:53 +01:00
Ralf Jung
a48d2e1783 fix one more unaligned self.ptr, and add tests 2022-12-23 15:49:23 +01:00
Ralf Jung
d0f404d77a fix IntoIter::drop on high-alignment ZST 2022-12-23 15:18:18 +01:00
bors
62cc869245 Auto merge of #106053 - compiler-errors:incr-test-revision, r=Mark-Simulacrum
Take revision into account in non-incremental-mode `// incremental` tests

A UI test I added in #105983 confusingly [failed](https://github.com/rust-lang/rust/pull/106031#issuecomment-1362558067) in a merge because two different revisions raced with each other for the same incremental directory for a (non-incremental-mode, i.e. `src/test/ui`) UI test.

Let's take the revision name into account when generating an incremental directory so that other UI tests that combine `// incremental` and `// revisions` won't race and cause possible flakiness in CI.
2022-12-23 13:37:11 +00:00
Michal Nazarewicz
28162ad970 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-23 14:15:33 +01:00
gimbles
f8b30084ac Use DepKind instead of &str 2022-12-23 18:39:49 +05:30
Caio
d4344d2f91 Move tests 2022-12-23 08:05:12 -03:00
bors
14e2fe4039 Auto merge of #106033 - ChrisDenton:bump-cfg-if, r=Mark-Simulacrum
Remove old version of `cfg-if` by bumping `packed_simd_2` and `getrandom v0.2` versions

```console
> cargo update --package packed_simd_2 --package getrandom@0.2.0
    Updating crates.io index
    Removing cfg-if v0.1.10
    Updating getrandom v0.2.0 -> v0.2.8
    Updating packed_simd_2 v0.3.4 -> v0.3.8
```

`packed_simd_2` is only used as a dependency of `bytecount` which in turn is only used by `rustfmt`. I can't see any issue with the minor version bump.

The bigger jump is `getrandom@0.2.0` which is used by a number of things, but 0.2.8 is still semver compatible and there doesn't seem to be any worrying changes (see the [changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)). The only breaking change are the removal of XP, stdweb and CloudAbi support but these are not host targets and rustc lacks support for them in any case (stdweb development was [abandonded](https://rustsec.org/advisories/RUSTSEC-2020-0056.html), XP is [tier 3 and `no_std`](https://doc.rust-lang.org/beta/rustc/platform-support.html#tier-3) and CloubAbi is [no longer supported](https://github.com/rust-lang/rust/pull/78439)).

Note that this doesn't affect `getrandom@0.1.16` which is what std depends on and which is already using the latest version of `cfg-if` (besides, there are already plans to remove that entirely).
2022-12-23 10:46:58 +00:00
Ayush Singh
51fe24873f
Use u32 methods instead of manual shifting
Switch to `to_be_bytes()` and `from_be_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-23 16:08:23 +05:30
Nikita Popov
a0b9c5a9bf 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-23 09:40:24 +01:00
Michael Goulet
69abe4458e Add tests 2022-12-23 04:12:30 +00:00