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

Different stderr output in stable and nightly rust #84

Closed
Frago9876543210 opened this issue Aug 8, 2020 · 1 comment
Closed

Different stderr output in stable and nightly rust #84

Frago9876543210 opened this issue Aug 8, 2020 · 1 comment

Comments

@Frago9876543210
Copy link

TIL about Attribute::parse_args method and make usage of it in my crate. However, CI failed on beta and stable. Meanwhile nightly build is fine.

Look the at line number (4:10 and 4:9). Expected output for trybuild was generated on rustc 1.45.0-nightly (5fd2f06e9 2020-05-31) and also matches with lastest

EXPECTED:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: unexpected end of input, expected identifier

 --> $DIR/04-excepted-endian-identifier.rs:4:10

  |

4 | #[endian()]

  |          ^
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error: unexpected end of input, expected identifier

 --> $DIR/04-excepted-endian-identifier.rs:4:9

  |

4 | #[endian()]

  |         ^^
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

Link to CI

@dtolnay dtolnay transferred this issue from dtolnay/syn Aug 8, 2020
@dtolnay
Copy link
Owner

dtolnay commented Aug 8, 2020

In general different compilers are free to produce different diagnostics. One can generally expect compiler diagnostics to improve over time.

Usually I run trybuild tests on a single toolchain only:
https://github.com/serde-rs/json/blob/4354fc3eb2232ee0ba9a9a23acce107a980a6dc0/tests/compiletest.rs#L1-L6

It would also be reasonable for a project to keep different expected output files for different toolchains but I have not found this valuable.

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

No branches or pull requests

2 participants