Commit Graph

209164 Commits

Author SHA1 Message Date
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
bors bd4a56bce8 Auto merge of #2624 - WaffleLapkin:iforgor💀, r=RalfJung
Implement `ptr_mask` intrinsic

I promised I'll implement it, but then forgot 😅
2022-10-27 22:48:45 +00:00
bors 126dbdc9c7 Auto merge of #103629 - matthiaskrgr:rollup-r94tqfa, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #103110 (remove redundant Send impl for references)
 - #103255 (Clean up hidden type registration)
 - #103394 (Clarify documentation about the memory layout of `UnsafeCell`)
 - #103408 (Clean return-position `impl Trait` in traits correctly in rustdoc)
 - #103505 (rustdoc: parse self-closing tags and attributes in `invalid_html_tags`)
 - #103524 (rustc_metadata: Add struct and variant constructors to module children at encoding time)
 - #103544 (Add flag to forbid recovery in the parser)
 - #103616 (rustdoc: remove CSS workaround for Firefox 29)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-10-27 21:36:07 +00:00
Boxy b3425587a6 tidy + move logic to fn 2022-10-27 22:29:16 +01:00
Boxy ca5a6e43dd use proper spans 2022-10-27 22:18:26 +01:00
Boxy c00ff9c4d0 DoIt 2022-10-27 21:48:47 +01:00
Philipp Krones 3f24108662
Move clippy::uninlined_format_args back to pedantic 2022-10-27 22:24:24 +02:00
Maybe Waffle 7663305dff Implement `ptr_mask` intrinsic 2022-10-27 23:47:50 +04:00
Camille GILLOT cb1e7d9676 Only ban duplication across parameters. 2022-10-27 19:04:48 +00:00
Gary Guo bfac2daef9 Ignore test on mingw32 2022-10-27 18:22:40 +01:00
Weihang Lo 4d9114fe80
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 01:18:50 +08:00
Michael Howell dd912add18 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-27 10:01:28 -07:00
Michael Goulet 4e0c27bbfd Erase regions from CallArgument, add test + bless 2022-10-27 16:26:55 +00:00
Chris Denton 5857c3045a
Use stdio in UWP apps
This has been supported since Windows 10.0.16299. See https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-console-l1-1-0dll
2022-10-27 17:21:30 +01:00