Commit Graph

171487 Commits

Author SHA1 Message Date
Takayuki Maeda
9ebe2d0c92 add regression test for #79494
use MCVE
2022-06-30 11:49:01 +09:00
Ralf Jung
43551993c6 update Miri 2022-06-29 22:14:03 -04:00
Tshepang Mbambo
398e7784dd use "or pattern" 2022-06-30 03:05:51 +02:00
bors
5d3c6d6c83 Auto merge of #98691 - matthiaskrgr:rollup-ymsa64p, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #96727 (Make TAIT behave exactly like RPIT)
 - #98681 (rustdoc-json: Make default value of blanket impl assoc types work)
 - #98682 (add tests for ICE 94432)
 - #98683 (add test for ice 68875)
 - #98685 (Replace `sort_modules_alphabetically` boolean with enum)
 - #98687 (add test for 47814)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-06-30 01:02:24 +00:00
Vincenzo Palazzo
86c1a734f5
ui test: add test of blanklet implementation
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-06-30 01:13:24 +01:00
Vincenzo Palazzo
81abfe3913
add blanket impl suggestion to the local traits
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-06-30 01:13:22 +01:00
Tomasz Miąsko
debee1e581 Update RELEASES.md
Clarify that flow sensitive checks now understand that *visibly*
uninhabited call expressions never return.

The change influences checks of reachable and unreachable code alike,
not just dead code like previous wording would imply.
2022-06-30 00:00:00 +00:00
Ralf Jung
6c990f48af fix doc issues 2022-06-29 19:18:30 -04:00
Matthias Krüger
943c6c7444
Rollup merge of #98687 - matthiaskrgr:test_47814, r=compiler-errors
add test for 47814

not sure if the issue should actually get closed though, hm

r? ``@compiler-errors``
2022-06-30 00:23:55 +02:00
Matthias Krüger
57c683afab
Rollup merge of #98685 - camelid:sorting-flag, r=GuillaumeGomez
Replace `sort_modules_alphabetically` boolean with enum

This fixes the long-standing FIXME there and makes the code easier to
understand. The reference to modules in both the old and new names seems
potentially wrong since I believe it applies to all items.

r? ``@GuillaumeGomez``
2022-06-30 00:23:54 +02:00
Matthias Krüger
ad682ad391
Rollup merge of #98683 - matthiaskrgr:ice-test-68875, r=compiler-errors
add test for ice 68875

Fixes #68875
2022-06-30 00:23:53 +02:00
Matthias Krüger
19f45e29b9
Rollup merge of #98682 - matthiaskrgr:test-94432, r=compiler-errors
add tests for ICE 94432

Fixes #94432
2022-06-30 00:23:52 +02:00
Matthias Krüger
6d6b30ccbf
Rollup merge of #98681 - Enselic:rustdoc-json-default-assoc-type-blanket-impl, r=GuillaumeGomez
rustdoc-json: Make default value of blanket impl assoc types work

Closes #98658

r? ``@GuillaumeGomez``

``@rustbot`` labels +A-rustdoc-json
2022-06-30 00:23:51 +02:00
Matthias Krüger
48170d5a1c
Rollup merge of #96727 - oli-obk:no_expect, r=lcnr
Make TAIT behave exactly like RPIT

fixes https://github.com/rust-lang/rust/issues/96552

This makes type-alias-impl-trait behave like return-position-impl-trait. Unfortunately it also causes some cases to stop compiling due to "needing type annotations" and makes panicking cause fallback for the hidden type to `()`.

All of these are addressable, but we should probably address them for RPIT and TAIT together

r? ``@lcnr``
2022-06-30 00:23:50 +02:00
bors
bf45371f26 Auto merge of #98520 - RalfJung:invalid, r=compiler-errors
interpret: adjust error from constructing an invalid value
2022-06-29 22:21:43 +00:00
Guillaume Gomez
277b77a5de Update browser-ui-test version to 0.9.7 2022-06-29 23:20:21 +02:00
Ralf Jung
f60ec83779 interpret: add From<&MplaceTy> for PlaceTy 2022-06-29 17:13:13 -04:00
Matthias Krüger
c9f2865472 add test for 47814
not sure if the issue should actually get closed though, hm

r? @compiler-errors
2022-06-29 22:29:02 +02:00
Matthias Krüger
ddb6313b61 add ice test for 46511
Fixes #46511
2022-06-29 22:16:36 +02:00
Noah Lev
be0b1121e9 Replace sort_modules_alphabetically boolean with enum
This fixes the long-standing FIXME there and makes the code easier to
understand. The reference to modules in both the old and new names seems
potentially wrong since I believe it applies to all items.
2022-06-29 13:04:43 -07:00
Ralf Jung
a58d8f6616 ping more people
Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2022-06-29 16:03:24 -04:00
Ralf Jung
ab01a73151 move MIR syntax into a dedicated file and ping some people whenever it changes 2022-06-29 16:03:24 -04:00
Matthias Krüger
afd8cf25f5 add test for 72793
Fixes #72793

r? @oli-obk
2022-06-29 21:55:23 +02:00
Matthias Krüger
5f75e7104a add test for ice 68875
Fixes #68875
2022-06-29 21:38:42 +02:00
Matthias Krüger
726d6136e3 add tests for ICE 94432
Fixes #94432
2022-06-29 21:30:19 +02:00
Martin Nordholts
ba87c934ea rustdoc-json: Make default value of blanket impl assoc types work 2022-06-29 21:05:51 +02:00
bors
ddcbba036a Auto merge of #98680 - matthiaskrgr:rollup-1bkrrn9, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #98434 (Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.)
 - #98636 (Triagebot: Fix mentions word wrapping.)
 - #98642 (Fix #98260)
 - #98643 (Improve pretty printing of valtrees for references)
 - #98646 (rustdoc: fix bugs in main.js popover help and settings)
 - #98647 (Update cargo)
 - #98652 (`alloc`: clean and ensure `no_global_oom_handling`  builds are warning-free)
 - #98660 (Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.)
 - #98665 (Use verbose help for deprecation suggestion)
 - #98668 (Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-06-29 18:42:19 +00:00
Matthias Krüger
d34c4ca9be
Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC
Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`

This patch removes some`&str` to `String` conversions with `MultiSpan::push_span_label`.
2022-06-29 20:35:07 +02:00
Matthias Krüger
d708bc45c4
Rollup merge of #98665 - ChrisDenton:deprecated-suggestion, r=compiler-errors
Use verbose help for deprecation suggestion

Fixes #98631

r? `@compiler-errors`
2022-06-29 20:35:06 +02:00
Matthias Krüger
bba00b5855
Rollup merge of #98660 - eddyb:invalid-punct-stage1, r=lqd
Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.

#98188 broke `./x.py test --stage 1` (which I thought we ran in PR CI, cc `@rust-lang/infra)` i.e. the default `./x.py test` in dev checkouts, as the panic in `src/test/ui/proc-macro/invalid-punct-ident-1.rs` moved from the server (`rustc`) to the client (proc macro), and that means it's now affected by #59998.

I made the test look like `src/test/ui-fulldeps/issue-76270-panic-in-libproc-macro.rs` tho I'm a bit confused why that one is in `src/test/ui-fulldeps`, it should still work in `src/test/ui`, no? (cc `@Aaron1011)`
2022-06-29 20:35:05 +02:00
Matthias Krüger
7dedec7be7
Rollup merge of #98652 - ojeda:warning-free-no_global_oom_handling, r=joshtriplett
`alloc`: clean and ensure `no_global_oom_handling`  builds are warning-free

Rust 1.62.0 introduced a couple new `unused_imports` warnings
in `no_global_oom_handling` builds, making a total of 5 warnings.

<details>

```txt
warning: unused import: `Unsize`
 --> library/alloc/src/boxed/thin.rs:6:33
  |
6 | use core::marker::{PhantomData, Unsize};
  |                                 ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `from_fn`
  --> library/alloc/src/string.rs:51:18
   |
51 | use core::iter::{from_fn, FusedIterator};
   |                  ^^^^^^^

warning: unused import: `core::ops::Deref`
  --> library/alloc/src/vec/into_iter.rs:12:5
   |
12 | use core::ops::Deref;
   |     ^^^^^^^^^^^^^^^^

warning: associated function `shrink` is never used
   --> library/alloc/src/raw_vec.rs:424:8
    |
424 |     fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> {
    |        ^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: associated function `forget_remaining_elements` is never used
   --> library/alloc/src/vec/into_iter.rs:126:19
    |
126 |     pub(crate) fn forget_remaining_elements(&mut self) {
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
```

</details>

This PR cleans them and ensures no new ones are introduced
so that projects compiling `alloc` without infallible allocations
do not see them (and may want to enable `-Dwarnings`).

The couple `dead_code` ones may be reverted when some fallible
allocation support starts using them.
2022-06-29 20:35:04 +02:00
Matthias Krüger
2c702c2f17
Rollup merge of #98647 - ehuss:update-cargo, r=ehuss
Update cargo

2 commits in a5e08c4703f202e30cdaf80ca3e7c00baa59c496..dbff32b27893b899ae2397f3d56d1be111041d56
2022-06-23 20:12:03 +0000 to 2022-06-24 19:25:13 +0000
- Fetch GitHub commits by long hash more efficiently (rust-lang/cargo#10079)
- refactor(test): Clarify asserts are for UI (rust-lang/cargo#10778)
2022-06-29 20:35:03 +02:00
Matthias Krüger
1fef19a216
Rollup merge of #98646 - notriddle:notriddle/main.js, r=GuillaumeGomez
rustdoc: fix bugs in main.js popover help and settings
2022-06-29 20:35:02 +02:00
Matthias Krüger
921e311da2
Rollup merge of #98643 - voidc:valtree-ref-pretty, r=lcnr
Improve pretty printing of valtrees for references

This implements the changes outlined in https://github.com/rust-lang/rust/issues/66451#issuecomment-1168859638.

r? `@lcnr`
Fixes #66451
2022-06-29 20:35:01 +02:00
Matthias Krüger
05c0b2e397
Rollup merge of #98642 - yanchen4791:issue-98260-fix, r=spastorino
Fix #98260

Fixes https://github.com/rust-lang/rust/issues/98260
2022-06-29 20:35:00 +02:00
Matthias Krüger
17d3868c85
Rollup merge of #98636 - ehuss:mentions-wrapping, r=Mark-Simulacrum
Triagebot: Fix mentions word wrapping.

I forgot that GitHub's markdown treats newlines as hard breaks. This was causing some ugly-looking word wrapping in the triagebot mention messages. This fixes it so that the lines are not hard-wrapped.
2022-06-29 20:34:59 +02:00
Matthias Krüger
96bb98c9c0
Rollup merge of #98434 - dpaoliello:staticcrt, r=jyn514
Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.

When attempting to build rustc with LLVM on Windows, I noticed that the CRT flag provided to the C and C++ Compilers was inconsistent:

```
"-DCMAKE_C_FLAGS=-nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS=-nologo -MD -Brepro"
```

Since the bootstrapper also sets the various `LLVM_USE_CRT` variables, this resulted in cl.exe reporting a bunch of warnings:

```
cl : Command line warning D9025 : overriding '/MD' with '/MT'
```

The root cause for this is that `cc_detect::find` was creating a `cc::Build` twice, but didn't set `static_crt` the second time.

It's possible that this what is also causing #81381
2022-06-29 20:34:58 +02:00
Matthias Krüger
7dc0489965 fix ICE with -Wrust-2021-incompatible-closure-captures
Fixes #93117
Fixes #96258
2022-06-29 20:32:32 +02:00
Jason Newcomb
adbc8499d3 Don't lint while_let_loop when drop order would change 2022-06-29 13:43:05 -04:00
Jason Newcomb
58434ae385 Extract util functions from redundant_pattern_match 2022-06-29 13:42:59 -04:00
Ralf Jung
549940c491 fix stderr by hand since that test is not run on my system 2022-06-29 11:26:24 -04:00
Ralf Jung
238501c137 interpret: adjust error from constructing an invalid value 2022-06-29 11:26:24 -04:00
bors
70f1d0d8fd Auto merge of #9043 - dswij:9037-test, r=Manishearth
`extra_unused_lifetimes` add FP test case emitting from derived attributes.

Add test to cover for #9014 which is fixed in #9037.

changelog: [`extra_unused_lifetimes`] Add FP test case emitting from derived attributes.

---

Seeing the FP from the test:

```sh
$ git revert -m 1 1d1ae10876
$ TESTNAME=extra_unused_lifetime cargo uitest
```
2022-06-29 15:09:37 +00:00
bors
3fcf43bb0f Auto merge of #98669 - Dylan-DPC:rollup-8uzhcip, r=Dylan-DPC
Rollup of 7 pull requests

Successful merges:

 - #98415 (Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic`)
 - #98479 (Add `fetch_not` method on `AtomicBool`)
 - #98499 (Erase regions in New Abstract Consts)
 - #98516 (library: fix uefi va_list type definition)
 - #98554 (Fix box with custom allocator in miri)
 - #98607 (Clean up arg mismatch diagnostic, generalize tuple wrap suggestion)
 - #98625 (emit Retag for compound types with reference fields)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-06-29 15:05:29 +00:00
Guillaume Gomez
be569634e1 Add test for source sidebar toggle 2022-06-29 15:30:01 +02:00
Guillaume Gomez
ad970a72c3 Fix display of toggle on expanded source sidebar 2022-06-29 15:28:16 +02:00
bors
90227c10f7 Auto merge of #8981 - PrestonFrom:more_details_for_significant_drop_lint, r=flip1995
Add details about how significant drop in match scrutinees can cause deadlocks

Adds more details about how a significant drop in a match scrutinee can cause a deadlock and include link to documentation.

changelog: Add more details to significant drop lint to explicitly show how temporaries in match scrutinees can cause deadlocks.
2022-06-29 13:23:21 +00:00
Guillaume Gomez
ea97bdc908 Update/add tests for source sidebar in mobile mode 2022-06-29 15:15:53 +02:00
Guillaume Gomez
27ff258826 Fix height for the source sidebar in mobile mode 2022-06-29 15:15:40 +02:00
Dylan DPC
68228be560
Rollup merge of #98625 - RalfJung:retag, r=oli-obk
emit Retag for compound types with reference fields

I want to add an option to Miri to do retagging inside reference fields. But that means we first have to even emit `Retag` for types that *contain* references (rather than being of reference types). :)

Stacked Borrows originally did that, but we stopped doing it when hitting bunch of issues in the standard library. However I have since realized that we actually do emit `noalias` for newtypes references, which means for soundness we should recurse into fields. Also it'd probably be bad news if newtypes lose out on optimizations (and they don't, for anything else). I want to add an option for that to Miri so that we can start experimenting with those semantics.

r? ``@oli-obk``
2022-06-29 17:59:37 +05:30