Skip to content

Commit

Permalink
Auto merge of #7826 - eddyb:recursion-limit-diagnostic, r=Eh2406
Browse files Browse the repository at this point in the history
test: allow some flexibility in check::error_from_deep_recursion's expected diagnostic.

This should unblock rust-lang/rust#68407, by loosening the expected output pattern.

As per rust-lang/rust#68407 (comment), this is the change in the diagnostic:
```diff
-recursion limit reached while expanding the macro `m`
+recursion limit reached while expanding `m!`
```

Ideally I would use something like this regex:
```
recursion limit reached while expanding (the macro `m`|`m!`)
```
but AFAIK these tests don't support regexes.
  • Loading branch information
bors committed Jan 24, 2020
2 parents 6de33f0 + 4d3b738 commit b68b097
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testsuite/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ fn error_from_deep_recursion() -> Result<(), fmt::Error> {
p.cargo("check --message-format=json")
.with_status(101)
.with_stdout_contains(
"[..]\"message\":\"recursion limit reached while expanding the macro `m`\"[..]",
"[..]\"message\":\"recursion limit reached while expanding [..]`m[..]`\"[..]",
)
.run();

Expand Down

0 comments on commit b68b097

Please sign in to comment.