]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoadd regression tests found in crater
Niko Matsakis [Thu, 23 Jun 2022 21:16:47 +0000 (17:16 -0400)]
add regression tests found in crater

2 years agorun `x.py fmt`
Niko Matsakis [Thu, 23 Jun 2022 21:00:46 +0000 (17:00 -0400)]
run `x.py fmt`

2 years agoremove misleading comment
Niko Matsakis [Thu, 23 Jun 2022 20:56:43 +0000 (16:56 -0400)]
remove misleading comment

per aliemjay's suggestion

2 years agotry to clarify confusing comment
Niko Matsakis [Thu, 23 Jun 2022 20:54:55 +0000 (16:54 -0400)]
try to clarify confusing comment

2 years agonormalize if-eq bounds before testing
Niko Matsakis [Thu, 23 Jun 2022 20:53:44 +0000 (16:53 -0400)]
normalize if-eq bounds before testing

Hat-tip: aliemjay

2 years agoapply suggestions from oli-obk
Niko Matsakis [Thu, 23 Jun 2022 20:40:06 +0000 (16:40 -0400)]
apply suggestions from oli-obk

Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2 years agocoallesce docs
Niko Matsakis [Thu, 23 Jun 2022 20:38:24 +0000 (16:38 -0400)]
coallesce docs

2 years agorename IfEqBound to IfEq
Niko Matsakis [Thu, 23 Jun 2022 20:35:47 +0000 (16:35 -0400)]
rename IfEqBound to IfEq

2 years agoremove VerifyBound::IfEq variant
Niko Matsakis [Thu, 23 Jun 2022 20:28:46 +0000 (16:28 -0400)]
remove VerifyBound::IfEq variant

2 years agoAuto merge of #98423 - ehuss:ci-submodule-no-archive, r=compiler-errors
bors [Thu, 23 Jun 2022 18:00:16 +0000 (18:00 +0000)]
Auto merge of #98423 - ehuss:ci-submodule-no-archive, r=compiler-errors

Temporarily disable submodule archive downloads.

The `llvm-project` `/archive/` download has been timing out with a 504 error since yesterday. This changes it so that it uses a normal submodule clone, but also uses `--depth 1` since GitHub now supports `allowReachableSHA1InWant` which allows for fetching a specific revision. That should be reasonably fast (but not as fast as an archive download) to unstick CI.

2 years agoTemporarily disable submodule archive downloads.
Eric Huss [Thu, 23 Jun 2022 13:57:21 +0000 (06:57 -0700)]
Temporarily disable submodule archive downloads.

2 years agoSuggest defining variable as mutable on `&mut _` type mismatch in pats
Maybe Waffle [Thu, 23 Jun 2022 16:33:40 +0000 (20:33 +0400)]
Suggest defining variable as mutable on `&mut _` type mismatch in pats

2 years agoUpdate browser-ui-test version to 0.9.6
Guillaume Gomez [Thu, 23 Jun 2022 11:04:29 +0000 (13:04 +0200)]
Update browser-ui-test version to 0.9.6

This update provides a better error message when chromium crashes

2 years agoSession object: Set OS/ABI
Martin Kröning [Wed, 1 Jun 2022 22:16:00 +0000 (00:16 +0200)]
Session object: Set OS/ABI

This adapts LLVM's behavior of MCELFObjectTargetWriter::getOSABI [1].

[1]: https://github.com/llvm/llvm-project/blob/8c8a2679a20f621994fa904bcfc68775e7345edc/llvm/include/llvm/MC/MCELFObjectWriter.h#L72-L86

2 years agoRemove excess rib while resolving closures
Maybe Waffle [Thu, 23 Jun 2022 08:21:23 +0000 (12:21 +0400)]
Remove excess rib while resolving closures

2 years agoupdate rustfmt
Caleb Cartwright [Thu, 23 Jun 2022 03:16:58 +0000 (22:16 -0500)]
update rustfmt

2 years agoMerge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
Caleb Cartwright [Thu, 23 Jun 2022 03:14:32 +0000 (22:14 -0500)]
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt

2 years agochore: prep v1.5.1 release
Caleb Cartwright [Thu, 23 Jun 2022 02:19:00 +0000 (21:19 -0500)]
chore: prep v1.5.1 release

2 years agoMerge pull request #5405 from calebcartwright/subtree-sync-2022-06-22
Caleb Cartwright [Thu, 23 Jun 2022 01:57:46 +0000 (20:57 -0500)]
Merge pull request #5405 from calebcartwright/subtree-sync-2022-06-22

Subtree sync 2022 06 22

2 years agoRename some `ExtCtxt` methods.
Nicholas Nethercote [Tue, 21 Jun 2022 22:38:24 +0000 (08:38 +1000)]
Rename some `ExtCtxt` methods.

The new names are more accurate.

Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com>
2 years agoSet no_default_libraries: false in wasm32_emscripten target
Hood Chatham [Thu, 23 Jun 2022 00:43:10 +0000 (17:43 -0700)]
Set no_default_libraries: false in wasm32_emscripten target

2 years agochore: bump toolchain
Caleb Cartwright [Thu, 23 Jun 2022 00:36:53 +0000 (19:36 -0500)]
chore: bump toolchain

2 years agoRevert "Memoize format_expr"
Caleb Cartwright [Thu, 23 Jun 2022 00:29:38 +0000 (19:29 -0500)]
Revert "Memoize format_expr"

This reverts commit a37d3ab0e1c7c05f1a6410fb7ddf5539f0d030f8.

2 years agoMerge remote-tracking branch 'upstream/master' into subtree-sync-2022-06-22
Caleb Cartwright [Thu, 23 Jun 2022 00:28:27 +0000 (19:28 -0500)]
Merge remote-tracking branch 'upstream/master' into subtree-sync-2022-06-22

2 years agoUpdate tendril
Eric Huss [Wed, 22 Jun 2022 23:49:24 +0000 (16:49 -0700)]
Update tendril

2 years agoUpdate books
Eric Huss [Wed, 22 Jun 2022 23:11:10 +0000 (16:11 -0700)]
Update books

2 years agoFix issue where `cargo fmt --version` would not display version info
Yacin Tmimi [Tue, 21 Jun 2022 22:55:24 +0000 (18:55 -0400)]
Fix issue where `cargo fmt --version` would not display version info

Fixes 5395

In PR 5239 we switched from using `structopt` to `clap`. It seems that
the default behavior for `clap` is to override the `--version` flag,
which prevented our custom version display code from running.

The fix as outlined in https://github.com/clap-rs/clap/issues/3405 was
to set `#[clap(global_setting(AppSettings::NoAutoVersion))]` to prevent
clap from setting its own default behavior for the `--version` flag.

2 years agoAdd idempotency test for issue 5399
Yacin Tmimi [Wed, 22 Jun 2022 17:40:10 +0000 (13:40 -0400)]
Add idempotency test for issue 5399

2 years agoRevert "Memoize format_expr"
Yacin Tmimi [Wed, 22 Jun 2022 17:36:01 +0000 (13:36 -0400)]
Revert "Memoize format_expr"

Fixes 5399

Memoizing expressions lead to cases where rustfmt's stability guarantees
were violated.

This reverts commit a37d3ab0e1c7c05f1a6410fb7ddf5539f0d030f8.

2 years agoMerge all popover hide functions into one
Guillaume Gomez [Wed, 22 Jun 2022 18:49:26 +0000 (20:49 +0200)]
Merge all popover hide functions into one

2 years agoAdd/update GUI tests for help pocket menu
Guillaume Gomez [Mon, 20 Jun 2022 14:29:16 +0000 (16:29 +0200)]
Add/update GUI tests for help pocket menu

2 years agoMove help popup into a pocket menu as well
Guillaume Gomez [Mon, 20 Jun 2022 14:28:52 +0000 (16:28 +0200)]
Move help popup into a pocket menu as well

2 years agoupdate Miri
Ralf Jung [Wed, 22 Jun 2022 22:09:54 +0000 (15:09 -0700)]
update Miri

2 years agoAdd tracking issues to `--extern` option docs.
Eric Huss [Wed, 22 Jun 2022 18:42:24 +0000 (11:42 -0700)]
Add tracking issues to `--extern` option docs.

2 years agotriagebot.toml: Sort and wrap the list of allowed labels
Josh Triplett [Wed, 22 Jun 2022 21:02:48 +0000 (14:02 -0700)]
triagebot.toml: Sort and wrap the list of allowed labels

2 years agotriagebot.toml: Allow applying nominated labels
Josh Triplett [Wed, 22 Jun 2022 21:01:31 +0000 (14:01 -0700)]
triagebot.toml: Allow applying nominated labels

This seems likely to help more than it would hurt; let's see how it
goes.

2 years agoRemove (transitive) reliance on sorting by DefId in pretty-printer
Aaron Hill [Wed, 11 May 2022 20:36:26 +0000 (16:36 -0400)]
Remove (transitive) reliance on sorting by DefId in pretty-printer

This moves us a step closer to removing the `PartialOrd/`Ord` impls
for `DefId`. See #90317

2 years agoFixup missing renames from `#[main]` to `#[rustc_main]`
Martin Nordholts [Wed, 22 Jun 2022 16:23:21 +0000 (18:23 +0200)]
Fixup missing renames from `#[main]` to `#[rustc_main]`

In fc357039f9 `#[main]` was removed and replaced with `#[rustc_main]`.
In some place the rename was forgotten, which makes the current code
confusing, because at first glance it seems that `#[main]` is still
around. Perform the renames also in these places.

2 years agoAdd test for keywords in rustdoc JSON output
Guillaume Gomez [Wed, 22 Jun 2022 14:26:22 +0000 (16:26 +0200)]
Add test for keywords in rustdoc JSON output

2 years agoFilter out keyword items in rustdoc JSON output
Guillaume Gomez [Wed, 22 Jun 2022 14:26:04 +0000 (16:26 +0200)]
Filter out keyword items in rustdoc JSON output

2 years agoimplement `iter_projections` function on `PlaceRef`
Rose Hudson [Wed, 22 Jun 2022 13:06:13 +0000 (14:06 +0100)]
implement `iter_projections` function on `PlaceRef`

this makes the api more flexible. the original function now calls the PlaceRef
version to avoid duplicating the code.

2 years agoWork around llvm 12's memory ordering restrictions.
Mara Bos [Wed, 22 Jun 2022 12:48:49 +0000 (14:48 +0200)]
Work around llvm 12's memory ordering restrictions.

Older llvm has the pre-C++17 restriction on success and failure memory
ordering, requiring the former to be at least as strong as the latter.
So, for llvm 12, this upgrades the success ordering to a stronger one if
necessary.

2 years agoAddress reviewer comments
Raoul Strackx [Wed, 22 Jun 2022 11:47:32 +0000 (13:47 +0200)]
Address reviewer comments

2 years agouse `-Cstrip=debuginfo` with ui tests to reduce disk space usage
klensy [Wed, 15 Jun 2022 13:36:19 +0000 (16:36 +0300)]
use `-Cstrip=debuginfo` with ui tests to reduce disk space usage

2 years agoAuto merge of #98279 - cjgillot:all-fresh-nofn, r=petrochenkov
bors [Wed, 22 Jun 2022 10:48:58 +0000 (10:48 +0000)]
Auto merge of #98279 - cjgillot:all-fresh-nofn, r=petrochenkov

Create elided lifetime parameters for function-like types

Split from https://github.com/rust-lang/rust/pull/97720

This PR refactor lifetime generic parameters in bare function types and parenthesized traits to introduce the additional required lifetimes as fresh parameters in a `for<>` bound.

This PR does the same to lifetimes appearing in closure signatures, and as-if introducing `for<>` bounds on closures (without the associated change in semantics).

r? `@petrochenkov`

2 years agoAuto merge of #98375 - JohnTitor:rollup-e5c6rgo, r=JohnTitor
bors [Wed, 22 Jun 2022 08:07:46 +0000 (08:07 +0000)]
Auto merge of #98375 - JohnTitor:rollup-e5c6rgo, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #95446 (update CPU usage script)
 - #96768 (Use futex based thread parker on Fuchsia.)
 - #97454 (Add release notes for 1.62)
 - #97516 (clarify how Rust atomics correspond to C++ atomics)
 - #97818 (Point at return expression for RPIT-related error)
 - #97895 (Simplify `likely!` and `unlikely!` macro)
 - #98005 (Add some tests for impossible bounds)
 - #98226 (Document unstable `--extern` options)
 - #98356 (Add missing period)
 - #98363 (remove use of &Alloc in btree tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoFix debug info test
Robin Raymond [Wed, 22 Jun 2022 06:51:39 +0000 (06:51 +0000)]
Fix debug info test

2 years agoRollup merge of #98363 - RalfJung:btree-test-ref-alloc, r=thomcc
Yuki Okushi [Wed, 22 Jun 2022 06:16:17 +0000 (15:16 +0900)]
Rollup merge of #98363 - RalfJung:btree-test-ref-alloc, r=thomcc

remove use of &Alloc in btree tests

I missed these in https://github.com/rust-lang/rust/pull/98233.

r? ``@thomcc``

2 years agoRollup merge of #98356 - lucasthormann:patch-1, r=Mark-Simulacrum
Yuki Okushi [Wed, 22 Jun 2022 06:16:16 +0000 (15:16 +0900)]
Rollup merge of #98356 - lucasthormann:patch-1, r=Mark-Simulacrum

Add missing period

2 years agoRollup merge of #98226 - ChrisDenton:doc-extern-options, r=ehuss
Yuki Okushi [Wed, 22 Jun 2022 06:16:15 +0000 (15:16 +0900)]
Rollup merge of #98226 - ChrisDenton:doc-extern-options, r=ehuss

Document unstable `--extern` options

These are needed for Cargo's `build-std` feature and for anyone who wanted to do a similar thing outside of Cargo.

2 years agoRollup merge of #98005 - compiler-errors:impossible-bounds, r=Mark-Simulacrum
Yuki Okushi [Wed, 22 Jun 2022 06:16:14 +0000 (15:16 +0900)]
Rollup merge of #98005 - compiler-errors:impossible-bounds, r=Mark-Simulacrum

Add some tests for impossible bounds

Adds test for #93008
Adds test for #94680
Closes #94999
Closes #95640

2 years agoRollup merge of #97895 - nbdd0121:unlikely, r=estebank
Yuki Okushi [Wed, 22 Jun 2022 06:16:13 +0000 (15:16 +0900)]
Rollup merge of #97895 - nbdd0121:unlikely, r=estebank

Simplify `likely!` and `unlikely!` macro

The corresponding intrinsics have long been safe-to-call, so the unsafe block is no longer needed.

2 years agoRollup merge of #97818 - compiler-errors:rpit-error-spanned, r=oli-obk
Yuki Okushi [Wed, 22 Jun 2022 06:16:12 +0000 (15:16 +0900)]
Rollup merge of #97818 - compiler-errors:rpit-error-spanned, r=oli-obk

Point at return expression for RPIT-related error

Certainly this needs some diagnostic refining, but I wanted to show that it was possible first and foremost. Not sure if this is the right approach. Open to feedback.

Fixes #80583

2 years agoRollup merge of #97516 - RalfJung:atomics, r=joshtriplett
Yuki Okushi [Wed, 22 Jun 2022 06:16:11 +0000 (15:16 +0900)]
Rollup merge of #97516 - RalfJung:atomics, r=joshtriplett

clarify how Rust atomics correspond to C++ atomics

``@cbeuw`` noted in https://github.com/rust-lang/miri/pull/1963 that the correspondence between C++ atomics and Rust atomics is not quite as obvious as one might think, since in Rust I can use `get_mut` to treat previously non-atomic data as atomic. However, I think using C++20 `atomic_ref`, we can establish a suitable relation between the two -- or do you see problems with that ``@cbeuw?`` (I recall you said there was some issue, but it was deep inside that PR and Github makes it impossible to find...)

Cc ``@thomcc;`` not sure whom else to ping for atomic memory model things.

2 years agoRollup merge of #97454 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
Yuki Okushi [Wed, 22 Jun 2022 06:16:10 +0000 (15:16 +0900)]
Rollup merge of #97454 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum

Add release notes for 1.62

cc ``@rust-lang/release``

r? ``@pietroalbini``

2 years agoRollup merge of #96768 - m-ou-se:futex-fuchsia, r=tmandry
Yuki Okushi [Wed, 22 Jun 2022 06:16:09 +0000 (15:16 +0900)]
Rollup merge of #96768 - m-ou-se:futex-fuchsia, r=tmandry

Use futex based thread parker on Fuchsia.

2 years agoRollup merge of #95446 - notseanray:master, r=Mark-Simulacrum
Yuki Okushi [Wed, 22 Jun 2022 06:16:08 +0000 (15:16 +0900)]
Rollup merge of #95446 - notseanray:master, r=Mark-Simulacrum

update CPU usage script

I've made slight changes to the CPU usage plot script with updated links from the [ci2 aws instance](https://rust-lang-ci2.s3.amazonaws.com/).

2 years agoadd "was" to pluralize macro and use it
Takayuki Maeda [Wed, 22 Jun 2022 05:56:40 +0000 (14:56 +0900)]
add "was" to pluralize macro and use it

2 years agoRemove individual crate checks for bootstrap in tidy
Joshua Nelson [Wed, 22 Jun 2022 05:31:23 +0000 (00:31 -0500)]
Remove individual crate checks for bootstrap in tidy

This duplicates a lot of checking, and doesn't seem particularly useful -
these are already caught in review.

Note that this still keeps the license check.

2 years agoRemove vendoring support when building from git sources
Joshua Nelson [Wed, 22 Jun 2022 01:40:23 +0000 (20:40 -0500)]
Remove vendoring support when building from git sources

This is difficult to support without submodule handling in bootstrap.py, because cargo will refuse
to vendor sources unless it knows the Cargo.toml files of all tools in tree. Moving vendor support
to rustbuild means that rustbuild will be built without vendoring.

Rather than trying to solve this, just remove support altogether and require
people to use `rustc-src` if they want vendoring (or run `cargo vendor` manually).

2 years agoAdd bootstrap to tidy check
Joshua Nelson [Sun, 29 May 2022 15:37:05 +0000 (10:37 -0500)]
Add bootstrap to tidy check

2 years agopoint to type param definition when not finding variant, method and assoc type
Takayuki Maeda [Mon, 20 Jun 2022 15:43:20 +0000 (00:43 +0900)]
point to type param definition when not finding variant, method and assoc type

use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span`

use `body_id.owner` directly

add description to label

2 years agoclarify Arc::clone overflow check comment
Ralf Jung [Wed, 22 Jun 2022 00:11:28 +0000 (17:11 -0700)]
clarify Arc::clone overflow check comment

2 years agoFully remove submodule handling from bootstrap.py
Joshua Nelson [Sun, 29 May 2022 07:26:19 +0000 (02:26 -0500)]
Fully remove submodule handling from bootstrap.py

These submodules were previously updated in python because Cargo gives a hard error if toml files
are missing from the workspace:

```
error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls`

Caused by:
  failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml
```

However, bootstrap doesn't actually need to be part of the workspace.
Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python.

Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now.
Given that we're planning to make the main entrypoint a shell script (or rust binary),
I think this is a good tradeoff for reduced complexity in bootstrap.py.

2 years agoDocument unstable `--extern` options
Chris Denton [Sat, 18 Jun 2022 10:20:53 +0000 (11:20 +0100)]
Document unstable `--extern` options

Co-Authored-By: Joshua Nelson <github@jyn.dev>
Co-Authored-By: Eric Huss <eric@huss.org>
2 years agostop pointing at definitions of missing fields
Takayuki Maeda [Wed, 22 Jun 2022 03:01:41 +0000 (12:01 +0900)]
stop pointing at definitions of missing fields

2 years agoAuto merge of #97853 - TaKO8Ki:emit-only-one-note-per-unused-struct-field, r=estebank
bors [Wed, 22 Jun 2022 02:51:55 +0000 (02:51 +0000)]
Auto merge of #97853 - TaKO8Ki:emit-only-one-note-per-unused-struct-field, r=estebank

Collapse multiple dead code warnings into a single diagnostic

closes #97643

2 years agoAdd some tests for impossible bounds
Michael Goulet [Sat, 11 Jun 2022 21:31:33 +0000 (14:31 -0700)]
Add some tests for impossible bounds

2 years agoPoint at return expression for RPIT-related error
Michael Goulet [Tue, 7 Jun 2022 06:20:13 +0000 (23:20 -0700)]
Point at return expression for RPIT-related error

2 years agoImprove suggestion for calling closure on type mismatch
Michael Goulet [Mon, 20 Jun 2022 06:11:31 +0000 (23:11 -0700)]
Improve suggestion for calling closure on type mismatch

2 years agoAddress review comments from #98259
Joshua Nelson [Wed, 22 Jun 2022 00:43:46 +0000 (19:43 -0500)]
Address review comments from #98259

It got merged so fast I didn't have time to make changes xD

2 years agoAuto merge of #98359 - JohnTitor:rollup-v30vyzr, r=JohnTitor
bors [Wed, 22 Jun 2022 00:28:20 +0000 (00:28 +0000)]
Auto merge of #98359 - JohnTitor:rollup-v30vyzr, r=JohnTitor

Rollup of 6 pull requests

Successful merges:

 - #97867 (lub: don't bail out due to empty binders)
 - #98099 (interpret: convert_tag_add_extra: allow tagger to raise errors)
 - #98199 (Move some tests to more reasonable directories)
 - #98334 (Add a full regression test for #73727)
 - #98336 (Remove the unused-`#[doc(hidden)]` logic from the `unused_attributes` lint)
 - #98344 (This comment is out dated and misleading, the arm is about TAITs)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agohedge our bets
Ralf Jung [Tue, 21 Jun 2022 23:54:54 +0000 (16:54 -0700)]
hedge our bets

Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2 years agoremove use of &Alloc in btree tests
Ralf Jung [Tue, 21 Jun 2022 23:38:12 +0000 (16:38 -0700)]
remove use of &Alloc in btree tests

2 years agoRollup merge of #98344 - spastorino:remove-misleading-comment, r=oli-obk
Yuki Okushi [Tue, 21 Jun 2022 22:04:05 +0000 (07:04 +0900)]
Rollup merge of #98344 - spastorino:remove-misleading-comment, r=oli-obk

This comment is out dated and misleading, the arm is about TAITs

r? ```@oli-obk```

```@oli-obk``` unsure if you want to add a different comment of some sort.

```@bors``` rollup=always

2 years agoRollup merge of #98336 - fmease:remove-faulty-doc-hidden-lint, r=GuillaumeGomez
Yuki Okushi [Tue, 21 Jun 2022 22:04:04 +0000 (07:04 +0900)]
Rollup merge of #98336 - fmease:remove-faulty-doc-hidden-lint, r=GuillaumeGomez

Remove the unused-`#[doc(hidden)]` logic from the `unused_attributes` lint

Fixes #96890.

It was found out that `#[doc(hidden)]` on trait impl items does indeed have an effect on the generated documentation (see the linked issue). In my opinion and the one of [others](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Validy.20checks.20for.20.60.23.5Bdoc.28hidden.29.5D.60/near/281846219), rustdoc's output is actually a bit flawed in that regard but that should be tracked in a new issue I suppose (I will open an issue for that in the near future).

The check was introduced in #96008 which is marked to be part of version `1.62` (current `beta`). As far as I understand, this means that **this PR needs to be backported** to `beta` to fix #96890 on time. Correct me if I am wrong.

CC `@dtolnay` (in case you would like to agree or disagree with my decision to fully remove this check)

`@rustbot` label A-lint T-compiler T-rustdoc

r? `@rust-lang/compiler`

2 years agoRollup merge of #98334 - JohnTitor:issue-73727, r=compiler-errors
Yuki Okushi [Tue, 21 Jun 2022 22:04:03 +0000 (07:04 +0900)]
Rollup merge of #98334 - JohnTitor:issue-73727, r=compiler-errors

Add a full regression test for #73727

Closes #73727

This also moves a test to the `issues` directory as it's also tested on the adt_const_params feature.

r? ```@compiler-errors```

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2 years agoRollup merge of #98199 - c410-f3r:z-errors, r=petrochenkov
Yuki Okushi [Tue, 21 Jun 2022 22:04:02 +0000 (07:04 +0900)]
Rollup merge of #98199 - c410-f3r:z-errors, r=petrochenkov

Move some tests to more reasonable directories

r? `@petrochenkov`

2 years agoRollup merge of #98099 - RalfJung:convert_tag_add_extra, r=oli-obk
Yuki Okushi [Tue, 21 Jun 2022 22:03:59 +0000 (07:03 +0900)]
Rollup merge of #98099 - RalfJung:convert_tag_add_extra, r=oli-obk

interpret: convert_tag_add_extra: allow tagger to raise errors

Needed for https://github.com/rust-lang/miri/issues/2234

r? `@oli-obk`

2 years agoRollup merge of #97867 - lcnr:lub-binder, r=oli-obk
Yuki Okushi [Tue, 21 Jun 2022 22:03:59 +0000 (07:03 +0900)]
Rollup merge of #97867 - lcnr:lub-binder, r=oli-obk

lub: don't bail out due to empty binders

allows for the following to compile. The equivalent code using `struct Wrapper<'upper>(fn(&'upper ());` already compiles on stable.
```rust
let _: fn(&'upper ()) = match v {
    true => lt_in_fn::<'a>(),
    false => lt_in_fn::<'b>(),
};
```
see https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7034a677190110941223cafac6632f70 for a complete example

r? ```@rust-lang/types```

2 years agoFix typo
Lucas Thormann [Tue, 21 Jun 2022 20:40:08 +0000 (15:40 -0500)]
Fix typo

2 years agoUpdate Emscripten's no_default_libraries handling
Hood Chatham [Tue, 21 Jun 2022 20:19:44 +0000 (13:19 -0700)]
Update Emscripten's no_default_libraries handling

2 years agoMigrate `builtin-macros-expected-one-cfg-pattern` to `SessionDiagnostic`
beetrees [Tue, 21 Jun 2022 19:20:00 +0000 (20:20 +0100)]
Migrate `builtin-macros-expected-one-cfg-pattern` to `SessionDiagnostic`

2 years agoRustdoc fallout.
Camille GILLOT [Sat, 4 Jun 2022 09:53:34 +0000 (11:53 +0200)]
Rustdoc fallout.

2 years agoUse CreateParameter mode for closures too.
Camille GILLOT [Mon, 23 May 2022 13:50:02 +0000 (15:50 +0200)]
Use CreateParameter mode for closures too.

2 years agoAlways create parameters for functions-like types.
Camille GILLOT [Wed, 11 May 2022 20:49:39 +0000 (22:49 +0200)]
Always create parameters for functions-like types.

2 years agoMigrate `builtin-macros-requires-cfg-pattern` to `SessionDiagnostic`
beetrees [Tue, 21 Jun 2022 19:10:31 +0000 (20:10 +0100)]
Migrate `builtin-macros-requires-cfg-pattern` to `SessionDiagnostic`

2 years agoAdd UI test for `cfg!(foo, bar)`
beetrees [Tue, 21 Jun 2022 18:28:22 +0000 (19:28 +0100)]
Add UI test for `cfg!(foo, bar)`

2 years agoAdd `create_err` and `emit_err` to `ExtCtxt`
beetrees [Tue, 21 Jun 2022 17:56:04 +0000 (18:56 +0100)]
Add `create_err` and `emit_err` to `ExtCtxt`

2 years agoRemove unecessary references to TypeFolder::Error
Alan Egerton [Tue, 21 Jun 2022 11:15:05 +0000 (12:15 +0100)]
Remove unecessary references to TypeFolder::Error

2 years agoReverse folder hierarchy
Alan Egerton [Mon, 20 Jun 2022 20:10:43 +0000 (21:10 +0100)]
Reverse folder hierarchy

#91318 introduced a trait for infallible folders distinct from the fallible version.  For some reason (completely unfathomable to me now that I look at it with fresh eyes), the infallible trait was a supertrait of the fallible one: that is, all fallible folders were required to also be infallible.  Moreover the `Error` associated type was defined on the infallible trait!  It's so absurd that it has me questioning whether I was entirely sane.

This trait reverses the hierarchy, so that the fallible trait is a supertrait of the infallible one: all infallible folders are required to also be fallible (which is a trivial blanket implementation).  This of course makes much more sense!  It also enables the `Error` associated type to sit on the fallible trait, where it sensibly belongs.

There is one downside however: folders expose a `tcx` accessor method.  Since the blanket fallible implementation for infallible folders only has access to a generic `F: TypeFolder`, we need that trait to expose such an accessor to which we can delegate.  Alternatively it's possible to extract that accessor into a separate `HasTcx` trait (or similar) that would then be a supertrait of both the fallible and infallible folder traits: this would ensure that there's only one unambiguous `tcx` method, at the cost of a little additional boilerplate.  If desired, I can submit that as a separate PR.

r? @jackh726

2 years agoAuto merge of #98098 - bjorn3:archive_refactor, r=michaelwoerister
bors [Tue, 21 Jun 2022 16:24:56 +0000 (16:24 +0000)]
Auto merge of #98098 - bjorn3:archive_refactor, r=michaelwoerister

Remove the source archive functionality of ArchiveWriter

We now build archives through strictly additive means rather than taking an existing archive and potentially substracting parts. This is simpler and makes it easier to swap out the archive writer in https://github.com/rust-lang/rust/pull/97485.

2 years agoThis comment is out dated and misleading
Santiago Pastorino [Tue, 21 Jun 2022 15:40:32 +0000 (12:40 -0300)]
This comment is out dated and misleading

Arms are about TAIT and RPIT, as the variants clearly show.

2 years agoci: include config_proc_macro crate in ci (#5389)
Tom Milligan [Tue, 21 Jun 2022 15:23:13 +0000 (16:23 +0100)]
ci: include config_proc_macro crate in ci (#5389)

* config_proc_macro: fix failing doctests

* ci: include config_proc_macro crate in ci

* [review] working native windows ci

* [fix] add --locked file for ci

* [fix] quoting of cmd variables

2 years agoAuto merge of #98335 - JohnTitor:rollup-j2zudxv, r=JohnTitor
bors [Tue, 21 Jun 2022 13:41:37 +0000 (13:41 +0000)]
Auto merge of #98335 - JohnTitor:rollup-j2zudxv, r=JohnTitor

Rollup of 11 pull requests

Successful merges:

 - #94033 (Improve docs for `is_running` to explain use case)
 - #97269 (adjust transmute const stabilization version)
 - #97805 (Add proper tracing spans to rustc_trait_selection::traits::error_reporting)
 - #98022 (Fix erroneous span for borrowck error)
 - #98124 (Improve loading of crates.js and sidebar-items.js)
 - #98278 (Some token stream cleanups)
 - #98306 (`try_fold_unevaluated` for infallible folders)
 - #98313 (Remove lies in comments.)
 - #98323 (:arrow_up: rust-analyzer)
 - #98329 (Avoid an ICE and instead let the compiler report a useful error)
 - #98330 (update ioslice docs to use shared slices)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoMove some tests to more reasonable directories
Caio [Tue, 21 Jun 2022 12:33:14 +0000 (09:33 -0300)]
Move some tests to more reasonable directories

2 years agoRemove `#[doc(hidden)]` logic from `unused_attributes` lint
León Orell Valerian Liehr [Tue, 21 Jun 2022 11:42:34 +0000 (13:42 +0200)]
Remove `#[doc(hidden)]` logic from `unused_attributes` lint

2 years agoRollup merge of #98330 - conradludgate:io-slice-mut-docs, r=Dylan-DPC
Yuki Okushi [Tue, 21 Jun 2022 11:08:17 +0000 (20:08 +0900)]
Rollup merge of #98330 - conradludgate:io-slice-mut-docs, r=Dylan-DPC

update ioslice docs to use shared slices

I noticed that IoSlice docs were taking unnecessary mut slices, when they only accept shared slices

2 years agoRollup merge of #98329 - oli-obk:fast_path_ice, r=cjgillot
Yuki Okushi [Tue, 21 Jun 2022 11:08:16 +0000 (20:08 +0900)]
Rollup merge of #98329 - oli-obk:fast_path_ice, r=cjgillot

Avoid an ICE and instead let the compiler report a useful error

Fixes #98299

2 years agoRollup merge of #98323 - lnicola:rust-analyzer-2022-06-21, r=lnicola
Yuki Okushi [Tue, 21 Jun 2022 11:08:15 +0000 (20:08 +0900)]
Rollup merge of #98323 - lnicola:rust-analyzer-2022-06-21, r=lnicola

:arrow_up: rust-analyzer

r? ``@ghost``