-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #103601 - compiler-errors:no-opaque-probe-in-nll-relate…
…, r=oli-obk Remove `commit_if_ok` probe from NLL type relation It was not really necessary to add the `commit_if_ok` in #100092 -- I added it to protect us against weird inference error messages due to recursive RPIT calls, but we are always on the error path when this happens anyways, and I can't come up with an example that makes this manifest. Fixes #103599 r? `@oli-obk` since you reviewed #100092, feel free to re-roll. :b: :loudspeaker: beta-nominating this since it's on beta (which forks in ~a week~ two days :fearful:) -- worst case we could revert the original PR on beta and land this on nightly, to give it some extra soak time...
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// check-pass | ||
|
||
trait T {} | ||
|
||
fn wrap(x: impl T) -> impl T { | ||
//~^ WARN function cannot return without recursing | ||
wrap(wrap(x)) | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
warning: function cannot return without recursing | ||
--> $DIR/issue-103599.rs:5:1 | ||
| | ||
LL | fn wrap(x: impl T) -> impl T { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing | ||
LL | | ||
LL | wrap(wrap(x)) | ||
| ------- recursive call site | ||
| | ||
= help: a `loop` may express intention better if this is on purpose | ||
= note: `#[warn(unconditional_recursion)]` on by default | ||
|
||
warning: 1 warning emitted | ||
|