Commit Graph

197847 Commits

Author SHA1 Message Date
Eric Huss
757913df08 bootstrap: Don't allow rustfmt to fail on dist.
When running `x.py dist`, rustfmt was being allowed to fail when
missing-tools is true. This isn't much of an issue in practice
since other CI jobs will fail if rustfmt fails. This code was just
leftovers from when rustfmt was tracked in toolstate, and this removes
it to make it clear that it no longer works that way.
2022-08-20 22:24:31 -07:00
Eric Huss
45e2fc3d4f Remove Steve from toolstate failure notices.
They have not been involved in a while.
2022-08-20 22:11:27 -07:00
Eric Huss
3b1b35bf03 Remove rustfmt from publish_toolstate
Rustfmt is no longer tracked in toolstate, so this isn't necessary.
2022-08-20 22:08:50 -07:00
Eric Huss
12386da38a bootstrap: Remove some unused fields from the tool_extended macro. 2022-08-20 22:07:04 -07:00
bors
aa8e761def Auto merge of #100624 - GuillaumeGomez:update-minifier-version, r=nnethercote
Update minifier version to 0.2.2

Following [this PR](https://github.com/GuillaumeGomez/minifier-rs/pull/98), the CSS minification should be much faster now (thanks to `@nnethercote).`

r? `@nnethercote`
2022-08-21 04:21:06 +00:00
Michael Goulet
d577eb09e5 Bless tests after #100769 2022-08-21 04:04:05 +00:00
Maybe Waffle
b2625e24b9 fix nitpicks from review 2022-08-21 06:36:11 +04:00
Michael Goulet
5212ac9dac Make check for overlapping closure span more accurate 2022-08-21 02:35:11 +00:00
Michael Goulet
d2f54b1990 Adjust messages, address some nits 2022-08-21 02:35:11 +00:00
Michael Goulet
2a16a127a0 More docs 2022-08-21 02:35:11 +00:00
Michael Goulet
8917894fda Targeted fixes addressing erroneous suggestions 2022-08-21 02:35:11 +00:00
Michael Goulet
6848ba2665 Comment a bit, use find_ancestor_in_same_ctxt to suppress some weird macro notes 2022-08-21 02:35:11 +00:00
Michael Goulet
292ab399b3 Point at struct field if possible 2022-08-21 02:35:11 +00:00
Michael Goulet
c0c6603c79 Deduplicate errors that come from places like normalization, sized 2022-08-21 02:35:11 +00:00
Michael Goulet
24559ce2fe Prefer non-Self non-method types over Self, first 2022-08-21 02:35:11 +00:00
Michael Goulet
c8746766cb Rework ambiguity errors 2022-08-21 02:35:11 +00:00
Michael Goulet
70b29f7c2d Note closure kind mismatch cause 2022-08-21 02:35:11 +00:00
Michael Goulet
52e2065ed4 Revert closure mismatch spans 2022-08-21 02:34:52 +00:00
Michael Goulet
3a1aa3c76e Do not favor projection type when pointing out arg causing fulfillment error 2022-08-21 02:34:52 +00:00
Michael Goulet
c9cb19d26e Skip mentioning lang item 2022-08-21 02:34:52 +00:00
Michael Goulet
d05fea6ac4 Account for relative paths 2022-08-21 02:34:52 +00:00
Michael Goulet
c005e760f5 Rework point-at-arg 2022-08-21 02:34:52 +00:00
bors
f2858b5cd3 Auto merge of #100536 - Alexendoo:bootstrap-tls-model, r=Mark-Simulacrum
bootstrap: don't apply `-Ztls-model=initial-exec` to proc macros

Potentially fixes #100530

r? `@bjorn3`
2022-08-21 01:34:05 +00:00
bors
fb80d2bfe4 Auto merge of #99967 - Mark-Simulacrum:download-llvm-ci, r=jyn514
Download, rather than sccache-cache, LLVM in CI

My hope/expectation is that we can do better than sccache in CI for cached builds -- currently it looks like on macOS those still take upwards of 10-11 minutes, which is a significant amount of time that we could potentially cut.

This enables this mode for all non-dist builders; this should avoid any problems with the artifacts we distribute, while also providing for faster test builders (since they'll make use of PGO'd LLVM on the platforms we do that on, which is hopefully a nice win). It slightly increases the chance of test builders starting to fail only after a PR is merged (if PGO changes runtime behavior), but that should hopefully never happen, so I think this is worthwhile.

Measurements on the PR for apple-1 don't show any noticeable improvement in CI times, but those can be pretty noisy -- I'm inclined to land this since it *should* pretty much always be better and we can reconsider if that ever turns out not to be the case.
2022-08-20 22:49:36 +00:00
Maybe Waffle
3ba393465f Make some docs nicer wrt pointer offsets 2022-08-21 02:22:20 +04:00
Maybe Waffle
e4720e1cf2 Replace most uses of pointer::offset with add and sub 2022-08-21 02:21:41 +04:00
Cameron Steffen
17ddcb434b Improve primitive/std docs separation and headers 2022-08-20 16:50:29 -05:00
Maybe Waffle
ed084ba292 Remove useless pointer cast 2022-08-21 01:32:40 +04:00
scottmcm
03146471b5
Allow other directives before the ret 2022-08-20 21:08:56 +00:00
bors
878aef79dc Auto merge of #100810 - matthiaskrgr:rollup-xep778s, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #97963 (net listen backlog set to negative on Linux.)
 - #99935 (Reenable disabled early syntax gates as future-incompatibility lints)
 - #100129 (add miri-test-libstd support to libstd)
 - #100500 (Ban references to `Self` in trait object substs for projection predicates too.)
 - #100636 (Revert "Revert "Allow dynamic linking for iOS/tvOS targets."")
 - #100718 ([rustdoc] Fix item info display)
 - #100769 (Suggest adding a reference to a trait assoc item)
 - #100777 (elaborate how revisions work with FileCheck stuff in src/test/codegen)
 - #100796 (Refactor: remove unnecessary string searchings)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-20 20:08:26 +00:00
Nilstrieb
0c3ed968a2 Add /build-rust-analyzer/ to .gitignore
To avoid rust-analyzer and rustc having to wait for each other,
the dev guide mentions using another build directory for RA.

We should also put this into the .gitignore, just like the normal `build`.
2022-08-20 21:07:13 +02:00
Matthias Krüger
d793cd266c
Rollup merge of #100796 - TaKO8Ki:remove-unnecessary-string-searching, r=compiler-errors
Refactor: remove unnecessary string searchings

This patch removes unnecessary string searchings for checking if function arguments have `&` and `&mut`.
2022-08-20 19:45:17 +02:00
Matthias Krüger
44894a7c51
Rollup merge of #100777 - pnkfelix:expand-codegen-tests-readme, r=TaKO8Ki
elaborate how revisions work with FileCheck stuff in src/test/codegen

elaborate how revisions work with FileCheck stuff in src/test/codegen
2022-08-20 19:45:16 +02:00
Matthias Krüger
7f0289623c
Rollup merge of #100769 - TaKO8Ki:suggest-adding-reference-to-trait-assoc-item, r=cjgillot
Suggest adding a reference to a trait assoc item

fixes #100289
2022-08-20 19:45:15 +02:00
Matthias Krüger
aaa5574a18
Rollup merge of #100718 - GuillaumeGomez:fix-item-info, r=jsha
[rustdoc] Fix item info display

Fixes  #100369.

The solution I came up with was simply to wrap the "text part" of the `item-info` into another span so that `flex` wouldn't mess with it.

Live demo is [here](https://rustdoc.crud.net/imperio/fix-item-info/foo/struct.ItemInfo.html).

r? ``@jsha``
2022-08-20 19:45:14 +02:00
Matthias Krüger
e81b994868
Rollup merge of #100636 - cutsoy:revert-77716, r=davidtwco
Revert "Revert "Allow dynamic linking for iOS/tvOS targets.""

This reverts commit 16e10bf81e (PR #77716).

The original original PR enabled `cdylib` builds for iOS. However this caused problems because:

> This new feature in Rust 1.46 added a lot of headache for iOS builds with cdylib targets. cdylib target is near impossible to build if you are using any crate with native dependencies (ex. openssl, libsodium, zmq). You can't just find .so files for all architectures to perform correct linking. Usual workflow is the following:
>
> 1. You build staticlib and rely that native dependencies will be linked as frameworks later
> 2. You setup right cocoapods in ObjectiveC/Swift wrapper.
>
> As cargo doesn't support platform-dependent crate types https://github.com/rust-lang/rust/pull/4881 as a result a lot of projects now broken on Rust 1.46

However, this will be soon a thing of the past since 1.64 brings us the long awaited much anticipated `--crate-type` flag.

> I see that this got merged recently: https://github.com/rust-lang/cargo/issues/10083. The --crate-type flag will get stabilized in 1.64. In 1.64, you could still get a successful iOS staticlib with cargo build --crate-type=statclib even if the crate has cdylib targets too. If I'm not mistaken, this solves the problem too so this PR could be reverted in 1.64 with relatively little headache.

So summing up, I think this PR can be reverted in 1.64. 🤞
2022-08-20 19:45:13 +02:00
Matthias Krüger
33a40297d3
Rollup merge of #100500 - cjgillot:verify-self-predicate, r=lcnr
Ban references to `Self` in trait object substs for projection predicates too.

Fixes https://github.com/rust-lang/rust/issues/100484
Fixes https://github.com/rust-lang/rust/issues/100485

r? ````@lcnr````
2022-08-20 19:45:12 +02:00
Matthias Krüger
e93edf3335
Rollup merge of #100129 - RalfJung:miri-test-libstd, r=thomcc
add miri-test-libstd support to libstd

- The first commit mirrors what we already have in liballoc.
- The second commit adds some regression tests that only really make sense to be run in Miri, since they rely on Miri's extra checks to detect anything.
- The third commit makes the MPSC tests work in reasonable time in Miri by reducing iteration counts.
- The fourth commit silences some warnings due to code being disabled with `cfg(miri)`
2022-08-20 19:45:11 +02:00
Matthias Krüger
8828af4d88
Rollup merge of #99935 - CAD97:unstable-syntax-lints, r=petrochenkov
Reenable disabled early syntax gates as future-incompatibility lints

- MCP: https://github.com/rust-lang/compiler-team/issues/535

The approach taken by this PR is

- Introduce a new lint, `unstable_syntax_pre_expansion`, and reenable the early syntax gates to emit it
- Use the diagnostic stashing mechanism to stash warnings the early warnings
- When the hard error occurs post expansion, steal and cancel the early warning
- Don't display any stashed warnings if errors are present to avoid the same noise problem that hiding type ascription errors is avoiding

Commits are working commits, but in a coherent steps-to-implement manner. Can be squashed if desired.

The preexisting `soft_unstable` lint seems like it would've been a good fit, but it is deny-by-default (appropriate for `#[bench]`) and these gates should be introduced as warn-by-default.

It may be desirable to change the stash mechanism's behavior to not flush lint errors in the presence of other errors either (like is done for warnings here), but upgrading a stash-using lint from warn to error perhaps is enough of a request to see the lint that they shouldn't be hidden; additionally, fixing the last error to get new errors thrown at you always feels bad, so if we know the lint errors are present, we should show them.

Using a new flag/mechanism for a "weak diagnostic" which is suppressed by other errors may also be desirable over assuming any stashed warnings are "weak," but this is the first user of stashing warnings and seems an appropriate use of stashing (it follows the "know more later to refine the diagnostic" pattern; here we learn that it's in a compiled position) so we get to define what it means to stash a non-hard-error diagnostic.

cc `````@petrochenkov````` (seconded MCP)
2022-08-20 19:45:10 +02:00
Matthias Krüger
d9789b6903
Rollup merge of #97963 - devnexen:net_listener_neg, r=the8472
net listen backlog set to negative on Linux.

it will be 4076 (from 5.4) or 128.
2022-08-20 19:45:09 +02:00
bors
48853a361a Auto merge of #100809 - matthiaskrgr:rollup-xkpd5ii, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #99415 (Initial implementation of REUSE)
 - #99544 (Expose `Utf8Lossy` as `Utf8Chunks`)
 - #100585 (Fix trailing space showing up in example)
 - #100596 (Remove unnecessary stderr files)
 - #100642 (Update fortanix-sgx-abi and export some useful SGX usercall traits)
 - #100691 (Make `same_type_modulo_infer` a proper `TypeRelation`)
 - #100693 (Add LLVM15-specific codegen test for `try`/`?`s that now optimize away)
 - #100710 (Windows: Load synch functions together)
 - #100807 (Add TaKO8Ki to translation-related mention groups)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-20 17:38:29 +00:00
Matthias Krüger
0be081976c
Rollup merge of #100807 - TaKO8Ki:add-tako8ki-to-translation-related-mention-groups, r=Mark-Simulacrum
Add TaKO8Ki to translation-related mention groups

Can I join translation-related mention groups?

cc `@davidtwco`
2022-08-20 19:32:14 +02:00
Matthias Krüger
77db317eed
Rollup merge of #100710 - ChrisDenton:load-library, r=thomcc
Windows: Load synch functions together

Attempt to load all the required sync functions and fail if any one of them fails.

This fixes a FIXME by going back to optional loading of `WakeByAddressSingle`.

Also reintroduces a macro for optional loading of functions but keeps it separate from the fallback macro rather than having that do two different jobs.

r? `@thomcc`
2022-08-20 19:32:13 +02:00
Matthias Krüger
45568bdaf7
Rollup merge of #100693 - scottmcm:new-llvm15-nops, r=Mark-Simulacrum
Add LLVM15-specific codegen test for `try`/`?`s that now optimize away

These still generated a bunch of code back in Rust 1.63 (<https://rust.godbolt.org/z/z31P8h6rz>), but with LLVM 15 merged they no longer do 🎉
2022-08-20 19:32:12 +02:00
Matthias Krüger
51769af6ea
Rollup merge of #100691 - compiler-errors:issue-100690, r=estebank
Make `same_type_modulo_infer` a proper `TypeRelation`

Specifically, this fixes #100690 because we no longer consider a `ReLateBound` and a `ReVar` to be equal. `ReVar` can only be equal to free regions or static.
2022-08-20 19:32:11 +02:00
Matthias Krüger
c4fa35bb41
Rollup merge of #100642 - mzohreva:mz/update-sgx-abi-cancel-queue, r=Mark-Simulacrum
Update fortanix-sgx-abi and export some useful SGX usercall traits

Update `fortanix-sgx-abi` to 0.5.0 to add support for cancel queue (see https://github.com/fortanix/rust-sgx/pull/405 and https://github.com/fortanix/rust-sgx/pull/404).

Export some useful traits for processing SGX usercall. This is needed for https://github.com/fortanix/rust-sgx/pull/404 to avoid duplication.

cc `@raoulstrackx` and `@jethrogb`
2022-08-20 19:32:10 +02:00
Matthias Krüger
23a603aa4c
Rollup merge of #100596 - TaKO8Ki:remove-unnecessary-stderr-files, r=Mark-Simulacrum
Remove unnecessary stderr files

This patch removes stderr files corresponding to revisions that have already been removed.
2022-08-20 19:32:09 +02:00
Matthias Krüger
bd4a63cda2
Rollup merge of #100585 - wooorm:patch-1, r=Mark-Simulacrum
Fix trailing space showing up in example

The current text is rendered as: U+005B ..= U+0060 ``[ \ ] ^ _ ` ``, or (**note the final space!**)
This patch changes that to render as: U+005B ..= U+0060 `` [ \ ] ^ _ ` ``, or (**note no final space!**)

The reason for that, is that CommonMark has a solution for starting or ending inline code with a backtick/grave accent: padding both sides with a space, makes that padding disappear.
2022-08-20 19:32:08 +02:00
Matthias Krüger
d49906519b
Rollup merge of #99544 - dylni:expose-utf8lossy, r=Mark-Simulacrum
Expose `Utf8Lossy` as `Utf8Chunks`

This PR changes the feature for `Utf8Lossy` from `str_internals` to `utf8_lossy` and improves the API. This is done to eventually expose the API as stable.

Proposal: rust-lang/libs-team#54
Tracking Issue: #99543
2022-08-20 19:32:07 +02:00
Matthias Krüger
2be85b0d03
Rollup merge of #99415 - ferrocene:pa-reuse-initial, r=Mark-Simulacrum
Initial implementation of REUSE

This PR implements the first two steps of #99414 by:

* Adding some scaffolding for REUSE. The `.reuse/dep5` file now marks every file as the custom "TODO" license, which I'll remove in a future PR once Debian imports their metadata. The TODO license is needed so that `reuse lint` works.
* Runs `reuse lint` in CI, in the `mingw-check` builder. REUSE currently has a bug when parsing some files in the LLVM source code. This means REUSE will fail when running it in source tarballs of rustc, and that bug prevents us from passing the `--include-submodules` flag in CI. I opened https://github.com/fsfe/reuse-tool/pull/560 upstream with a fix, and as soon as it's merged/released I planned to bump the pinned version to include the fix we need.

r? `@Mark-Simulacrum`
2022-08-20 19:32:06 +02:00