Commit Graph

18385 Commits

Author SHA1 Message Date
Andrew Zhogin
dc794f18a4 When AsyncDrop impl is empty, sync drop generated in elaborator (Fixes #140974) 2025-05-21 18:18:27 +07:00
lcnr
196c3b3ef4 eagerly check nested obligations when coercing fndefs 2025-05-21 11:09:48 +00:00
Michael Goulet
ad59f0b6e6 Use DeepRejectCtxt in assemble_inherent_candidates_from_param 2025-05-21 10:02:54 +00:00
Matthias Krüger
5b150e3122 Rollup merge of #141318 - nnethercote:fix-140884, r=compiler-errors
Avoid creating an empty identifer in `Symbol::to_ident_string`.

Because that causes an assertion failure in debug builds.

Fixes #140884.

r? `@oli-obk`
2025-05-21 11:28:47 +02:00
Matthias Krüger
aaa684fd1d Rollup merge of #141317 - dianne:continue-liveness-ice-fix, r=compiler-errors
typeck: catch `continue`s pointing to blocks

This taints the typeck results with errors if a `continue` is found not pointing to a loop.

A few things were going wrong here. First, since this wasn't caught in typeck, we'd end up building the THIR and then running liveness lints on ill-formed HIR. Since liveness assumes all `continue`s point to loops, it wasn't setting a live node for the `continue`'s destination. There was a fallback for if it couldn't retrieve that live node, but it was faulty; it would create a new live node to represent an erroneous state after the analysis's RWU table had already been built. This would ICE if the new live node was used in operations, such as merging results from the arms of a match. I've removed this error-recovery since it was buggy, and we should really catch bad labels before liveness.

I've also replaced an outdated comment about when liveness lints are run. At this point, I think the call to `check_liveness` could be moved elsewhere, but if it can be run when the typeck results are tainted by errors, it'll need some slight refactoring so it can bail out in that case. In lieu of that, I've added an assert.

Fixes #113379
Fixes #121623
2025-05-21 11:28:46 +02:00
Matthias Krüger
d30f0471c3 Rollup merge of #141213 - xizheyin:issue-141136, r=nnethercote
Suggest use "{}", self.x instead of {self.x} when resolve x as field of `self`

Fixes #141136

Changes can be seen in the second commit: 9de7fff0d8

r? compiler
2025-05-21 11:28:45 +02:00
Michael Goulet
44a2af3068 Do not eagerly fold consts in normalize_param_env_or_error if new solver 2025-05-21 09:23:36 +00:00
Nicholas Nethercote
1cc0e38fdc Avoid creating an empty identifer in Symbol::to_ident_string.
Because that causes an assertion failure in debug builds.

Fixes #140884.
2025-05-21 18:59:04 +10:00
Matthias Krüger
1b3159a4c0 Rollup merge of #141308 - spastorino:fix-rpitit-error-reporting-ice, r=nnethercote
Do not call name() on rpitit assoc_item

Fixes #141143

r? `@nnethercote`
2025-05-21 08:05:25 +02:00
Matthias Krüger
197898d003 Rollup merge of #140981 - est31:guard_let_chains_tests, r=petrochenkov
Add match guard let chain drop order and scoping tests

We have a bunch of tests for if let chain drop order, but those tests don't cover match guard chains to the same depth. This PR adds the following tests:

* match guard equivalents of the if let chains tests in the `drop-order-comparisons.rs` test, added by  #133605.
* match guard equivalent of the `mir_let_chains_drop_order.rs` test, added by #107251
* match guard equivalent of `temporary-early-drop.rs`, added by #133093

The added tests all have variants for 2021 and 2024, showing that the behavior on both editions matches that of if let chains on 2024.

tracking issue: https://github.com/rust-lang/rust/issues/51114
2025-05-21 08:05:11 +02:00
bors
87b4541569 Auto merge of #127721 - bvanjoi:issue-124273, r=petrochenkov
collect doc alias as tips during resolution

Close #124273

Collect the symbol in the doc alias attributes and provide a tip when a match is found.

r? `@estebank`
2025-05-21 02:21:28 +00:00
dianne
ed01a20514 typeck: catch continues pointing to blocks
This taints the typeck results with errors if a `continue` is found not
pointing to a loop, which fixes an ICE.

A few things were going wrong here. First, since this wasn't caught in
typeck, we'd end up building the THIR and then running liveness lints on
ill-formed HIR. Since liveness assumes all `continue`s point to loops,
it wasn't setting a live node for the `continue`'s destination. However,
the fallback for this was faulty; it would create a new live node to
represent the erroneous state after the analysis's RWU table had already
been built. This would ICE if the new live node was used in operations,
such as merging results from the arms of a match. I've removed this
error-recovery since it was buggy, and we should really catch bad labels
before liveness.

I've also replaced an outdated comment about when liveness lints are
run. At this point, I think the call to `check_liveness` could be moved
elsewhere, but if it can be run when the typeck results are tainted by
errors, it'll need some slight refactoring so it can bail out in that
case. In lieu of that, I've added an assertion.
2025-05-20 17:45:16 -07:00
Santiago Pastorino
66d47c1687 Do not call name() on rpitit assoc_item 2025-05-20 17:30:08 -03:00
bohan
097b7a2ac7 collect doc alias as tips during resolution 2025-05-21 00:47:36 +08:00
Matthias Krüger
ac500add80 Rollup merge of #141275 - dianne:gather-guard-pat-locals-once, r=compiler-errors
`gather_locals`: only visit guard pattern guards when checking the guard

When checking a pattern with guards in it, `GatherLocalsVisitor` will visit both the pattern (when type-checking the let, arm, or param containing it) and local declarations in the guard expression (when checking the guard itself). This keeps it from visiting the guard when visiting the pattern, since otherwise it would gather locals from the guard twice, which would lead to a delayed bug: "evaluated expression more than once".

Tracking issue for guard patterns: #129967
2025-05-20 16:50:41 +02:00
Matthias Krüger
5364668fb5 Rollup merge of #141253 - azhogin:azhogin/async-drop-feature-inconsistency-warning, r=oli-obk
Warning added when dependency crate has async drop types, and the feature is disabled

In continue of https://github.com/rust-lang/rust/pull/141031.

When dependency crate has non-empty `adt_async_destructor` table in metadata, and `async_drop` feature is disabled for local crate, warning will be emitted.

Test `dependency-dropped` has two revisions - with and without feature enabled. With feature enabled, async drop for dropee is executed ("Async drop" printed). Without the feature enabled, sync drop is executed ("Sync drop" printed) and warning is emitted.

Warning example:
```
warning: found async drop types in dependecy `async_drop_dep`, but async_drop feature is disabled for `dependency_dropped`
  --> $DIR/dependency-dropped.rs:7:1
   |
LL | #![cfg_attr(with_feature, feature(async_drop))]
   | ^
   |
   = help: if async drop type will be dropped in a crate without `feature(async_drop)`, sync Drop will be used
```
2025-05-20 16:50:40 +02:00
Matthias Krüger
42ed69c756 Rollup merge of #141236 - jagunter:issue-140823, r=compiler-errors
Resolved issue with mismatched types triggering ICE in certain scenarios

## Background

The function `annotate_mut_binding_to_immutable_binding` called in `emit_coerce_suggestions` performs a type comparison between the `expected` and `found` types from `ExpectedFound` in the `TypeError`. This can fail if the `found` type contains a region variable that's been rolled back.

## What is being changed?

This updates `annotate_mut_binding_to_immutable_binding` to use `expr_ty` and `expected` from the parent function instead of the types from the `TypeError`. This sidesteps the issue of using `found` from `TypeError` which may leak lingering inference region variables.

This does change the diagnostic behavior to _only_ support cases where the expected outermost type is `&T`, but that seems to be the intended functionality.

Also fixed the example in the `annotate_mut_binding_to_immutable_binding` rustdocs.

r? rust-lang/types

Fixes #140823
2025-05-20 16:50:39 +02:00
Michael Goulet
7e7c2c3947 Just error on recursive opaque ty in HIR typeck 2025-05-20 10:08:56 +00:00
dianne
c343b2a47c gather_locals: only visit guard pattern guards when checking the guard
When checking a pattern with guards in it, `GatherLocalsVisitor` will
visit both the pattern (when type-checking the let, arm, or param
containing it) and the guard expression (when checking the guard
itself). This keeps it from visiting the guard when visiting the
pattern, since otherwise it would gather locals from the guard twice,
which would lead to a delayed bug: "evaluated expression more than
once".
2025-05-19 23:18:08 -07:00
xizheyin
4ec991989a Add println! test for sugg-field-in-format-string-issue-141136
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-20 14:10:17 +08:00
Ralf Jung
a29756d085 make std::intrinsic functions actually be intrinsics 2025-05-20 08:09:16 +02:00
dianne
ed983c2184 only resolve top-level guard patterns' guards once
We resolve guard patterns' guards in `resolve_pattern_inner`, so to
avoid resolving them multiple times, we must avoid doing so earlier. To
accomplish this, `LateResolutionVisitor::visit_pat` contains a case for
guard patterns that avoids visiting their guards while walking patterns.
This fixes an ICE due to `visit::walk_pat` being used instead, which
meant guards at the top level of a pattern would be visited twice.
2025-05-19 18:02:54 -07:00
Andrew Zhogin
4a99cbbf6b Warning when dependency crate has async drop types, and the feature is disabled - typo fixed 2025-05-20 04:36:33 +07:00
Josh Gunter
db1ac98081 Fixed possible ICE in annotate_mut_binding_to_immutable_binding 2025-05-19 10:16:29 -07:00
bors
59372f2c81 Auto merge of #141255 - matthiaskrgr:rollup-ravsgen, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #131200 (Handle `rustc_query_system` cases of `rustc::potential_query_instability` lint)
 - #141244 (windows: document that we rely on an undocumented property of GetUserProfileDirectoryW)
 - #141247 (skip compiler tools sanity checks on certain commands)
 - #141248 (fix data race in ReentrantLock fallback for targets without 64bit atomics)
 - #141249 (introduce common macro for `MutVisitor` and `Visitor` to dedup code)
 - #141253 (Warning added when dependency crate has async drop types, and the feature is disabled)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-19 16:15:35 +00:00
Andrew Zhogin
61059282eb Warning added when dependency crate has async drop types, and the feature is disabled 2025-05-19 21:38:07 +07:00
Stuart Cook
315874c077 Rollup merge of #141242 - folkertdev:aarch64-asm-parse-errors, r=Amanieu
in `tests/ui/asm/aarch64/parse-error.rs`, only test cases specific to that target

this is more in line with the x86 parse error tests at https://github.com/rust-lang/rust/blob/master/tests/ui/asm/x86_64/x86_64_parse_error.rs. We could at this point use minicore so that these tests run no matter the host target?

`tests/ui/asm/aarch64/parse-error.rs` was mostly a copy of https://github.com/rust-lang/rust/blob/master/tests/ui/asm/parse-error.rs, though a bit out of date. The only aarch64-specific tests are those that talk about register names. Here is a diff between those two files:

```diff
--- <unnamed>
+++ <unnamed>
`@@` -1,4 +1,4 `@@`
-//@ needs-asm-support
+//@ only-aarch64

 use std::arch::{asm, global_asm};

`@@` -36,36 +36,12 `@@`
         //~^ ERROR expected one of
         asm!("{}", options(), const foo);
         //~^ ERROR attempt to use a non-constant value in a constant
-
-        // test that asm!'s clobber_abi doesn't accept non-string literals
-        // see also https://github.com/rust-lang/rust/issues/112635
-        asm!("", clobber_abi());
-        //~^ ERROR at least one abi must be provided
         asm!("", clobber_abi(foo));
         //~^ ERROR expected string literal
         asm!("", clobber_abi("C" foo));
         //~^ ERROR expected one of `)` or `,`, found `foo`
         asm!("", clobber_abi("C", foo));
         //~^ ERROR expected string literal
-        asm!("", clobber_abi(1));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(()));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(uwu));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi({}));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(loop {}));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(if));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(do));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(<));
-        //~^ ERROR expected string literal
-        asm!("", clobber_abi(.));
-        //~^ ERROR expected string literal
-
         asm!("{}", clobber_abi("C"), const foo);
         //~^ ERROR attempt to use a non-constant value in a constant
         asm!("", options(), clobber_abi("C"));
`@@` -76,7 +52,15 `@@`
         //~^^ ERROR argument never used
         //~^^^ ERROR attempt to use a non-constant value in a constant
         //~^^^^ ERROR attempt to use a non-constant value in a constant
-
+        asm!("", a = in("x0") foo);
+        //~^ ERROR explicit register arguments cannot have names
+        asm!("{a}", in("x0") foo, a = const bar);
+        //~^ ERROR attempt to use a non-constant value in a constant
+        asm!("{a}", in("x0") foo, a = const bar);
+        //~^ ERROR attempt to use a non-constant value in a constant
+        asm!("{1}", in("x0") foo, const bar);
+        //~^ ERROR positional arguments cannot follow named arguments or explicit register arguments
+        //~^^ ERROR attempt to use a non-constant value in a constant
         asm!("", options(), "");
         //~^ ERROR expected one of
         asm!("{}", in(reg) foo, "{}", out(reg) foo);
`@@` -109,13 +93,11 `@@`
 global_asm!("{}", const(reg) FOO);
 //~^ ERROR expected one of
 global_asm!("", options(FOO));
-//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
-global_asm!("", options(FOO,));
-//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
+//~^ ERROR expected one of
 global_asm!("", options(nomem FOO));
-//~^ ERROR expected one of `)` or `,`, found `FOO`
+//~^ ERROR expected one of
 global_asm!("", options(nomem, FOO));
-//~^ ERROR expected one of `)`, `att_syntax`, or `raw`, found `FOO`
+//~^ ERROR expected one of
 global_asm!("{}", options(), const FOO);
 global_asm!("", clobber_abi(FOO));
 //~^ ERROR expected string literal
`@@` -129,8 +111,6 `@@`
 //~^ ERROR `clobber_abi` cannot be used with `global_asm!`
 global_asm!("{}", options(), clobber_abi("C"), const FOO);
 //~^ ERROR `clobber_abi` cannot be used with `global_asm!`
-global_asm!("", clobber_abi("C"), clobber_abi("C"));
-//~^ ERROR `clobber_abi` cannot be used with `global_asm!`
 global_asm!("{a}", a = const FOO, a = const BAR);
 //~^ ERROR duplicate argument named `a`
 //~^^ ERROR argument never used
`@@` -142,16 +122,3 `@@`
 //~^ ERROR asm template must be a string literal
 global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
 //~^ ERROR asm template must be a string literal
-
-global_asm!("{}", in(reg));
-//~^ ERROR the `in` operand cannot be used with `global_asm!`
-global_asm!("{}", out(reg));
-//~^ ERROR the `out` operand cannot be used with `global_asm!`
-global_asm!("{}", lateout(reg));
-//~^ ERROR the `lateout` operand cannot be used with `global_asm!`
-global_asm!("{}", inout(reg));
-//~^ ERROR the `inout` operand cannot be used with `global_asm!`
-global_asm!("{}", inlateout(reg));
-//~^ ERROR the `inlateout` operand cannot be used with `global_asm!`
-global_asm!("{}", label(reg));
-//~^ ERROR the `label` operand cannot be used with `global_asm!`
```
2025-05-19 21:10:44 +10:00
Stuart Cook
1d5c35a52d Rollup merge of #141225 - matthiaskrgr:crashes_may2015, r=compiler-errors
more ice tests

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: test-various
2025-05-19 21:10:44 +10:00
Stuart Cook
3b22c21dd8 Rollup merge of #140847 - Zalathar:unused-local-file, r=SparrowLii
coverage: Detect unused local file IDs to avoid an LLVM assertion

Each function's coverage metadata contains a *local file table* that maps local file IDs (used by the function's mapping regions) to global file IDs (shared by all functions in the same CGU).

LLVM requires all local file IDs to have at least one mapping region, and has an assertion that will fail if it detects a local file ID with no regions. To make sure that assertion doesn't fire, we need to detect and skip functions whose metadata would trigger it.

(This can't actually happen yet, because currently all of a function's spans must belong to the same file and expansion. But this will be an important edge case when adding expansion region support.)
2025-05-19 21:10:42 +10:00
Folkert de Vries
85f9dce889 in aarch64 asm parse error tests, only test cases specific to that target
this is more in line with the x86 parse error tests. The cross-platform tests were more complete anyway
2025-05-19 11:11:55 +02:00
Stuart Cook
d5e59b8a38 Rollup merge of #141094 - satler-git:issue-101650, r=lcnr
add regression test for rust-lang#101650

closes #101650, which was already fixed.
2025-05-19 13:24:54 +10:00
Stuart Cook
0513e3b463 Rollup merge of #140049 - haenoe:fix-autodiff-generics, r=ZuseZ4
fix autodiff macro on generic functions

heloo there!
This short PR allows applying the `autodiff` macro to generic functions like this one.
It only touches the frontend part, since the `rustc_autodiff` macro can already handle generics.
```rust
#[autodiff(d_square, Reverse, Duplicated, Active)]
fn square<T: std::ops::Mul<Output = T> + Copy>(x: &T) -> T {
    *x * *x
}
```
Thanks to Manuel for creating an issue on this. For more information on this see #140032
r? `@ZuseZ4`

As always: thanks for any piece of feedback!!

Fixes: #140032
Tracking issue for autodiff: https://github.com/rust-lang/rust/issues/124509
2025-05-19 13:24:53 +10:00
León Orell Valerian Liehr
50b20b73da Rollup merge of #141218 - dianqk:gvn-overlapping, r=oli-obk
gvn: avoid creating overlapping assignments

Quick fix #141038, as I couldn't find a way to avoid in-place modification. I'm considering handling all `ravlue` modifications within the `visit_statement` function.

r? mir-opt
2025-05-18 18:44:14 +02:00
León Orell Valerian Liehr
4e5b1aa055 Rollup merge of #140746 - dianne:guard-pat-res, r=oli-obk
name resolution for guard patterns

This PR provides an initial implementation of name resolution for guard patterns [(RFC 3637)](https://github.com/rust-lang/rfcs/blob/master/text/3637-guard-patterns.md). This does not change the requirement that the bindings on either side of an or-pattern must be the same [(proposal here)](https://github.com/rust-lang/rfcs/blob/master/text/3637-guard-patterns.md#allowing-mismatching-bindings-when-possible); the code that handles that is separate from what this PR touches, so I'm saving it for a follow-up.

On a technical level, this separates "collecting the bindings in a pattern" (which was already done for or-patterns) from "introducing those bindings into scope". I believe the approach used here can be extended straightforwardly in the future to work with `if let` guard patterns, but I haven't tried it myself since we don't allow those yet.

Tracking issue for guard patterns: #129967

cc ``@Nadrieril``
2025-05-18 18:44:11 +02:00
León Orell Valerian Liehr
2f0c6e217f Rollup merge of #140490 - folkertdev:asm-parser-changes, r=Amanieu,traviscross
split `asm!` parsing and validation

This PR splits `asm!` parsing and validation into two separate steps.

The parser constructs a `Vec<RawAsmArg>`, with each element corresponding to an argument to one of the `asm!` macros.
The validation then checks things like ordering of arguments or that options are not provided twice.

The motivation is https://github.com/rust-lang/rust/issues/140279, which wants to add `#[cfg(...)]` support to these arguments. This support can now be added in a straightforward way by adding an `attributes: ast::AttrVec` field to `RawAsmArg`.

An extra reason for this split is that `rustfmt` probably wants to format the assembly at some point (currently that appears to be stubbed out, and the formatting is unstable https://github.com/rust-lang/style-team/issues/152).

r? ``@ghost`` (just want to look at CI for now)

cc ``@ytmimi`` we discussed asm formatting a little while ago in https://github.com/rust-lang/rustfmt/issues/6526. Am I correct in assuming that `AsmArgs` does not give enough information for formatting, but that `RawAsmArgs` would (it e.g. does not join information from multiple lines). This must have been an issue before?

try-job: aarch64-apple
2025-05-18 18:44:10 +02:00
León Orell Valerian Liehr
2f6811eff8 Rollup merge of #138940 - sayantn:stabilize-avx512, r=Amanieu,traviscross
Stabilize the avx512 target features

This PR stabilizes the AVX512 target features - see [this comment](https://github.com/rust-lang/rust/issues/111137#issuecomment-2745821279).

Tracking Issue - #44839

The target feature UI tests have been changed to `x87` (chosen because this is very unlikely to stablize ever, please comment if some other feature will be better)

related: #111137
2025-05-18 18:44:10 +02:00
Matthias Krüger
0443a66d39 more ice tests 2025-05-18 17:25:34 +02:00
dianne
f0b8ec1d71 name resolution for guard patterns 2025-05-18 04:21:57 -07:00
dianqk
d2e5a3d131 gvn: avoid creating overlapping assignments 2025-05-18 18:42:00 +08:00
Folkert de Vries
e12d675739 delay error for unsupported options 2025-05-18 11:28:31 +02:00
León Orell Valerian Liehr
b89118aed8 Rollup merge of #141132 - bvanjoi:issue-141082, r=fmease
Use `crate::` prefix for root macro suggestions

Fixes #141082

I've changed the prefix to `crate` directly, since it's compatible across all editions.
2025-05-18 11:03:47 +02:00
León Orell Valerian Liehr
e323c64fa4 Rollup merge of #141045 - dpaoliello:noarmhazard, r=jieyouxu
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test

PR #140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor.

Adding this flag caused issues with LLD, as it doesn't recognize it.

Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning.

Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134>

This PR supersedes #140977

r? ```@jieyouxu```
2025-05-18 11:03:46 +02:00
León Orell Valerian Liehr
eb21b252c6 Rollup merge of #140966 - est31:let_chains_library, r=tgross35
Remove #![feature(let_chains)] from library and src/librustdoc

PR https://github.com/rust-lang/rust/pull/132833 has stabilized the `let_chains` feature. This PR removes the last occurences from the library, the compiler, and librustdoc (also because #140887 missed the conditional in one of the crates as it was behind the "rustc" feature).

We keep `core` as exercise for the future as updating it is non-trivial (see PR thread).
2025-05-18 11:03:45 +02:00
xizheyin
9de7fff0d8 Suggest use "{}", self.x instead of {self.x} when resolve x as field of self
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-18 16:14:48 +08:00
xizheyin
fe0663c33d Add test sugg-field-in-format-string-issue-141136
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-05-18 15:53:03 +08:00
sayantn
2898680ebd Remove uses of #[feature(avx512_target_feature)] 2025-05-18 11:12:25 +05:30
sayantn
cf7caded0b Stabilize avx512_target_feature 2025-05-18 11:12:15 +05:30
bohan
1adfdb42b9 Use crate:: prefix for root macro suggestions 2025-05-17 22:01:57 +08:00
Matthias Krüger
909098728c Rollup merge of #141125 - lcnr:coroutine_obligations_use_borrowck, r=compiler-errors
check coroutines with `TypingMode::Borrowck` to avoid cyclic reasoning

MIR borrowck taints its output if an obligation fails. This could then cause `check_coroutine_obligations` to silence its error, causing us to not emit and actual error and ICE.

Fixes the ICE in https://github.com/rust-lang/trait-system-refactor-initiative/issues/199. It is unfortunately still a regression.

r? compiler-errors
2025-05-17 15:45:22 +02:00
Matthias Krüger
616650b6ca Rollup merge of #141121 - compiler-errors:ambig-is-not-err, r=lcnr
Only select true errors in `impossible_predicates`

See description in test.

Fixes #141119

r? lcnr
2025-05-17 15:45:22 +02:00