Commit Graph

260103 Commits

Author SHA1 Message Date
Oli Scherer
dce98c52ff Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
bors
8c39ac9ecc Auto merge of #127575 - chenyukang:yukang-fix-struct-fields-ice, r=compiler-errors
Avoid "no field" error and ICE on recovered ADT variant

Fixes https://github.com/rust-lang/rust/issues/126744
Fixes https://github.com/rust-lang/rust/issues/126344, a more general fix compared with https://github.com/rust-lang/rust/pull/127426

r? `@oli-obk`

From `@compiler-errors` 's comment https://github.com/rust-lang/rust/pull/127502#discussion_r1669538204
Seems most of the ADTs don't have taint, so maybe it's not proper to change `TyCtxt::type_of` query.
2024-07-11 03:12:38 +00:00
bors
e1f45a1442 Auto merge of #127538 - Oneirical:the-sacred-tests, r=jieyouxu
Migrate `issue-83112-incr-test-moved-file`, `type-mismatch-same-crate-name` and `issue-109934-lto-debuginfo` `run-make` tests to rmake or ui

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

I have noticed that the new UI test `debuginfo-lto-alloc` is outputting artifacts that aren't getting cleaned up because of its `-C incremental`. That might be the justification needed to keep it as a run-make test?

Try it on:

// try-job: test-various // previously passed
try-job: armhf-gnu
try-job: aarch64-apple
try-job: x86_64-msvc
2024-07-11 00:56:46 +00:00
bors
3ad5f459b3 Auto merge of #127560 - oli-obk:safe_clobber, r=nnethercote
Make `visit_clobber`'s impl safe

This was originally introduced in #58061 but I didn't see any perf discussion about it, so let's see what perf says.

r? `@nnethercote`
2024-07-10 22:01:02 +00:00
bors
0c81f94b9a Auto merge of #127419 - trevyn:issue-125446, r=fee1-dead
Add suggestions for possible missing `fn`, `struct`, or `enum` keywords

Closes #125446
Closes #65381
2024-07-10 18:27:32 +00:00
yukang
07e6dd95bd report pat no field error no recoverd struct variant 2024-07-11 00:18:47 +08:00
bors
c092b28976 Auto merge of #127580 - matthiaskrgr:rollup-pjw1xmj, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0)
 - #127094 (E0191 suggestion correction, inserts turbofish)
 - #127554 ( do not run test where it cannot run)
 - #127564 (Temporarily remove me from review rotation.)
 - #127568 (instantiate higher ranked goals in candidate selection again)
 - #127569 (Fix local download of Docker caches from CI)
 - #127570 ( small normalization improvement)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-07-10 16:12:47 +00:00
Matthias Krüger
22df186d6f
Rollup merge of #127570 - lcnr:normalize-cool, r=compiler-errors
small normalization improvement

r? `@compiler-errors`
2024-07-10 17:54:29 +02:00
Matthias Krüger
31639193ec
Rollup merge of #127569 - Kobzol:ci-fix-docker-local-rebuild, r=nikic
Fix local download of Docker caches from CI

https://github.com/rust-lang/rust/pull/127312 broke local downloads of Docker caches from CI, when you wanted to build a Docker image locally. This PR fixes that.

r? `@nikic`

(Can you please check if the cache works for you with this PR?)
2024-07-10 17:54:28 +02:00
Matthias Krüger
7faef5d5ed
Rollup merge of #127568 - lcnr:undo-leakcheck, r=oli-obk
instantiate higher ranked goals in candidate selection again

This reverts #119820 as that PR has a significant impact and breaks code which *feels like it should work*. The impact ended up being larger than we expected during the FCP and we've ended up with some ideas for how we can work around this issue in the next solver. This has been discussed in the previous high bandwidth t-types meeting: https://rust-lang.zulipchat.com/#narrow/stream/326132-t-types.2Fmeetings/topic/2024-07-09.20high.20bandwidth.20meeting.

We'll therefore keep this inconsistency between the two solvers for now and will have to deal with it before stabilizating the use of the new solver outside of coherence: https://github.com/rust-lang/trait-system-refactor-initiative/issues/120.

fixes #125194 after a beta-backport.

The pattern which is more widely used than expected and feels like it should work, especially without deep knowledge of the type system is
```rust
trait Trait<'a> {}
impl<'a, T> Trait<'a> for T {}

fn trait_bound<T: for<'a> Trait<'a>>() {}

// A function with a where-bound which is more restrictive than the impl.
fn function1<T: Trait<'static>>() {
    // stable: ok
    // with #119820: error as we prefer the where-bound over the impl
    // with this PR: back to ok
    trait_bound::<T>();
}

```

r? `@rust-lang/types`
2024-07-10 17:54:28 +02:00
Matthias Krüger
bbb0f66a0f
Rollup merge of #127564 - m-ou-se:review-rotation, r=joboet
Temporarily remove me from review rotation.
2024-07-10 17:54:27 +02:00
Matthias Krüger
aae262cafa
Rollup merge of #127554 - ferrocene:tshepang-add-missing-attribute, r=pietroalbini
do not run test where it cannot run

This was seen on Ferrocene, where we have a custom test target that does not have unwind support
2024-07-10 17:54:26 +02:00
Matthias Krüger
a7fe30d82a
Rollup merge of #127094 - Borgerr:E0191-suggestion-correction, r=fmease
E0191 suggestion correction, inserts turbofish

closes #91997
2024-07-10 17:54:26 +02:00
Matthias Krüger
d17e0cfc5d
Rollup merge of #126476 - ferrocene:pa-bootstrap-test-local-rustc, r=onur-ozkan
Fix running bootstrap tests with a local Rust toolchain as the stage0

When configuring a local Rust toolchain as the stage0 (with `build.rustc` and `build.cargo` in `config.toml`) we noticed there were test failures (both on the Python and the Rust side) due to bootstrap not being able to find rustc and Cargo.

This was due to those two `config.toml` settings not being propagated in the tests. This PR fixes the issue by ensuring rustc and cargo are always configured in tests, using the parent bootstrap's `initial_rustc` and `initial_cargo`.

try-job: x86_64-msvc
Fixes https://github.com/rust-lang/rust/issues/105766
2024-07-10 17:54:25 +02:00
lcnr
e00fd781c9 simplify and future-proof needs_normalization 2024-07-10 15:56:20 +02:00
bors
b215beb567 Auto merge of #127566 - GuillaumeGomez:sync-cg_gcc, r=GuillaumeGomez
Sync rustc_codegen_gcc

Follow-up of https://github.com/rust-lang/rustc_codegen_gcc/pull/535.

cc `@antoyo`
2024-07-10 13:25:26 +00:00
Jakub Beránek
e7bd16e6c8 Fix local download of Docker caches 2024-07-10 14:45:14 +02:00
lcnr
f77394fdf3 instantiate higher ranked goals in candidate selection
reverts #119820
2024-07-10 14:13:16 +02:00
Guillaume Gomez
8bf65c69f7 Update GCC version 2024-07-10 13:39:39 +02:00
bors
d81987661a Auto merge of #126690 - andyolivares:feature/show_window, r=dtolnay
Exposing STARTUPINFOW.wShowWindow in CommandExt trait

Hi:

I needed a way to control how a new process's window is displayed in Windows (normal, minimized, maximized, etc).
I noticed that there is no direct way to do that (I even searched for crates doing this, but didn't find any).

Inspecting the standard library source code, I figured that it would be a good addition to CommandExt trait that allows some Windows specific customization to a Command.

This is my first time contributing to Rust, so please bear with me if I'm not following the rules :)
2024-07-10 11:09:31 +00:00
Guillaume Gomez
541b32c8ab Update Cargo.lock and remove duplicated impl 2024-07-10 13:02:26 +02:00
Guillaume Gomez
7cbe50e209 Merge commit '98ed962c7d3eebe12c97588e61245273d265e72f' into master 2024-07-10 12:44:23 +02:00
Mara Bos
c8e44471b8 Temporarily remove me from review rotation. 2024-07-10 11:56:56 +02:00
bors
0fdfb61795 Auto merge of #127006 - Oneirical:holmes-the-detestive, r=Kobzol
Migrate `extern-flag-pathless`, `silly-file-names`, `metadata-dep-info`, `cdylib-fewer-symbols` and `symbols-include-type-name` `run-make` tests to rmake

Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).

`cdylib-fewer-symbols` demands a Windows try-job. (Almost guaranteed to fail, but 7 years is a long time)

try-job: x86_64-gnu-distcheck
try-job: x86_64-msvc
try-job: aarch64-apple
2024-07-10 08:51:20 +00:00
Oli Scherer
3562ec74ca Make visit_clobber's impl safe 2024-07-10 07:54:17 +00:00
Pietro Albini
9cd1d253a6
use utils::helpers::exe 2024-07-10 09:27:30 +02:00
bors
649feb9c1a Auto merge of #127549 - jhpratt:rollup-o1mbmhr, r=jhpratt
Rollup of 8 pull requests

Successful merges:

 - #124211 (Bump `elided_lifetimes_in_associated_constant` to deny)
 - #125627 (migration lint for `expr2024` for the edition 2024)
 - #127091 (impl FusedIterator and a size hint for the error sources iter)
 - #127461 (Fixup failing fuchsia tests)
 - #127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
 - #127508 (small search graph refactor)
 - #127521 (Remove spastorino from SMIR)
 - #127532 (documentation: update cmake version)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-07-10 06:35:04 +00:00
Jacob Pratt
08cb4628a8
Rollup merge of #127532 - simonLeary42:patch-1, r=Nilstrieb
documentation: update cmake version

Previously discussed here: https://github.com/rust-lang/rust/issues/127531
2024-07-10 00:37:13 -04:00
Jacob Pratt
103a77202a
Rollup merge of #127521 - spastorino:remove-myself-from-smir-pings, r=lqd
Remove spastorino from SMIR

r? ```@oli-obk```
2024-07-10 00:37:13 -04:00
Jacob Pratt
64695adbd7
Rollup merge of #127508 - lcnr:search-graph-prep, r=compiler-errors
small search graph refactor

small improvements which shouldn't impact behavior.

r? ``````@compiler-errors``````
2024-07-10 00:37:12 -04:00
Jacob Pratt
85bd32cd69
Rollup merge of #127484 - ShE3py:rustdoc-doc-alias-whitespace-doc, r=fmease
`#[doc(alias)]`'s doc: say that ASCII spaces are allowed

PR #77570 allowed ASCII spaces in doc aliases, but the documentation wasn't updated to say so.

The code checking the aliases:
7fdefb804e/compiler/rustc_passes/src/check_attr.rs (L693-L704)

``````@rustbot`````` label +A-docs
2024-07-10 00:37:12 -04:00
Jacob Pratt
74907296d8
Rollup merge of #127461 - c6c7:fixup-failing-fuchsia-tests, r=tmandry
Fixup failing fuchsia tests

The Fuchsia platform passes all tests with these changes. Two tests are ignored because they rely on Fuchsia not returning a status code upon a process aborting. See #102032 and #58590 for more details on that topic.

Many formatting changes are also included in this PR.

r? tmandry
r? erickt
2024-07-10 00:37:11 -04:00
Jacob Pratt
e71d3d5238
Rollup merge of #127091 - Sky9x:fused-error-sources-iter, r=dtolnay
impl FusedIterator and a size hint for the error sources iter

cc tracking issue #58520
2024-07-10 00:37:11 -04:00
Jacob Pratt
21a0e86234
Rollup merge of #125627 - vincenzopalazzo:macros/cargo-fix-expr2024, r=compiler-errors,eholk
migration lint for `expr2024` for the edition 2024

This is adding a migration lint for the current (in the 2021 edition and previous)
to move expr to expr_2021 from expr

Issue https://github.com/rust-lang/rust/issues/123742

I created also a repository to test out the migration https://github.com/vincenzopalazzo/expr2024-cargo-fix-migration

Co-Developed-by: ``@eholk``
2024-07-10 00:37:10 -04:00
Jacob Pratt
de143cf992
Rollup merge of #124211 - compiler-errors:bump-elided_lifetimes_in_associated_constant, r=BoxyUwU
Bump `elided_lifetimes_in_associated_constant` to deny

It's been 5 versions since this was last bumped. Let's bump it up again.
2024-07-10 00:37:10 -04:00
bors
7caf6726db Auto merge of #127496 - tgross35:f16-f128-pattern-fixme, r=Nadrieril
Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`

Just a small fix to the pattern matching tests now that we can. Also contains a small unrelated comment tweak.
2024-07-10 04:20:32 +00:00
Andres Olivares
b8b6d14de9 Fixed doc links 2024-07-09 22:09:13 -04:00
Andres Olivares
e82ad2e622 Few changes to doc comments. Added tracking issue number. 2024-07-09 22:09:13 -04:00
Andres Olivares
06d76c3156 Exposing STARTUPINFOW.wShowWindow in CommandExt (show_window function) to control how a new process should display its window (normal, minimized, maximized, etc) 2024-07-09 22:09:13 -04:00
bors
956deab788 Auto merge of #127495 - compiler-errors:more-trait-error-reworking, r=lcnr
More trait error reworking

More work on #127492, specifically those sub-bullets under "Move trait error reporting to `error_reporting::traits`". Stacked on top of #127493.

This does introduce new `TypeErrCtxt.*Ext` traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

r? lcnr
2024-07-10 02:08:19 +00:00
Ashton Hunt
7c88bda1cb E0191 suggestion correction, inserts turbofish without dyn (#91997) 2024-07-09 17:21:31 -06:00
bors
7d640b670e Auto merge of #127358 - oli-obk:taint_itemctxt, r=fmease
Automatically taint when reporting errors from ItemCtxt

This isn't very robust yet, as you need to use `itemctxt.dcx()` instead of `tcx.dcx()` for it to take effect, but it's at least more convenient than sprinkling `set_tainted_by_errors` calls in individual places.

based on https://github.com/rust-lang/rust/pull/127357

r? `@fmease`
2024-07-09 23:03:01 +00:00
Tshepang Mbambo
af3aa36d60
do not run test where it cannot run
This was seen on Ferrocene, where we have a custom test target that does not have unwind support
2024-07-10 01:00:55 +02:00
Charles Celerier
479b0cdb89 Ignore fuchsia tests implicitly relying on a signal upon abort
Both test-panic-abort-nocapture.rs and test-panic-abort.rs assert the
stderr output of the test. On Fuchsia, if a test fails an assertion,
this output will contain a line noting the process returned the code
-1028 (ZX_TASK_RETCODE_EXCEPTION_KILL). But the asserted stderr output
lacks this note. Presumably this is because other platforms implement
-Cpanic=abort by killing the process instead of returned a status
code.
2024-07-09 14:20:52 -07:00
Oneirical
2adfa147d7 rewrite issue-109934-lto-debuginfo as an ui test 2024-07-09 16:52:17 -04:00
Oneirical
80fb4cab4e rewrite type-mismatch-same-crate-name to rmake 2024-07-09 16:34:22 -04:00
bors
6be96e3865 Auto merge of #127234 - ZhuUx:inlined-expr, r=davidtwco,Zalathar
[Coverage][MCDC] Group mcdc tests and fix panic when generating mcdc code for inlined expressions.

### Changes

1. Group all mcdc tests to one directory.
2. Since mcdc instruments different mappings for boolean expressions with normal branch coverage as #125766 introduces, it would be better also trace branch coverage results in mcdc tests.
3. So far rustc does not call `CoverageInfoBuilderMethods::init_coverage` for inlined functions. As a result, it could panic if it tries to instrument mcdc statements for inlined functions due to uninitialized cond bitmaps. We can reproduce this issue by current nightly rustc and [the test](https://github.com/rust-lang/rust/pull/127234/files#diff-c81af6bf4869aa42f5c7334e3e86344475de362f673f54ce439ec75fcb5ac3e5) with flag `--release`. This patch fixes it.
2024-07-09 20:24:30 +00:00
Oneirical
37599b2072 rewrite and rename issue-83112-incr-test-moved-file to rmake 2024-07-09 16:13:45 -04:00
simonLeary42
dfac6fa5c6
cmake version is from LLVM, link to LLVM docs 2024-07-09 15:23:59 -04:00
Oneirical
d44732120c rewrite symbols-include-type-name to rmake 2024-07-09 14:30:57 -04:00