]> git.lizzy.rs Git - rust.git/log
rust.git
19 months agoAdd howto for adding new targets
Florian Bartels [Thu, 3 Nov 2022 08:19:47 +0000 (09:19 +0100)]
Add howto for adding new targets

19 months agoput custom flags as last in codegen and asm tests
Pietro Albini [Thu, 3 Nov 2022 11:00:17 +0000 (12:00 +0100)]
put custom flags as last in codegen and asm tests

19 months agomove compiletest's own ui tests into a subdirectory
Pietro Albini [Thu, 3 Nov 2022 10:48:33 +0000 (11:48 +0100)]
move compiletest's own ui tests into a subdirectory

19 months agocheck for pattern in compiletest-compile-flags-last
Pietro Albini [Thu, 3 Nov 2022 10:47:05 +0000 (11:47 +0100)]
check for pattern in compiletest-compile-flags-last

19 months agomove browser opening logic in Builder
Pietro Albini [Thu, 3 Nov 2022 10:42:51 +0000 (11:42 +0100)]
move browser opening logic in Builder

This allows open() to be called from other places in bootstrap (I need
this for Ferrocene), and it simplifies the callers by moving the
"was_invoked_explicitly" check into the function.

19 months agoAuto merge of #103904 - JakobDegen:mir-opt-dash, r=oli-obk
bors [Thu, 3 Nov 2022 09:24:28 +0000 (09:24 +0000)]
Auto merge of #103904 - JakobDegen:mir-opt-dash, r=oli-obk

Ban dashes in miropt test file names

Dashes in miropt test file names are annoying - specifically, they cause the test files to not be sorted next to their outputs, which makes it very difficult to tell what goes with what. This PR changes all files to use underscores and adds a blessable tidy check that enforces this.

r? `@jyn514`

This PR is obviously going to bitrot very quickly. Because of this, I'm going to wait at least 48 hours and until review comes back to allow people from `@rust-lang/wg-mir-opt` or elsewhere to lodge complaints if there are any. If not, I'll rebase the branch on Friday afternoon PST and ask that it be `r+`'d with `p=1` at that time.

19 months agoAuto merge of #103860 - weihanglo:update-cargo, r=ehuss
bors [Thu, 3 Nov 2022 06:11:58 +0000 (06:11 +0000)]
Auto merge of #103860 - weihanglo:update-cargo, r=ehuss

Update cargo

14 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..810cbad9a123ad4ee0a55a96171b8f8478ff1c03
2022-10-27 15:20:57 +0000 to 2022-11-02 21:04:31 +0000
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)

r? `@ghost`

19 months agoAuto merge of #103455 - BlackHoleFox:apple-sim-abi-consistency, r=davidtwco
bors [Thu, 3 Nov 2022 03:07:31 +0000 (03:07 +0000)]
Auto merge of #103455 - BlackHoleFox:apple-sim-abi-consistency, r=davidtwco

Fixed consistency of Apple simulator target's ABI

Currently there's a few Apple device simulator targets that are inconsistent since some set `target_abi = "sim"` (the correct thing to do) while a bunch of others don't set anything (`""`). Due to this its very hard to reliability check if some Rust code is running inside a simulator. This changes all of them to do the same thing and set `sim` as their `target_abi`.

The new way to identity a simulator during compilation is as simple as `cfg(all(target_vendor="apple", target_abi = "sim"))` or even `cfg(target_abi = "sim")` being less pedantic about it.

The issues with the current form (and inspiration for this) are also summarized in `@thomcc's` [Tweet](https://twitter.com/at_tcsc/status/1576685244702691328).

19 months agocode cleanup
yukang [Thu, 3 Nov 2022 01:42:34 +0000 (09:42 +0800)]
code cleanup

19 months agoremove 'delay_span_bug' following 'references_error'
yukang [Thu, 3 Nov 2022 01:22:08 +0000 (09:22 +0800)]
remove 'delay_span_bug' following 'references_error'

19 months agoAuto merge of #103903 - matthiaskrgr:rollup-r5xcvrp, r=matthiaskrgr
bors [Thu, 3 Nov 2022 00:20:08 +0000 (00:20 +0000)]
Auto merge of #103903 - matthiaskrgr:rollup-r5xcvrp, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #99801 (fix(generic_const_exprs): Fix predicate inheritance for children of opaque types)
 - #103610 (Allow use of `-Clto=thin` with `-Ccodegen-units=1` in general)
 - #103870 (Fix `inferred_kind` ICE)
 - #103875 (Simplify astconv item def id handling)
 - #103886 (rustdoc: Fix merge of attributes for reexports of local items)
 - #103890 (rustdoc: remove unused mobile CSS `.rustdoc { padding-top: 0 }`)

Failed merges:

 - #103884 (Add visit_fn_ret_ty to hir intravisit)

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

19 months agorustdoc: add size tracking for `Generics`
Michael Howell [Wed, 12 Oct 2022 21:29:32 +0000 (14:29 -0700)]
rustdoc: add size tracking for `Generics`

19 months agorustdoc: remove unneeded Box from ItemKind
Michael Howell [Wed, 12 Oct 2022 17:51:10 +0000 (10:51 -0700)]
rustdoc: remove unneeded Box from ItemKind

19 months agorustdoc: use ThinVec for cleaned generics
Michael Howell [Tue, 11 Oct 2022 17:00:01 +0000 (10:00 -0700)]
rustdoc: use ThinVec for cleaned generics

19 months agoUpdate cargo
Weihang Lo [Wed, 2 Nov 2022 23:17:12 +0000 (23:17 +0000)]
Update cargo

14 commits in 7e484fc1a766f56dbc95380f45719698e0c82749..810cbad9a123ad4ee0a55a96171b8f8478ff1c03
2022-10-27 15:20:57 +0000 to 2022-11-02 21:04:31 +0000
- Update curl-sys (rust-lang/cargo#11326)
- Mention fix on build script deadlock (rust-lang/cargo#11325)
- Make cargo forward pre-existing CARGO if set (rust-lang/cargo#11285)
- Clean up workspace dependencies after cargo remove (rust-lang/cargo#11242)
- Update the outdated link for rust-semverver (rust-lang/cargo#11322)
- Fix broken link to compilation entry point (rust-lang/cargo#11317)
- Only remove fingerprints and build script artifacts of the requested package (rust-lang/cargo#10621)
- Newer anyhow features are required (rust-lang/cargo#11316)
- Clean stale git temp files (rust-lang/cargo#11308)
- Report crate size on package and publish (rust-lang/cargo#11270)
- add a note that some warnings (and/or errors) can be auto-fixed (rust-lang/cargo#10989)
- Update libcurl (rust-lang/cargo#11307)
- artifact deps shoud works when target field specified coexists with `optional = true` (rust-lang/cargo#11183)
- Fix singular verb in tests page (rust-lang/cargo#11300)

19 months agoBan dashes in miropt test file names
Jakob Degen [Wed, 2 Nov 2022 21:54:49 +0000 (14:54 -0700)]
Ban dashes in miropt test file names

19 months agorustdoc: remove redundant mobile CSS `.sidebar-elems { background }`
Michael Howell [Wed, 2 Nov 2022 22:33:36 +0000 (15:33 -0700)]
rustdoc: remove redundant mobile CSS `.sidebar-elems { background }`

The exact same background is already set for its parent, the `nav.sidebar`.

19 months agoRemove std's transitive dependency on cfg-if 0.1
Collin Baker [Fri, 21 Oct 2022 18:38:56 +0000 (14:38 -0400)]
Remove std's transitive dependency on cfg-if 0.1

After rust-lang/rust#101946 this completes the move to cfg-if 1.0 by:
* Updating getrandom 0.1.14->0.1.16
* Updating panic_abort, panic_unwind, and unwind to cfg-if 1.0

20 months agoRollup merge of #103890 - notriddle:notriddle/mobile-rustdoc-padding-top, r=Guillaume...
Matthias Krüger [Wed, 2 Nov 2022 21:06:29 +0000 (22:06 +0100)]
Rollup merge of #103890 - notriddle:notriddle/mobile-rustdoc-padding-top, r=GuillaumeGomez

rustdoc: remove unused mobile CSS `.rustdoc { padding-top: 0 }`

When this rule was added in dd437ee6ed81f85c715bf415d261feca484bb39f, as `body { padding-top: 0 }`, the desktop body tag had non-zero top padding. This padding was removed in 135281ed1525db15edd8ebd092aa10aa40df2386.

This rule no longer overrides a rule in rustdoc's desktop styles, and also doesn't override the UA stylesheet, since the [HTML standard] has only margin, not padding, on the page body.

[HTML standard]: https://html.spec.whatwg.org/multipage/rendering.html#the-page

20 months agoRollup merge of #103886 - GuillaumeGomez:local-reexport-doc, r=notriddle
Matthias Krüger [Wed, 2 Nov 2022 21:06:28 +0000 (22:06 +0100)]
Rollup merge of #103886 - GuillaumeGomez:local-reexport-doc, r=notriddle

rustdoc: Fix merge of attributes for reexports of local items

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

The problem was that we didn't merge attributes between the the reexport and the item.

r? `@notriddle`

20 months agoRollup merge of #103875 - oli-obk:ast_conv_simplification, r=spastorino
Matthias Krüger [Wed, 2 Nov 2022 21:06:28 +0000 (22:06 +0100)]
Rollup merge of #103875 - oli-obk:ast_conv_simplification, r=spastorino

Simplify astconv item def id handling

20 months agoRollup merge of #103870 - TaKO8Ki:fix-103790, r=fee1-dead
Matthias Krüger [Wed, 2 Nov 2022 21:06:27 +0000 (22:06 +0100)]
Rollup merge of #103870 - TaKO8Ki:fix-103790, r=fee1-dead

Fix `inferred_kind` ICE

Fixes #103790

20 months agoRollup merge of #103610 - wesleywiser:thinlto_cgu1, r=michaelwoerister
Matthias Krüger [Wed, 2 Nov 2022 21:06:26 +0000 (22:06 +0100)]
Rollup merge of #103610 - wesleywiser:thinlto_cgu1, r=michaelwoerister

Allow use of `-Clto=thin` with `-Ccodegen-units=1` in general

The current logic to ignore ThinLTO when `-Ccodegen-units=1` makes sense for local ThinLTO but even in this scenario, a user may still want (non-local) ThinLTO for the purpose of optimizing dependencies into the final crate which is being compiled with 1 CGU.

The previous behavior was even more confusing because if you were generating a binary (`--emit=link`), then you would get ThinLTO but if you asked for LLVM IR or bytecode, then it would silently change to using regular LTO.

With this change, we only override the defaults for local ThinLTO if you ask for a single output such as LLVM IR or bytecode and in all other cases honor the requested LTO setting.

r? `@michaelwoerister`

20 months agoRollup merge of #99801 - Neo-Zhixing:fix/generic_const_exprs_parent_opaque_predicates...
Matthias Krüger [Wed, 2 Nov 2022 21:06:26 +0000 (22:06 +0100)]
Rollup merge of #99801 - Neo-Zhixing:fix/generic_const_exprs_parent_opaque_predicates, r=oli-obk

fix(generic_const_exprs): Fix predicate inheritance for children of opaque types

Fixes #99705

We currently have a special case to perform predicate inheritance when the const item is in the generics. I think we're also going to need this for opaque return types. When evaluating the predicates applied to the associated item, it'll inherit from its parent, the opaque type, which will never have predicates applied. This PR bypass the opaque typed parent and inherit predicates directly from the function itself.

20 months agochange error_reported to use Result instead of an option
yukang [Wed, 2 Nov 2022 20:57:44 +0000 (04:57 +0800)]
change error_reported to use Result instead of an option

20 months agoAuto merge of #103846 - Kobzol:revert-103295-ninja, r=cuviper
bors [Wed, 2 Nov 2022 20:49:03 +0000 (20:49 +0000)]
Auto merge of #103846 - Kobzol:revert-103295-ninja, r=cuviper

Revert "ci: Bring back ninja for dist builders"

Reverts rust-lang/rust#103295 because of the perf regression.

r? `@cuviper`

20 months agoasm: Work around LLVM bug on AArch64
Amanieu d'Antras [Wed, 2 Nov 2022 18:47:58 +0000 (18:47 +0000)]
asm: Work around LLVM bug on AArch64

Upstream issue: https://github.com/llvm/llvm-project/issues/58384

LLVM gets confused if we assign a 32-bit value to a 64-bit register, so
pass the 32-bit register name to LLVM in that case.

20 months agoAuto merge of #103888 - Dylan-DPC:rollup-p7gubqj, r=Dylan-DPC
bors [Wed, 2 Nov 2022 17:35:23 +0000 (17:35 +0000)]
Auto merge of #103888 - Dylan-DPC:rollup-p7gubqj, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #103275 (Update tinystr)
 - #103703 (Gate some parser recovery behind the check)
 - #103774 (Format `dyn Trait` better in `type_name` intrinsic)
 - #103807 (Add tracking issue for `string_extend_from_within`)
 - #103855 (rustdoc: simplify mobile item-table CSS)
 - #103862 (Use `ObligationCtxt` in `fully_normalize`)
 - #103864 (Reorder `walk_` functions in intravisit.rs)

Failed merges:

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

20 months agoProperly render asyncness for traits without default body
Michael Goulet [Wed, 2 Nov 2022 17:33:25 +0000 (17:33 +0000)]
Properly render asyncness for traits without default body

20 months agorustdoc: remove unused mobile CSS `.rustdoc { padding-top: 0 }`
Michael Howell [Wed, 2 Nov 2022 17:10:44 +0000 (10:10 -0700)]
rustdoc: remove unused mobile CSS `.rustdoc { padding-top: 0 }`

When this rule was added in dd437ee6ed81f85c715bf415d261feca484bb39f, as
`body { padding-top: 0 }`, the desktop body tag had non-zero top padding.
This padding was removed in 135281ed1525db15edd8ebd092aa10aa40df2386.

This rule no longer overrides a rule in rustdoc's desktop styles, and also
doesn't override the UA stylesheet, since the [HTML standard] has only
margin, not padding, on the page body.

[HTML standard]: https://html.spec.whatwg.org/multipage/rendering.html#the-page

20 months agoRollup merge of #103864 - smoelius:reorder-walk-functions, r=fee1-dead
Dylan DPC [Wed, 2 Nov 2022 17:02:06 +0000 (22:32 +0530)]
Rollup merge of #103864 - smoelius:reorder-walk-functions, r=fee1-dead

Reorder `walk_` functions in intravisit.rs

Reorder the `walk_` functions to match the order of the `visit_` methods. This is a follow up to https://github.com/rust-lang/rust/pull/103692.

Note that there are some oddballs. I put them where I thought made the most sense:
```diff
$ diff \
<(sed -n 's/^.*\<fn visit_\([^(]*\).*$/\1/;T;p' compiler/rustc_hir/src/intravisit.rs) \
<(sed -n 's/^.*\<fn walk_\([^<]*\).*$/\1/;T;p' compiler/rustc_hir/src/intravisit.rs)
1,5d0
< nested_item
< nested_trait_item
< nested_impl_item
< nested_foreign_item
< nested_body
9,10d3
< id
< name
20c13
< array_length
---
> array_len
30a24
> fn_ret_ty
31a26
> fn_kind
41c36
< variant_data
---
> struct_def
46c41
< infer
---
> inf
54d48
< attribute
```

Also, as some weak evidence that i did things correctly, I get the following before and after the change:
```sh
$ sort compiler/rustc_hir/src/intravisit.rs | openssl sha256
SHA256(stdin)= cac13d2545731ef442f318e2b4286490d7ac5494f4ad10c4cf4c5d4f50d21641
```

r? `@fee1-dead`

20 months agoRollup merge of #103862 - compiler-errors:ocx-in-fully-normalize, r=spastorino
Dylan DPC [Wed, 2 Nov 2022 17:02:05 +0000 (22:32 +0530)]
Rollup merge of #103862 - compiler-errors:ocx-in-fully-normalize, r=spastorino

Use `ObligationCtxt` in `fully_normalize`

Simplifies the implementation a bit

20 months agoRollup merge of #103855 - notriddle:notriddle/mobile-item-table, r=GuillaumeGomez
Dylan DPC [Wed, 2 Nov 2022 17:02:05 +0000 (22:32 +0530)]
Rollup merge of #103855 - notriddle:notriddle/mobile-item-table, r=GuillaumeGomez

rustdoc: simplify mobile item-table CSS

Using flexbox in column direction is needlessly complicated, since no special flex powers are being used here. Just use regular block layout.

This should result in no visible changes.

20 months agoRollup merge of #103807 - H4x5:string-extend-from-within-tracking-issue, r=Dylan-DPC
Dylan DPC [Wed, 2 Nov 2022 17:02:04 +0000 (22:32 +0530)]
Rollup merge of #103807 - H4x5:string-extend-from-within-tracking-issue, r=Dylan-DPC

Add tracking issue for `string_extend_from_within`

Tracking issue: #103806

The original PR didn't create a tracking issue.

20 months agoRollup merge of #103774 - compiler-errors:dyn-trait-in-type-name, r=eholk
Dylan DPC [Wed, 2 Nov 2022 17:02:03 +0000 (22:32 +0530)]
Rollup merge of #103774 - compiler-errors:dyn-trait-in-type-name, r=eholk

Format `dyn Trait` better in `type_name` intrinsic

Noticed this in #103764 (though not related to that PR at all!)

```rust
trait Foo {
    type Bar;
}

fn main() {
    println!(
        "`dyn Fn(i32, i32) -> i32` => `{}`",
        std::any::type_name::<dyn Fn(i32, i32) -> i32>()
    );
    println!(
        "`dyn Foo<Bar = i32> + Send + Sync` => `{}`",
        std::any::type_name::<dyn Foo<Bar = i32> + Send + Sync>()
    );
}
```

```
`dyn Fn(i32, i32) -> i32` => `dyn core::ops::function::Fn<(i32, i32)>+Output = i32`
`dyn Foo<Bar = i32> + Send + Sync` => `dyn playground::Foo+Bar = i32+core::marker::Sync+core::marker::Send`
```

Just reuse `pretty_print_dyn_existential` which already makes an attempt to make its output stable.

20 months agoRollup merge of #103703 - Nilstrieb:flag-recovery-1, r=compiler-errors
Dylan DPC [Wed, 2 Nov 2022 17:02:03 +0000 (22:32 +0530)]
Rollup merge of #103703 - Nilstrieb:flag-recovery-1, r=compiler-errors

Gate some parser recovery behind the check

Mainly in `expr.rs`. `may_recover` doesn't do anything useful yet until I implement that on top of #103439.

r? `@compiler-errors`

20 months agoRollup merge of #103275 - Manishearth:tinystrup, r=pnkfelix
Dylan DPC [Wed, 2 Nov 2022 17:02:02 +0000 (22:32 +0530)]
Rollup merge of #103275 - Manishearth:tinystrup, r=pnkfelix

Update tinystr

Tinystr has changed a ton since the old version and is much less unsafe, updated some of the dependencies that use it.

20 months agoRemove has_errors from FnCtxt
Michael Goulet [Wed, 2 Nov 2022 02:13:27 +0000 (02:13 +0000)]
Remove has_errors from FnCtxt

20 months agoAdd regression test for doc of reexport of local items
Guillaume Gomez [Wed, 2 Nov 2022 15:55:55 +0000 (16:55 +0100)]
Add regression test for doc of reexport of local items

20 months agoFix merge of attributes for reexports of local items
Guillaume Gomez [Wed, 2 Nov 2022 15:51:37 +0000 (16:51 +0100)]
Fix merge of attributes for reexports of local items

20 months agodeprecate DelaySpanBugEmitted and use ErrorGuaranteed directly
yukang [Wed, 2 Nov 2022 15:15:49 +0000 (23:15 +0800)]
deprecate DelaySpanBugEmitted and use ErrorGuaranteed directly

20 months agoSimplify astconv item def id handling
Oli Scherer [Mon, 31 Oct 2022 16:19:36 +0000 (16:19 +0000)]
Simplify astconv item def id handling

20 months agoAuto merge of #103690 - GuillaumeGomez:visibility-on-demand, r=notriddle
bors [Wed, 2 Nov 2022 10:32:08 +0000 (10:32 +0000)]
Auto merge of #103690 - GuillaumeGomez:visibility-on-demand, r=notriddle

Make rustdoc Item::visibility computed on-demand

This is a take-over of https://github.com/rust-lang/rust/pull/91408.

Helps with https://github.com/rust-lang/rust/issues/90852 (needs to use `ty::Visibility` directly too).

cc `@camelid`
r? `@notriddle`

20 months agoAuto merge of #103649 - petrochenkov:docnotrait, r=GuillaumeGomez
bors [Wed, 2 Nov 2022 07:47:10 +0000 (07:47 +0000)]
Auto merge of #103649 - petrochenkov:docnotrait, r=GuillaumeGomez

rustdoc: Do not add external traits to the crate in `register_res`

It's not clear why it was done, and apparently it's no longer necessary now.
Such additions are unpredictable for early doc link resolution and would force us to collect all doc links from all external traits.

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

20 months agoreturn const_error when ty has errors
Takayuki Maeda [Wed, 2 Nov 2022 05:47:48 +0000 (14:47 +0900)]
return const_error when ty has errors

20 months agoAuto merge of #103857 - Manishearth:rollup-709fui6, r=Manishearth
bors [Wed, 2 Nov 2022 04:27:48 +0000 (04:27 +0000)]
Auto merge of #103857 - Manishearth:rollup-709fui6, r=Manishearth

Rollup of 8 pull requests

Successful merges:

 - #103072 (compiletest: set the dylib path when gathering target cfg)
 - #103084 (Derive `Eq` and `Hash` for `ControlFlow`)
 - #103575 (Change #[suggestion_*] attributes to use style="...")
 - #103637 (Use stdio in UWP apps)
 - #103638 (Add `multivalue` target feature to WASM target)
 - #103781 (Detect unused files in `src/test/mir-opt` and error on them in tidy.)
 - #103837 (Migrate sidebar-links-color GUI test to functions)
 - #103839 (Print valid `--print` requests if request is invalid)

Failed merges:

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

20 months agoUse TraitEngine less
Michael Goulet [Wed, 2 Nov 2022 04:09:01 +0000 (04:09 +0000)]
Use TraitEngine less

20 months agoRemove some return-type booleans from FnCtxt
Michael Goulet [Wed, 2 Nov 2022 02:02:33 +0000 (02:02 +0000)]
Remove some return-type booleans from FnCtxt

20 months agoUse ObligationCtxt in fully_normalize
Michael Goulet [Wed, 2 Nov 2022 00:48:44 +0000 (00:48 +0000)]
Use ObligationCtxt in fully_normalize

20 months agoRollup merge of #103839 - Nilstrieb:print-list, r=compiler-errors
Manish Goregaokar [Wed, 2 Nov 2022 00:00:40 +0000 (20:00 -0400)]
Rollup merge of #103839 - Nilstrieb:print-list, r=compiler-errors

Print valid `--print` requests if request is invalid

When someone makes a typo, it can be useful to see the valid options. This is also useful if someone wants to find out about all the options.

20 months agoRollup merge of #103837 - GuillaumeGomez:migrate-sidebar-links-color-gui-test, r...
Manish Goregaokar [Wed, 2 Nov 2022 00:00:40 +0000 (20:00 -0400)]
Rollup merge of #103837 - GuillaumeGomez:migrate-sidebar-links-color-gui-test, r=notriddle

Migrate sidebar-links-color GUI test to functions

r? `@notriddle`

20 months agoRollup merge of #103781 - JakobDegen:mir-opt-tidy, r=jyn514
Manish Goregaokar [Wed, 2 Nov 2022 00:00:39 +0000 (20:00 -0400)]
Rollup merge of #103781 - JakobDegen:mir-opt-tidy, r=jyn514

Detect unused files in `src/test/mir-opt` and error on them in tidy.

Closes #97564 .

Determining which files are generated by a given mir opt test is somewhat difficult. Because of this, we extract the logic for doing it out into a common crate that both compiletest and tidy can depend on. This avoids making compiletest a dependency of tidy which would negatively impact compile times for tidy.

Testing for this is that it catches 5 files that violated this lint (and removes them).

20 months agoRollup merge of #103638 - ia0:multivalue, r=nagisa
Manish Goregaokar [Wed, 2 Nov 2022 00:00:39 +0000 (20:00 -0400)]
Rollup merge of #103638 - ia0:multivalue, r=nagisa

Add `multivalue` target feature to WASM target

This PR is similar to #99643 and #97808. It addresses #96472 for the `multivalue` target feature.

The problem I am trying to fix is to remove the following warning when compiling with `-C target-feature=+multivalue` for `--target=wasm32-unknown-unknown`.

```
warning: unknown feature specified for `-Ctarget-feature`: `multivalue`
  |
  = note: it is still passed through to the codegen backend
  = note: consider filing a feature request
```

20 months agoRollup merge of #103637 - ChrisDenton:stdio-uwp, r=thomcc
Manish Goregaokar [Wed, 2 Nov 2022 00:00:38 +0000 (20:00 -0400)]
Rollup merge of #103637 - ChrisDenton:stdio-uwp, r=thomcc

Use stdio in UWP apps

Fixes #103233

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

20 months agoRollup merge of #103575 - Xiretza:suggestions-style-attr, r=davidtwco
Manish Goregaokar [Wed, 2 Nov 2022 00:00:38 +0000 (20:00 -0400)]
Rollup merge of #103575 - Xiretza:suggestions-style-attr, r=davidtwco

Change #[suggestion_*] attributes to use style="..."

As discussed [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20tool_only_span_suggestion), this changes `#[(multipart_)suggestion_{short,verbose,hidden}(...)]` attributes to plain `#[(multipart_)suggestion(...)]` attributes with a `style = "{short,verbose,hidden}"` parameter.

It also adds a new style, `tool-only`, that corresponds to `tool_only_span_suggestion`/`tool_only_multipart_suggestion` and causes the suggestion to not be shown in human-readable output at all.

Best reviewed commit-by-commit, there's a bit of noise in there.

cc #100717 `@compiler-errors`
r? `@davidtwco`

20 months agoRollup merge of #103084 - inquisitivecrystal:control-flow, r=scottmcm
Manish Goregaokar [Wed, 2 Nov 2022 00:00:37 +0000 (20:00 -0400)]
Rollup merge of #103084 - inquisitivecrystal:control-flow, r=scottmcm

Derive `Eq` and `Hash` for `ControlFlow`

There's really no reason for `ControlFlow` not to derive these traits. This is the part of #96416 that no one objected to, but that PR seems stale. The `Eq` derive was also [requested](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/.60ControlFlow.3A.20Eq.60/near/303610659) by `@lcnr` on Zulip to allow for pattern matching.

This change requires an FCP because it's insta-stable.

Closes #96416.

20 months agoRollup merge of #103072 - cuviper:compiletest-path, r=Mark-Simulacrum
Manish Goregaokar [Wed, 2 Nov 2022 00:00:37 +0000 (20:00 -0400)]
Rollup merge of #103072 - cuviper:compiletest-path, r=Mark-Simulacrum

compiletest: set the dylib path when gathering target cfg

If the compiler is built with `rpath = false`, then it won't find its
own libraries unless the library search path is set. We already do that
while running the actual compiletests, but #100260 added another rustc
command for getting the target cfg.

    Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
    thread 'main' panicked at 'error: failed to get cfg info from "[...]/build/x86_64-unknown-linux-gnu/stage1/bin/rustc"
    --- stdout

    --- stderr
    [...]/build/x86_64-unknown-linux-gnu/stage1/bin/rustc: error while loading shared libraries: librustc_driver-a2a76dc626cd02d2.so: cannot open shared object file: No such file or directory
    ', src/tools/compiletest/src/common.rs:476:13

Now the library path is set here as well, so it works without rpath.

20 months agorustdoc: simplify mobile item-table CSS
Michael Howell [Tue, 1 Nov 2022 23:27:00 +0000 (16:27 -0700)]
rustdoc: simplify mobile item-table CSS

Using flexbox in column direction is needlessly complicated, since no
special flex powers are being used here. Just use regular block layout.

This should result in no visible changes.

20 months agoReorder `walk_` functions in intravisit.rs
Samuel Moelius [Tue, 1 Nov 2022 23:02:45 +0000 (19:02 -0400)]
Reorder `walk_` functions in intravisit.rs

20 months agofix(generic_const_exprs): Fix predicate inheritance for children of opaque types
Zhixing Zhang [Tue, 1 Nov 2022 00:01:00 +0000 (17:01 -0700)]
fix(generic_const_exprs): Fix predicate inheritance for children of opaque types

20 months agoAuto merge of #103217 - mejrs:track, r=eholk
bors [Tue, 1 Nov 2022 21:09:45 +0000 (21:09 +0000)]
Auto merge of #103217 - mejrs:track, r=eholk

Track where diagnostics were created.

This implements the `-Ztrack-diagnostics` flag, which uses `#[track_caller]` to track where diagnostics are created. It is meant as a debugging tool much like `-Ztreat-err-as-bug`.

For example, the following code...

```rust
struct A;
struct B;

fn main(){
    let _: A = B;
}
```
...now emits the following error message:

```
error[E0308]: mismatched types
 --> src\main.rs:5:16
  |
5 |     let _: A = B;
  |            -   ^ expected struct `A`, found struct `B`
  |            |
  |            expected due to this
-Ztrack-diagnostics: created at compiler\rustc_infer\src\infer\error_reporting\mod.rs:2275:31
```

20 months agoFormat dyn Trait better in type_name intrinsic
Michael Goulet [Sun, 30 Oct 2022 19:39:07 +0000 (19:39 +0000)]
Format dyn Trait better in type_name intrinsic

20 months agoRemove unneeded "rustdoc-preferred-dark-theme" setting
Guillaume Gomez [Tue, 1 Nov 2022 18:47:12 +0000 (19:47 +0100)]
Remove unneeded "rustdoc-preferred-dark-theme" setting

20 months agoMigrate sidebar-links-color GUI test to functions
Guillaume Gomez [Tue, 1 Nov 2022 14:48:13 +0000 (15:48 +0100)]
Migrate sidebar-links-color GUI test to functions

20 months agoRevert "ci: Bring back ninja for dist builders"
Jakub Beránek [Tue, 1 Nov 2022 18:36:25 +0000 (19:36 +0100)]
Revert "ci: Bring back ninja for dist builders"

20 months agoAuto merge of #103841 - Dylan-DPC:rollup-rff2x1l, r=Dylan-DPC
bors [Tue, 1 Nov 2022 18:15:32 +0000 (18:15 +0000)]
Auto merge of #103841 - Dylan-DPC:rollup-rff2x1l, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #84022 (Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error)
 - #103760 (resolve: Turn the binding from `#[macro_export]` into a proper `Import`)
 - #103813 (rustdoc: remove unnecessary CSS `.search-results { clear: both }`)
 - #103817 (rustdoc: rename syntax highlighting CSS class `attribute` to `attr`)
 - #103833 (:arrow_up: rust-analyzer)

Failed merges:

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

20 months agoAdd track_caller to some Lock methods
Cameron Steffen [Tue, 1 Nov 2022 17:24:51 +0000 (12:24 -0500)]
Add track_caller to some Lock methods

20 months agoRollup merge of #103833 - lnicola:rust-analyzer-2022-11-01, r=lnicola
Dylan DPC [Tue, 1 Nov 2022 16:31:37 +0000 (22:01 +0530)]
Rollup merge of #103833 - lnicola:rust-analyzer-2022-11-01, r=lnicola

:arrow_up: rust-analyzer

r? `@ghost`

20 months agoRollup merge of #103817 - notriddle:notriddle/attribute-css, r=GuillaumeGomez
Dylan DPC [Tue, 1 Nov 2022 16:31:37 +0000 (22:01 +0530)]
Rollup merge of #103817 - notriddle:notriddle/attribute-css, r=GuillaumeGomez

rustdoc: rename syntax highlighting CSS class `attribute` to `attr`

Link classes use the abbreviation `attr` ...

https://github.com/rust-lang/rust/blob/2afca78a0b03db144c5d8b9f8868feebfe096309/src/librustdoc/html/static/css/rustdoc.css#L255-L259

... so why does syntax highlighting use the full word?

https://github.com/rust-lang/rust/blob/2afca78a0b03db144c5d8b9f8868feebfe096309/src/librustdoc/html/static/css/rustdoc.css#L1095-L1097

20 months agoRollup merge of #103813 - notriddle:notriddle/search-results-clear-both, r=GuillaumeGomez
Dylan DPC [Tue, 1 Nov 2022 16:31:36 +0000 (22:01 +0530)]
Rollup merge of #103813 - notriddle:notriddle/search-results-clear-both, r=GuillaumeGomez

rustdoc: remove unnecessary CSS `.search-results { clear: both }`

Since the tabs use flexbox instead of float as of 44d9b8d07014d976c88f541dbe0af37e64e37bdd, clearing does nothing.

20 months agoRollup merge of #103760 - petrochenkov:macimp, r=cjgillot
Dylan DPC [Tue, 1 Nov 2022 16:31:36 +0000 (22:01 +0530)]
Rollup merge of #103760 - petrochenkov:macimp, r=cjgillot

resolve: Turn the binding from `#[macro_export]` into a proper `Import`

Continuation of https://github.com/rust-lang/rust/pull/91795.

```rust
#[macro_export]
macro_rules! m { /*...*/ }
```
is desugared to something like
```rust
macro_rules! m { /*...*/ } // Non-modularized macro_rules item

pub use m; // It's modularized reexport
```

This PR adjusts the internal representation to better match this model.

20 months agoRollup merge of #84022 - Aaron1011:remove-derive-res-fallback, r=petrochenkov
Dylan DPC [Tue, 1 Nov 2022 16:31:35 +0000 (22:01 +0530)]
Rollup merge of #84022 - Aaron1011:remove-derive-res-fallback, r=petrochenkov

Make PROC_MACRO_DERIVE_RESOLUTION_FALLBACK a hard error

r? `@ghost`

20 months agoPrint valid `--print` requests if request is invalid
nils [Tue, 1 Nov 2022 15:24:01 +0000 (16:24 +0100)]
Print valid `--print` requests if request is invalid

When someone makes a typo, it can be useful to see the valid options.
This is also useful if someone wants to find out about all the options.

20 months agoAuto merge of #103496 - petrochenkov:effvisdoc2, r=lqd
bors [Tue, 1 Nov 2022 15:05:14 +0000 (15:05 +0000)]
Auto merge of #103496 - petrochenkov:effvisdoc2, r=lqd

rustc_metadata: Encode even less doc comments

The fact that `def_id` is in the `tcx.privacy_access_levels(())` table is not very meaningful, especially after https://github.com/rust-lang/rust/pull/102026, `is_exported` (or `is_reachable` in the worst case) is what you need.

Follow up to https://github.com/rust-lang/rust/pull/98450.
r? `@GuillaumeGomez` `@lqd`

20 months agoAuto merge of #103590 - compiler-errors:ocx-more, r=lcnr
bors [Tue, 1 Nov 2022 12:15:10 +0000 (12:15 +0000)]
Auto merge of #103590 - compiler-errors:ocx-more, r=lcnr

(almost) Always use `ObligationCtxt` when dealing with canonical queries

Hope this is a step in the right direction. cc rust-lang/types-team#50.

r? `@lcnr`

20 months ago:arrow_up: rust-analyzer
Laurențiu Nicola [Tue, 1 Nov 2022 09:31:31 +0000 (11:31 +0200)]
:arrow_up: rust-analyzer

20 months agoAuto merge of #103832 - Dylan-DPC:rollup-maw3kmx, r=Dylan-DPC
bors [Tue, 1 Nov 2022 09:01:12 +0000 (09:01 +0000)]
Auto merge of #103832 - Dylan-DPC:rollup-maw3kmx, r=Dylan-DPC

Rollup of 6 pull requests

Successful merges:

 - #103061 (Rewrite implementation of `#[alloc_error_handler]`)
 - #103584 (Remove bounds check when array is indexed by enum)
 - #103706 (Fix E0433 No Typo Suggestions)
 - #103729 (interpret: fix align_of_val on packed types)
 - #103759 (Use `adt_def` during type collection.)
 - #103809 (Fix a typo in std::net mod doc comment)

Failed merges:

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

20 months agoRollup merge of #103809 - tyggja:patch-1, r=JohnTitor
Dylan DPC [Tue, 1 Nov 2022 08:42:27 +0000 (14:12 +0530)]
Rollup merge of #103809 - tyggja:patch-1, r=JohnTitor

Fix a typo in std::net mod doc comment

net-doc syntax

20 months agoRollup merge of #103759 - cjgillot:adt-collect, r=davidtwco
Dylan DPC [Tue, 1 Nov 2022 08:42:27 +0000 (14:12 +0530)]
Rollup merge of #103759 - cjgillot:adt-collect, r=davidtwco

Use `adt_def` during type collection.

This removes a wrapper which is close to what `adt_def` does.

20 months agoRollup merge of #103729 - RalfJung:align-of-val-packed, r=oli-obk
Dylan DPC [Tue, 1 Nov 2022 08:42:26 +0000 (14:12 +0530)]
Rollup merge of #103729 - RalfJung:align-of-val-packed, r=oli-obk

interpret: fix align_of_val on packed types

Fixes https://github.com/rust-lang/miri/issues/2632

r? `@oli-obk`

20 months agoRollup merge of #103706 - zbyrn:issue-101637-fix, r=estebank
Dylan DPC [Tue, 1 Nov 2022 08:42:26 +0000 (14:12 +0530)]
Rollup merge of #103706 - zbyrn:issue-101637-fix, r=estebank

Fix E0433 No Typo Suggestions

Fixes #48676
Fixes #87791
Fixes #96625
Fixes #95462
Fixes #101637
Follows up PR #72923

Several open issues refer to the problem that E0433 does not suggest typos like other errors normally do. This fix augments the implementation of PR #72923.

**Background**
When the path of a function call, e.g. `Struct::foo()`, involves names that cannot be resolved, there are two errors that could be emitted by the compiler:
 - If `Struct` is not found, it is ``E0433: failed to resolve: use of undeclared type `Struct` ``.
 - If `foo` is not found in `Struct`, it is ``E0599: no function or associated item named `foo` found for struct `Struct` in the current scope``

When a name is used as a type, `e.g. fn foo() -> Struct`, and the name cannot be resolved, it is ``E0412: cannot find type `Struct` in this scope``.

Before #72923, `E0433` does not implement any suggestions, and the PR introduces suggestions for missing `use`s. When a resolution error occurs in the path of a function call, it tries to smart resolve just the type part of the path, e.g. `module::Struct` of a call to `module::Struct::foo()`. However, along with the suggestions, the smart-resolve function will report `E0412` since it only knows that it is a type that we cannot resolve instead of being a part of the path. So, the original implementation swap out `E0412` errors returned by the smart-resolve function with the real `E0433` error, but keeps the "missing `use`" suggestions to be reported to the programmer.

**Issue**
The current implementation only reports if there are "missing `use`" suggestions returned by the smart-resolve function; otherwise, it would fall back the normal reporting, which does not emit suggestions. But the smart-resolve function could also produce typo suggestions, which are omitted currently.

Also, it seems like that not all info has been swapped out when there are missing suggestions. The error message underlining the name in the snippet still says ``not found in this scope``, which is a `E0412` messages, if there are `use` suggestions, but says the normal `use of undeclared type` otherwise.

**Fixes**
This fix swaps out all fields in `Diagnostic` returned by the smart-resolve function except for `suggestions` with the current error, and merges the `suggestions` of the returned error and that of the current error together. If there are `use` suggestions, the error is saved to `use_injection` to be reported at the end; otherwise, the error is emitted immediately as `Resolver::report_error` does.

Some tests are updated to use the correct underlining error messages, and one additional test for typo suggestion is added to the test suite.

r? rust-lang/diagnostics

20 months agoRollup merge of #103584 - ouz-a:issue-102303, r=oli-obk
Dylan DPC [Tue, 1 Nov 2022 08:42:25 +0000 (14:12 +0530)]
Rollup merge of #103584 - ouz-a:issue-102303, r=oli-obk

Remove bounds check when array is indexed by enum

As the title says, this reverts the behavior introduced with 1.64.

Fixes #102303

r? `@oli-obk`

20 months agoRollup merge of #103061 - Amanieu:rewrite_alloc_error_handler, r=bjorn3
Dylan DPC [Tue, 1 Nov 2022 08:42:25 +0000 (14:12 +0530)]
Rollup merge of #103061 - Amanieu:rewrite_alloc_error_handler, r=bjorn3

Rewrite implementation of `#[alloc_error_handler]`

The new implementation doesn't use weak lang items and instead changes `#[alloc_error_handler]` to an attribute macro just like `#[global_allocator]`.

The attribute will generate the `__rg_oom` function which is called by the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom` function is defined in any crate then the compiler shim will call `__rdl_oom` in the alloc crate which will simply panic.

This also fixes link errors with `-C link-dead-code` with `default_alloc_error_handler`: `__rg_oom` was previously defined in the alloc crate and would attempt to reference the `oom` lang item, even if it didn't exist. This worked as long as `__rg_oom` was excluded from linking since it was not called.

This is a prerequisite for the stabilization of `default_alloc_error_handler` (#102318).

20 months agofix #103751: Fix capacity overflow issue during transmutability check
yukang [Tue, 1 Nov 2022 07:46:58 +0000 (15:46 +0800)]
fix #103751: Fix capacity overflow issue during transmutability check

20 months agoAuto merge of #103829 - JohnTitor:rollup-o03nzr8, r=JohnTitor
bors [Tue, 1 Nov 2022 05:34:00 +0000 (05:34 +0000)]
Auto merge of #103829 - JohnTitor:rollup-o03nzr8, r=JohnTitor

Rollup of 10 pull requests

Successful merges:

 - #103007 (Add better python discovery)
 - #103674 (Update note about unstable split-debuginfo flag.)
 - #103692 (Add `walk_generic_arg`)
 - #103749 (Reduce span of let else irrefutable_let_patterns warning)
 - #103772 (better error for `rustc_strict_coherence` misuse)
 - #103788 (Fix ICE in checking transmutability of NaughtyLenArray)
 - #103793 (rustdoc: add margins to all impl-item toggles, not just methods)
 - #103798 (interpret: move type_name implementation to an interpreter-independent helper file)
 - #103799 (Remove generation of tuple struct fields in the search index)
 - #103805 (Enable RUSTC_BOOTSTRAP for a few steps)

Failed merges:

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

20 months agoDetect unused files in `src/test/mir-opt` and error on them in tidy.
Jakob Degen [Mon, 31 Oct 2022 00:17:25 +0000 (17:17 -0700)]
Detect unused files in `src/test/mir-opt` and error on them in tidy.

20 months agoRollup merge of #103805 - Mark-Simulacrum:forward-port, r=jyn514
Yuki Okushi [Tue, 1 Nov 2022 03:03:44 +0000 (12:03 +0900)]
Rollup merge of #103805 - Mark-Simulacrum:forward-port, r=jyn514

Enable RUSTC_BOOTSTRAP for a few steps

This forward-ports this commit so we don't need to keep applying it when branching beta (as done in 1.64, 1.65, and 1.66 beta bumps).

20 months agoRollup merge of #103799 - GuillaumeGomez:search-index-tuple-struct-field, r=notriddle
Yuki Okushi [Tue, 1 Nov 2022 03:03:44 +0000 (12:03 +0900)]
Rollup merge of #103799 - GuillaumeGomez:search-index-tuple-struct-field, r=notriddle

Remove generation of tuple struct fields in the search index

This comes from [this discussion](https://github.com/rust-lang/rust/pull/103710) as they're not very useful.

r? `@notriddle`

20 months agoRollup merge of #103798 - RalfJung:type_name, r=oli-obk
Yuki Okushi [Tue, 1 Nov 2022 03:03:43 +0000 (12:03 +0900)]
Rollup merge of #103798 - RalfJung:type_name, r=oli-obk

interpret: move type_name implementation to an interpreter-independent helper file

This should avoid pinging rust-lang/miri each time that file changes, which is really not necessary.

r? `@oli-obk`

20 months agoRollup merge of #103793 - notriddle:notriddle/rustdoc-toggle-in-impl-items, r=Guillau...
Yuki Okushi [Tue, 1 Nov 2022 03:03:43 +0000 (12:03 +0900)]
Rollup merge of #103793 - notriddle:notriddle/rustdoc-toggle-in-impl-items, r=GuillaumeGomez

rustdoc: add margins to all impl-item toggles, not just methods

Fixes #103782

## Before

![image](https://user-images.githubusercontent.com/1593513/198943087-8cab8b25-2092-49d6-89b4-caa2989dedf0.png)

## After

![image](https://user-images.githubusercontent.com/1593513/198943111-bc08c2d6-f058-4362-b999-0caf09eb93bf.png)

20 months agoRollup merge of #103788 - chenyukang:yukang/fix-ice-103783, r=compiler-errors
Yuki Okushi [Tue, 1 Nov 2022 03:03:42 +0000 (12:03 +0900)]
Rollup merge of #103788 - chenyukang:yukang/fix-ice-103783, r=compiler-errors

Fix ICE in checking transmutability of NaughtyLenArray

Fixes #103783

20 months agoRollup merge of #103772 - compiler-errors:better-strict-coherence-err, r=davidtwco
Yuki Okushi [Tue, 1 Nov 2022 03:03:42 +0000 (12:03 +0900)]
Rollup merge of #103772 - compiler-errors:better-strict-coherence-err, r=davidtwco

better error for `rustc_strict_coherence` misuse

Fixes #103753

20 months agoRollup merge of #103749 - est31:reduce_irrefutable_let_else_span, r=cjgillot
Yuki Okushi [Tue, 1 Nov 2022 03:03:41 +0000 (12:03 +0900)]
Rollup merge of #103749 - est31:reduce_irrefutable_let_else_span, r=cjgillot

Reduce span of let else irrefutable_let_patterns warning

Huge spans aren't good for IDE users as they underline constructs that are possibly multiline.

Similar PR to #90761 which did the same for the `unused_macros` lint.

20 months agoRollup merge of #103692 - smoelius:walk_generic_arg, r=fee1-dead
Yuki Okushi [Tue, 1 Nov 2022 03:03:41 +0000 (12:03 +0900)]
Rollup merge of #103692 - smoelius:walk_generic_arg, r=fee1-dead

Add `walk_generic_arg`

Could this please be added?

I could use it for a Clippy lint.

20 months agoRollup merge of #103674 - ehuss:split-debuginfo-doc-unstable, r=davidtwco
Yuki Okushi [Tue, 1 Nov 2022 03:03:40 +0000 (12:03 +0900)]
Rollup merge of #103674 - ehuss:split-debuginfo-doc-unstable, r=davidtwco

Update note about unstable split-debuginfo flag.

split-debuginfo was effectively stabilized in #98051. The note about it requiring `-Z unstable-options` is no longer accurate.

The rules for when it is gated and when it is supported are somewhat complex. I considered removing the note entirely, or making it more generic, but opted to instead try to summarize the current state.

20 months agoRollup merge of #103007 - albertlarsan68:better-python-discovery, r=jyn514
Yuki Okushi [Tue, 1 Nov 2022 03:03:40 +0000 (12:03 +0900)]
Rollup merge of #103007 - albertlarsan68:better-python-discovery, r=jyn514

Add better python discovery

The Microsoft Store version of Python installs itself as `pythonM.m`, with `M` being the major version and `m` the minor.

The `x.ps1` script will now search for python executables whose command matches the regex `python\d`.
The `\d` at the end is to protect from using the `pythonw` versions, which do not work as standard python.

20 months agoRemove let_underscore_must_use from list of uplifted lints
Mark Rousskov [Tue, 1 Nov 2022 00:55:03 +0000 (20:55 -0400)]
Remove let_underscore_must_use from list of uplifted lints

20 months agoAuto merge of #102950 - oli-obk:check_miri, r=RalfJung
bors [Mon, 31 Oct 2022 23:03:39 +0000 (23:03 +0000)]
Auto merge of #102950 - oli-obk:check_miri, r=RalfJung

Enable `x.py check` for miri

Now that the miri subtree is working properly, let's add it to x.py check.

cc `@rust-lang/miri`

20 months agoAdd bug! back to late_bound_vars query
Michael Goulet [Mon, 31 Oct 2022 21:24:39 +0000 (21:24 +0000)]
Add bug! back to late_bound_vars query

20 months agoMake external/local late-bound region registration more explicit
Michael Goulet [Mon, 31 Oct 2022 21:18:17 +0000 (21:18 +0000)]
Make external/local late-bound region registration more explicit