Commit graph

163147 commits

Author SHA1 Message Date
Pietro Albini
31f4840af5
switch channel to stable 2022-04-04 10:47:42 +02:00
Pietro Albini
c57a845dcd
pull up to date relnotes 2022-04-04 10:47:40 +02:00
Thom Chiovoloni
47ed234a05
Indicate the correct error code in the compile_fail block.
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
2022-04-04 10:47:29 +02:00
Thom Chiovoloni
72bc4ae3bb
Add a compile_fail doctest to check that io::Error: !UnwindSafe 2022-04-04 10:47:28 +02:00
Thom Chiovoloni
c763f06074
Ensure io::Error's bitpacked repr doesn't accidentally impl UnwindSafe 2022-04-04 10:47:26 +02:00
bors
edbed409aa Auto merge of #95464 - lcnr:backport-94925, r=Dylan-DPC
[beta] backport #94925

backports #94925

looks like that PR might have slipped through 🤔 does it help if there's an open issue to track that in the future, or are there other things I can do to make this less likely in the future?

r? `@Mark-Simulacrum`
2022-03-31 02:53:34 +00:00
lcnr
f81aea969d backport #94925 2022-03-30 08:36:41 +02:00
bors
7bccde1976 Auto merge of #95093 - compiler-errors:beta-correctly, r=Mark-Simulacrum
[beta] Remove statement that was forgotten when backporting #94596

This `if` statement was introduced in #94438, then removed in #94596. Both of these PRs were beta-backported in #94933, but I think there was a mistake in the order they were applied or this removal was overlooked. I think this fixes the remaining issues referenced in https://github.com/rust-lang/rust/issues/94511#issuecomment-1072851886.

Not sure this is the correct way to put something up for beta-backport, but the PR is at least open so it can be referenced and the commit can be cherry-picked. Feel free to close this PR.

r? `@Mark-Simulacrum`
cc: #94511
2022-03-22 11:37:52 +00:00
Michael Goulet
3191edeaab remove statement that was forgotten when backporting #94438 2022-03-18 16:41:56 -07:00
bors
6ee5a408a3 Auto merge of #95061 - cuviper:beta-stage0, r=Mark-Simulacrum
[beta] backports + bootstrap bump

Add pending backports:

* Revert accidental stabilization #94805
* Do not recover from Ty? in macro parsing #94593
* Fix cmake build. #95050

And updates the bootstrap compiler to 1.59.0.
2022-03-18 17:31:21 +00:00
Eric Huss
113631b4fc Fix cmake build.
(cherry picked from commit 8322cdb1da)
2022-03-18 08:33:58 -07:00
Esteban Kuber
8dad22def9 Do not recover from Ty? in macro parsing
Follow up to #92746. Address #94510.

(cherry picked from commit 004f2ed219)
2022-03-17 18:26:22 -07:00
Oli Scherer
ac796ac9fa Revert accidental stabilization
(cherry picked from commit 5f7ca55df6)
2022-03-17 18:26:02 -07:00
Josh Stone
a75e26d73e Update the bootstrap compiler to 1.59.0 2022-03-17 18:04:38 -07:00
bors
99f967e7ed Auto merge of #94933 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports

* Update LLVM submodule #94764
* Statically compile libstdc++ everywhere if asked #94719
* Downgrade #[test] on macro call to warning #94624
* Delay bug in expr adjustment when check_expr is called multiple times #94596
* bootstrap: correct reading of flags for llvm #94466
* Check method input expressions once #94438
* remove feature gate in control_flow examples #94283

r? `@Mark-Simulacrum`
2022-03-14 18:47:04 +00:00
Mark Rousskov
12cae30c5c Drop forget_guarantee, introduced only on master 2022-03-14 12:02:18 -04:00
Marcel Hellwig
9d7e021fad remove feature gate in control_flow examples 2022-03-14 11:50:40 -04:00
Michael Goulet
0fe9be43d6 only check method inputs once 2022-03-14 11:50:10 -04:00
Jon Gjengset
9823bc6952 bootstrap: correct reading of flags for llvm
First, this reverts the `CFLAGS`/`CXXFLAGS` of #93918. Those flags are
already read by `cc` and populated into `Build` earlier on in the
process. We shouldn't be overriding that based on `CFLAGS`, since `cc`
also respects overrides like `CFLAGS_{TARGET}` and `HOST_CFLAGS`, which
we want to take into account.

Second, this adds the same capability to specify target-specific
versions of `LDFLAGS` as we have through `cc` for the `C*` flags:
https://github.com/alexcrichton/cc-rs#external-configuration-via-environment-variables

Note that this also necessitated an update to compiletest to treat
CXXFLAGS separately from CFLAGS.
2022-03-14 11:49:31 -04:00
Michael Goulet
7237f15075 delay bug instead of skipping check_expr 2022-03-14 11:48:47 -04:00
Esteban Kuber
27b6c449f7 Downgrade #[test] on macro call to warning
Follow up to #92959. Address #94508.
2022-03-14 11:48:32 -04:00
Jon Gjengset
099acb0c44 Statically compile libstdc++ everywhere if asked
PR #93918 made it so that `-static-libstdc++` was only set in one place,
and was only set during linking, but accidentally also made it so that
it is no longer passed when building LLD or sanitizers, only when
building LLVM itself. This moves the logic for setting
`-static-libstdc++` in the linker flags back to `configure_cmake` so
that it takes effect for all CMake invocations in `native.rs`.

As a side-effect, this also causes libstdc++ to be statically compiled
into sanitizers and LLD if `llvm-tools-enabled` is set but
`llvm-static-stdcpp` is not, even though previously it was only linked
statically if `llvm-static-stdcpp` was set explicitly. But that seems
more like the expected behavior anyway.
2022-03-14 11:47:57 -04:00
Nikita Popov
32fb22d756 Enable issue-23036.rs on wasm32 2022-03-14 11:46:37 -04:00
Nikita Popov
59387f5376 Use new pass manager on s390x with LLVM 14
The problematic compile-time issue should be resolved with this
version.
2022-03-14 11:46:37 -04:00
Nikita Popov
897ce09f6d Update LLVM submodule 2022-03-14 11:46:37 -04:00
bors
e5effbd0b3 Auto merge of #94552 - lcnr:fix-94502, r=oli-obk
[beta] backport fix for #94502

this issue was fixed as part of #93368, so i extracted the change from there

closes #94502
2022-03-07 10:15:03 +00:00
lcnr
a392f1573b backport fix for #94502 2022-03-07 08:44:24 +01:00
bors
c1d075a459 Auto merge of #94545 - ehuss:beta-backports, r=ehuss
[beta] Beta backports

* No branch protection metadata unless enabled #93516
* update auto trait lint for PhantomData #94315
* Cargo:
    * [1.60] Fix term.verbose without quiet, and vice versa (rust-lang/cargo#10436)
    * [beta] Add common profile validation. (rust-lang/cargo#10413)
    * Avoid new deprecation warnings from clap 3.1.0 (rust-lang/cargo#10396)
2022-03-03 06:56:22 +00:00
bors
7eda3298c8 Auto merge of #93516 - nagisa:branch-protection, r=cjgillot
No branch protection metadata unless enabled

Even if we emit metadata disabling branch protection, this metadata may
conflict with other modules (e.g. during LTO) that have different branch
protection metadata set.

This is an unstable flag and feature, so ideally the flag not being
specified should act as if the feature wasn't implemented in the first
place.

Additionally this PR also ensures we emit an error if
`-Zbranch-protection` is set on targets other than the supported
aarch64. For now the error is being output from codegen, but ideally it
should be moved to earlier in the pipeline before stabilization.
2022-03-02 20:21:08 -08:00
Dylan DPC
150cc0c029 Rollup merge of #94315 - lcnr:auto-trait-lint-update, r=oli-obk
update auto trait lint for `PhantomData`

cc https://github.com/rust-lang/rust/issues/93367#issuecomment-1047898410
2022-03-02 20:14:43 -08:00
Eric Huss
cace605f08 [beta] Update cargo 2022-03-02 20:14:17 -08:00
bors
0a4f984a87 Auto merge of #94228 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] Branch 1.60 beta

r? `@Mark-Simulacrum`
2022-02-22 17:44:06 +00:00
Mark Rousskov
07493dd547 Temporarily avoid errors on RLS failure in parallel 2022-02-21 21:34:55 -05:00
Mark Rousskov
95cf5449dd Fix up unused imports in rustfmt tests 2022-02-21 14:32:07 -05:00
Mark Rousskov
e5c9e1ea1a Branch 1.60 beta 2022-02-21 14:03:10 -05:00
bors
e08d569360 Auto merge of #94148 - matthiaskrgr:rollup-jgea68f, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #92902 (Improve the documentation of drain members)
 - #93658 (Stabilize `#[cfg(panic = "...")]`)
 - #93954 (rustdoc-json: buffer output)
 - #93979 (Add debug assertions to validate NUL terminator in c strings)
 - #93990 (pre #89862 cleanup)
 - #94006 (Use a `Field` in `ConstraintCategory::ClosureUpvar`)
 - #94086 (Fix ScalarInt to char conversion)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-02-19 12:15:10 +00:00
Matthias Krüger
5a083dbbe6
Rollup merge of #94086 - tmiasko:char-try-from-scalar-int, r=davidtwco
Fix ScalarInt to char conversion

to avoid panic for invalid Unicode scalar values
2022-02-19 06:45:33 +01:00
Matthias Krüger
c28940e49d
Rollup merge of #94006 - pierwill:upvar-field, r=nikomatsakis
Use a `Field` in `ConstraintCategory::ClosureUpvar`

As part of #90317, we do not want `HirId` to implement `Ord`, `PartialOrd`. This line of code has made that difficult

1b27144afc/compiler/rustc_borrowck/src/region_infer/mod.rs (L2184)

since it sorts a [`ConstraintCategory::ClosureUpvar(HirId)`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/enum.ConstraintCategory.html#variant.ClosureUpvar).

This PR makes that variant take a [`Field`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/mir/struct.Field.html) instead.

r? `@nikomatsakis`
2022-02-19 06:45:32 +01:00
Matthias Krüger
78e4456e1f
Rollup merge of #93990 - lcnr:pre-89862-cleanup, r=estebank
pre #89862 cleanup

changes used in #89862 which can be landed without the rest of this PR being finished.

r? `@estebank`
2022-02-19 06:45:31 +01:00
Matthias Krüger
26dd6ac830
Rollup merge of #93979 - SUPERCILEX:debug_check, r=dtolnay
Add debug assertions to validate NUL terminator in c strings

The `unchecked` variants from the stdlib usually perform the check anyway if debug assertions are on (for example, `unwrap_unchecked`). This PR does the same thing for `CStr` and `CString`, validating the correctness for the NUL byte in debug mode.
2022-02-19 06:45:30 +01:00
Matthias Krüger
554aea90b8
Rollup merge of #93954 - aDotInTheVoid:json-buffer, r=Mark-Simulacrum
rustdoc-json: buffer output

It turns out we were doing syscalls for each part of the json syntax

Before:
```
...
[pid 1801267] write(5, "\"", 1)         = 1
[pid 1801267] write(5, ",", 1)          = 1
[pid 1801267] write(5, "\"", 1)         = 1
...
```

After:

```
[pid 1974821] write(5, "{\"root\":\"0:0\",\"crate_version\":nu"..., 1575) = 1575
```

In one benchmark (one struct, almost all time in `std`), this gives ~2x perf

r? `@CraftSpider`

`@rustbot` modify labels: +A-rustdoc-json +T-rustdoc -A-testsuite
2022-02-19 06:45:30 +01:00
Matthias Krüger
f19adc7acc
Rollup merge of #93658 - cchiw:issue-77443-fix, r=joshtriplett
Stabilize `#[cfg(panic = "...")]`

[Stabilization PR](https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr) for #77443
2022-02-19 06:45:29 +01:00
Matthias Krüger
4fa71ed0f0
Rollup merge of #92902 - ssomers:docter_drain, r=yaahc
Improve the documentation of drain members

hopefully fixes #92765
2022-02-19 06:45:28 +01:00
bors
cb4ee81ef5 Auto merge of #94105 - 5225225:destabilise-entry-insert, r=Mark-Simulacrum
Destabilise entry_insert

See: https://github.com/rust-lang/rust/pull/90345

I didn't revert the rename that was done in that PR, I left it as `entry_insert`.

Additionally, before that PR, `VacantEntry::insert_entry` seemingly had no stability attribute on it? I kept the attribute, just made it an unstable one, same as the one on `Entry`.

There didn't seem to be any mention of this in the RELEASES.md, so I don't think there's anything for me to do other than this?
2022-02-19 05:08:13 +00:00
bors
1882597991 Auto merge of #94134 - matthiaskrgr:rollup-b132kjz, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #89892 (Suggest `impl Trait` return type when incorrectly using a generic return type)
 - #91675 (Add MemTagSanitizer Support)
 - #92806 (Add more information to `impl Trait` error)
 - #93497 (Pass `--test` flag through rustdoc to rustc so `#[test]` functions can be scraped)
 - #93814 (mips64-openwrt-linux-musl: correct soft-foat)
 - #93847 (kmc-solid: Use the filesystem thread-safety wrapper)
 - #93877 (asm: Allow the use of r8-r14 as clobbers on Thumb1)
 - #93892 (Only mark projection as ambiguous if GAT substs are constrained)
 - #93915 (Implement --check-cfg option (RFC 3013), take 2)
 - #93953 (Add the `known-bug` test directive, use it, and do some cleanup)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-02-19 02:07:43 +00:00
Stein Somers
a677e60840 Collections: improve the documentation of drain members 2022-02-19 00:55:31 +01:00
bors
5a1a3707ff Auto merge of #94050 - michaelwoerister:fix-unsized-tuple-debuginfo, r=pnkfelix
debuginfo: Support fat pointers to unsized tuples.

This PR makes fat pointer debuginfo generation handle the case of unsized tuples.

Fixes #93871
2022-02-18 23:18:12 +00:00
Matthias Krüger
620b0c5122
Rollup merge of #93953 - jackh726:known_bug, r=Mark-Simulacrum
Add the `known-bug` test directive, use it, and do some cleanup

cc rust-lang/compiler-team#476

Now tests can be annotated with `known-bug`, which should indicate that the test *should* pass (or at least that the current output is a bug). Adding it relaxes the requirement to add error annotations to the test (though it is still allowed). In the future, this could be extended with further relaxations - with the goal to make adding these tests need minimal effort.

I've used this attribute for the GAT tests added in #93757.

Finally, I've also cleaned up `header.rs` in compiletest a bit, by extracting out a bit of common logic. I've also split out some of the directives into their own consts. This removes a lot of very similar functions from `Config` and makes `TestProps::load_from` read nicer.

I've split these into separate commits, so I in theory could split these into separate PRs if they're controversial, but I think they're pretty straightforward.

r? ``@Mark-Simulacrum``
2022-02-18 23:23:11 +01:00
Matthias Krüger
576afec73a
Rollup merge of #93915 - Urgau:rfc-3013, r=petrochenkov
Implement --check-cfg option (RFC 3013), take 2

This pull-request implement RFC 3013: Checking conditional compilation at compile time (https://github.com/rust-lang/rfcs/pull/3013) and is based on the previous attempt https://github.com/rust-lang/rust/pull/89346 by `@mwkmwkmwk` that was closed due to inactivity.

I have address all the review comments from the previous attempt and added some more tests.

cc https://github.com/rust-lang/rust/issues/82450
r? `@petrochenkov`
2022-02-18 23:23:10 +01:00
Matthias Krüger
1e2f63de0a
Rollup merge of #93892 - compiler-errors:issue-92917, r=jackh726,nikomatsakis
Only mark projection as ambiguous if GAT substs are constrained

A slightly more targeted version of #92917, where we only give up with ambiguity if we infer something about the GATs substs when probing for a projection candidate.

fixes #93874
also note (but like the previous PR, does not fix) #91762

r? `@jackh726`
cc `@nikomatsakis` who reviewed #92917
2022-02-18 23:23:09 +01:00