Commit Graph

209111 Commits

Author SHA1 Message Date
Lukas Wirth
2071d00fd2 Always set up VSCode commands 2022-10-29 00:44:37 +02:00
Cameron Steffen
298253af98 Specialize ToString for Symbol 2022-10-28 16:42:47 -05:00
bors
e69014a81e Auto merge of #13510 - Veykril:status-click, r=Veykril
feat: Clicking the status bar item stops and starts the server
2022-10-28 21:12:27 +00:00
Lukas Wirth
274df54885 feat: Clicking the status bar item stops and starts the server 2022-10-28 23:10:10 +02:00
xxchan
6bc5fddc00 Add a test for TAIT used with impl/dyn Trait inside RPIT 2022-10-28 22:58:19 +02:00
Ralf Jung
c8a5d4b600 relative futex and condvar timeouts can work with isolation 2022-10-28 22:54:50 +02:00
bors
a0fbf0d077 Auto merge of #2630 - RalfJung:windows-parking, r=RalfJung
Implement thread parking for Windows

Cc https://github.com/rust-lang/miri/issues/2628

Based on code by `@DrMeepster.` However I adjusted `WakeByAddressSingle`: I don't think the futex value is compared *again* after the thread is woken up. I see nothing in the Windows docs indicating such a comparison, and the Linux futex does not behave like that either. So we only check the value before sleeping, same as on Linux.
2022-10-28 20:19:28 +00:00
bors
9565dfeb4e Auto merge of #103683 - fee1-dead-contrib:fix-deferred-cast-checks-constness, r=oli-obk
Retain ParamEnv constness when running deferred cast checks

Fixes #103677.
2022-10-28 19:28:41 +00:00
Michael Goulet
c4420135fe Emit proper error when casting to Ddyn-star 2022-10-28 17:33:06 +00:00
bors
77e7b74ad5 Auto merge of #103071 - wesleywiser:fix_inlined_line_numbers, r=davidtwco
Fix line numbers for MIR inlined code

`should_collapse_debuginfo` detects if the specified span is part of a
macro expansion however it does this by checking if the span is anything
other than a normal (non-expanded) kind, then the span sequence is
walked backwards to the root span.

This doesn't work when the MIR inliner inlines code as it creates spans
with expansion information set to `ExprKind::Inlined` and results in the
line number being attributed to the inline callsite rather than the
normal line number of the inlined code.

Fixes #103068
2022-10-28 16:27:56 +00:00
Samuel Moelius
86a4009586 Add walk_generic_arg 2022-10-28 10:36:42 -04:00
Ralf Jung
9b0cdf9a6e cleanup some test cfg 2022-10-28 16:24:56 +02:00
Ralf Jung
40e340e9fb test most sync primitives on Windows 2022-10-28 16:24:56 +02:00
Ralf Jung
8f99d011f2 simplify Linux futex impl a bit 2022-10-28 15:57:28 +02:00
Ralf Jung
3f6fc1fb5a threadleak_ignored should now pass with preemption (the issue has been fixed a while ago) 2022-10-28 15:48:58 +02:00
Ralf Jung
a23d1fb1ac implement thread parking on Windows 2022-10-28 15:48:18 +02:00
bors
5237c4d83d Auto merge of #102674 - CastilloDel:master, r=oli-obk
Remove allow(rustc::potential_query_instability) in rustc_const_eval

The use of FxHashMap has been replaced with FxIndexMap.

Related to #84447
2022-10-28 12:52:17 +00:00
Ryo Yoshida
e0f09cd007
Document the ordering constraint on Binders and Substitution 2022-10-28 21:24:59 +09:00
Ryo Yoshida
5c794210bf
Replace expect test for GATs with check_types 2022-10-28 21:24:55 +09:00
Markus Reiter
b3f9277a17
Remove unneeded attribute. 2022-10-28 14:17:34 +02:00
Deadbeef
a990b4c1d0 Retain ParamEnv constness when running deferred cast checks
Fixes #103677.
2022-10-28 12:03:24 +00:00
bors
4827d41466 Auto merge of #2627 - RalfJung:ignore-windows, r=RalfJung
update ignore-windows comments

Turns out 2 of these tests can actually be enabled. :)
2022-10-28 11:50:15 +00:00
Ralf Jung
676e53f5b1 update ignore-windows comments 2022-10-28 11:42:42 +02:00
bors
a9ef10019f Auto merge of #103671 - matthiaskrgr:rollup-iuugpep, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #102642 (Add tests for static async functions in traits)
 - #103283 (Add suggestions for unsafe impl error codes)
 - #103523 (Fix unwanted merge of inline doc comments for impl blocks)
 - #103550 (diagnostics: do not suggest static candidates as traits to import)
 - #103641 (Don't carry MIR location in `ConstraintCategory::CallArgument`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-28 09:41:40 +00:00
Nixon Enraght-Moony
064ad83cc3 rustdoc-json-types: Improve ItemSummary::path docs 2022-10-28 10:25:48 +01:00
bors
3321c2d3e7 Auto merge of #2626 - RalfJung:pthread_setname_np, r=RalfJung
pthread_setname_np returns an int on macOS

Fixes https://github.com/rust-lang/miri/issues/2625
2022-10-28 08:32:23 +00:00
Ralf Jung
6e3b0df8b8 pthread_setname_np returns an int on macOS 2022-10-28 10:31:43 +02:00
bors
898f463c93 Auto merge of #103672 - matthiaskrgr:rollup-dyk3civ, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #103585 (Migrate source line numbers CSS to CSS variables)
 - #103608 (Remap early bound lifetimes in return-position `impl Trait` in traits too)
 - #103609 (Emit a nicer error on `impl Self {`)
 - #103631 (Add test for issue 36007)
 - #103643 (rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags)
 - #103645 (Update cargo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-28 06:49:38 +00:00
Eric Huss
c2b0cc14d1 Update note about unstable split-debuginfo flag. 2022-10-27 22:24:07 -07:00
Matthias Krüger
2f00f57aef
Rollup merge of #103645 - weihanglo:update-cargo, r=weihanglo
Update cargo

6 commits in 9210810d1fd7b51ae0439a0a363cc50e36963455..7e484fc1a766f56dbc95380f45719698e0c82749 2022-10-25 22:31:50 +0000 to 2022-10-27 15:20:57 +0000
- fix(publish): Block until it is in index (rust-lang/cargo#11062)
- Add Accept-Encoding request header to enable compression (rust-lang/cargo#11292)
- Update contrib docs for highfive transition (rust-lang/cargo#11294)
- Migrate from highfive to triagebot (rust-lang/cargo#11293)
- Fix dupe word typos (rust-lang/cargo#11287)
- Fix confusing error messages when using -Zsparse-registry (rust-lang/cargo#11283)
2022-10-28 07:06:48 +02:00
Matthias Krüger
32c96248c5
Rollup merge of #103643 - notriddle:notriddle/summary-focus-visible, r=GuillaumeGomez
rustdoc: stop hiding focus outlines on non-rustdoc-toggle details tags

We really shouldn't be overriding this kind of stuff unless the browser default is really broken (like outlining the thing that isn't clickable). This directly reverts b8f4e74cbc.
2022-10-28 07:06:47 +02:00
Matthias Krüger
19b406d16b
Rollup merge of #103631 - Rageking8:Add-test-for-issue-36007, r=compiler-errors
Add test for issue 36007

Fixes #36007

r? ``@compiler-errors``
2022-10-28 07:06:47 +02:00
Matthias Krüger
ab0d9dfefe
Rollup merge of #103609 - BoxyUwU:fix_impl_self_cycle, r=compiler-errors
Emit a nicer error on `impl Self {`

currently it emits a "cycle detected error" but this PR makes it emit a more user friendly error specifically saying that `Self` is disallowed in that position. this is a pretty hacky fix so i dont expect this to be merged (I basically only made this PR because i wanted to see if CI passes)

r? ``@compiler-errors``
2022-10-28 07:06:46 +02:00
Matthias Krüger
112fd022cd
Rollup merge of #103608 - compiler-errors:rpitit-early-lt, r=cjgillot
Remap early bound lifetimes in return-position `impl Trait` in traits too

Fixes part of #103457

r? ``@cjgillot,`` though feel free to reassign, just thought you'd have sufficient context to review.
2022-10-28 07:06:46 +02:00
Matthias Krüger
6e1613a0c5
Rollup merge of #103585 - GuillaumeGomez:source-line-css, r=notriddle
Migrate source line numbers CSS to CSS variables

Part of https://github.com/rust-lang/rust/pull/98460.

No UI changes.

r? ``@notriddle``
2022-10-28 07:06:45 +02:00
Matthias Krüger
84663cee39
Rollup merge of #103641 - compiler-errors:issue-103624, r=cjgillot
Don't carry MIR location in `ConstraintCategory::CallArgument`

It turns out that `ConstraintCategory::CallArgument` cannot just carry a MIR location in it, since we may bubble them up to totally different MIR bodies.

So instead, revert the commit a6b5f95fb0, and instead just erase regions from the original `Option<Ty<'tcx>>` that it carried, so that it doesn't ICE with the changes in #103220.

Best reviewed in parts -- the first is just a revert, and the second is where the meaningful changes happen.

Fixes #103624
2022-10-28 07:06:43 +02:00
Matthias Krüger
f541ad9165
Rollup merge of #103550 - notriddle:notriddle/no-suggest-static-candidates, r=wesleywiser
diagnostics: do not suggest static candidates as traits to import

If it's a static candidate, then it's already implemented. Do not suggest it a second time for implementing.

Partial fix for #102354
2022-10-28 07:06:43 +02:00
Matthias Krüger
2f02cf8768
Rollup merge of #103523 - GuillaumeGomez:inline-doc-comment-impl-block, r=notriddle
Fix unwanted merge of inline doc comments for impl blocks

Fixes https://github.com/rust-lang/rust/issues/102909.

We need this merge mechanism for inlined items but it's completely unwanted for impl blocks (at least the doc comments are, not the other attributes) since we want to keep what `cfg()` is put on the `pub use` or other attributes.

r? ``@notriddle``
2022-10-28 07:06:42 +02:00
Matthias Krüger
270e0c5357
Rollup merge of #103283 - nbarrios1337:unsafe-impl-suggestions, r=cjgillot
Add suggestions for unsafe impl error codes

Adds suggestions for users to add `unsafe` to trait impls that should be `unsafe`, and remove `unsafe` from trait impls that do not require `unsafe`

With the folllowing code:

```rust
struct Foo {}

struct Bar {}

trait Safe {}

unsafe trait Unsafe {}

impl Safe for Foo {} // ok

impl Unsafe for Foo {} // E0200

unsafe impl Safe for Bar {} // E0199

unsafe impl Unsafe for Bar {} // ok

// omitted empty main fn
```

The current rustc output is:
```
error[E0199]: implementing the trait `Safe` is not unsafe
  --> e0200.rs:13:1
   |
13 | unsafe impl Safe for Bar {} // E0199
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0200]: the trait `Unsafe` requires an `unsafe impl` declaration
  --> e0200.rs:11:1
   |
11 | impl Unsafe for Foo {} // E0200
   | ^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0199, E0200.
For more information about an error, try `rustc --explain E0199`.
```

With this PR, the future rustc output would be:
```
error[E0199]: implementing the trait `Safe` is not unsafe
  --> ../../temp/e0200.rs:13:1
   |
13 | unsafe impl Safe for Bar {} // E0199
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: remove `unsafe` from this trait implementation
   |
13 - unsafe impl Safe for Bar {} // E0199
13 + impl Safe for Bar {} // E0199
   |

error[E0200]: the trait `Unsafe` requires an `unsafe impl` declaration
  --> ../../temp/e0200.rs:11:1
   |
11 | impl Unsafe for Foo {} // E0200
   | ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: the trait `Unsafe` enforces invariants that the compiler can't check. Review the trait documentation and make sure this implementation upholds those invariants before adding the `unsafe` keyword
help: add `unsafe` to this trait implementation
   |
11 | unsafe impl Unsafe for Foo {} // E0200
   | ++++++

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0199, E0200.
For more information about an error, try `rustc --explain E0199`.
```

``@rustbot`` label +T-compiler +A-diagnostics +A-suggestion-diagnostics
2022-10-28 07:06:42 +02:00
Matthias Krüger
c404092084
Rollup merge of #102642 - bryangarza:afit-tests, r=compiler-errors
Add tests for static async functions in traits

This patch adds test cases for AFIT, the majority of which are currently expected to run as `check-fail`.

---

Note: I grabbed the cases from https://hackmd.io/SwRcXCiWQV-WRJ4BYs53fA

Also, I'm not sure if the `async-associated-types2` and `async-associated-types2-desugared` are correct, I modified them a bit from the examples in the HackMD.
2022-10-28 07:06:41 +02:00
Rageking8
92b314ba30 add test for issue 98634 2022-10-28 10:07:54 +08:00
Ben Kimock
17b86cb611 Do fewer passes and generally be more efficient when filtering tests 2022-10-27 21:34:56 -04:00
Michael Howell
509d8ad454 rustdoc: remove redundant div.search-container
This wrapper DIV was originally added in
89e1fb3223, when it allowed the search bar's
size to be calculated without using `calc()`. This `width` hack can be
removed using flexbox.
2022-10-27 17:48:26 -07:00
bors
cdd7afeaad Auto merge of #103654 - flip1995:clippy_backport, r=Manishearth
Move clippy::uninlined_format_args back to pedantic

Before `beta` is branched tomorrow we want to move this lint back to `pedantic` so that it is not enabled by default.

Clippy PR: https://github.com/rust-lang/rust-clippy/pull/9728
Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/.60uninlined_format_args.60.20category/near/306306974

r? `@Manishearth`
2022-10-28 00:34:32 +00:00
Bryan Garza
bfdefdbfb7 Update tests based on feedback
- Add comment to some tests that will break when #102745 is implemented
- Mark a test with known-bug
- Delete duplicate test
2022-10-27 22:58:54 +00:00
Bryan Garza
0b3b046436 Update src/test/ui/async-await/in-trait/async-example.rs
Co-authored-by: Michael Goulet <michael@errs.io>
2022-10-27 22:58:54 +00:00
Bryan Garza
9a05081d5f Add additional tests for static AFIT 2022-10-27 22:58:54 +00:00
Bryan Garza
11b1439380 Update tests based on feedback 2022-10-27 22:58:54 +00:00
Bryan Garza
8a0ebca97e Update static AFIT tests based on feedback 2022-10-27 22:58:54 +00:00
Bryan Garza
97423d331f Add tests for static async functions in traits
This patch adds test cases for AFIT, the majority of which are currently
expected to run as `check-fail`.
2022-10-27 22:58:53 +00:00