Skip to content

Commit 182c795

Browse files
committed
Update trybuild for improved normalization
The library source location references made the test brittle across changes to peg-runtime/lib.rs
1 parent 4710d96 commit 182c795

File tree

3 files changed

+44
-46
lines changed

3 files changed

+44
-46
lines changed

Cargo.lock

Lines changed: 32 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ peg-macros = { path = "./peg-macros", version = "= 0.8.1" }
1818
peg-runtime = { path = "./peg-runtime", version = "= 0.8.1" }
1919

2020
[dev-dependencies]
21-
trybuild = "1.0"
21+
trybuild = "1.0.80"
2222

2323
[[test]]
2424
name = "trybuild"
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
error[E0308]: mismatched types
2-
--> $DIR/rust_action_type_error.rs:7:27
3-
|
4-
7 | rule foo() -> X = "a" { Y } //~ ERROR
5-
| ^^^^^
6-
| |
7-
| expected struct `X`, found struct `Y`
8-
| arguments to this enum variant are incorrect
9-
|
2+
--> tests/compile-fail/rust_action_type_error.rs:7:27
3+
|
4+
7 | rule foo() -> X = "a" { Y } //~ ERROR
5+
| ^^^^^
6+
| |
7+
| expected struct `X`, found struct `Y`
8+
| arguments to this enum variant are incorrect
9+
|
1010
help: the type constructed contains `Y` due to the type of the argument passed
11-
--> $DIR/rust_action_type_error.rs:7:27
11+
--> tests/compile-fail/rust_action_type_error.rs:7:27
1212
|
1313
7 | rule foo() -> X = "a" { Y } //~ ERROR
1414
| ^^^^^ this argument influences the type of `{{root}}`
1515
note: tuple variant defined here
16-
--> $DIR/lib.rs:14:5
16+
--> peg-runtime/lib.rs
1717
|
18-
14 | Matched(usize, T),
18+
| Matched(usize, T),
1919
| ^^^^^^^
2020
= note: this error originates in the macro `peg::parser` (in Nightly builds, run with -Z macro-backtrace for more info)

0 commit comments

Comments
 (0)