Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trivial difference between full and non-full expression parse errors #1491

Merged
merged 1 commit into from Jul 31, 2023

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jul 31, 2023

This silly difference causes serde_derive's UI test suite to fail depending on whether syn's "full" feature is turned on.

syn/src/expr.rs

Line 1666 in f79ba15

Err(input.error("expected expression"))

syn/src/expr.rs

Line 1692 in f79ba15

Err(input.error("expected an expression"))

test tests/ui/malformed/cut_off.rs ... mismatch

EXPECTED:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: unexpected end of input, expected an expression
 --> tests/ui/malformed/cut_off.rs:4:17
  |
4 | #[serde(rename =)]
  |                 ^
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: unexpected end of input, expected expression
 --> tests/ui/malformed/cut_off.rs:4:17
  |
4 | #[serde(rename =)]
  |                 ^
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
note: If the actual output is the correct output you can bless it by rerunning
      your test with the environment variable TRYBUILD=overwrite

@dtolnay dtolnay merged commit 65aa662 into master Jul 31, 2023
28 checks passed
@dtolnay dtolnay deleted the expectedexpr branch July 31, 2023 00:37
dtolnay added a commit to serde-rs/serde that referenced this pull request Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant