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

"unknown start of token" error message is really bad #3747

Closed
catamorphism opened this issue Oct 13, 2012 · 5 comments
Closed

"unknown start of token" error message is really bad #3747

catamorphism opened this issue Oct 13, 2012 · 5 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@catamorphism
Copy link
Contributor

use std::list;
?use vec;

fn main() {}

This yields:

../src/test/compile-fail/bad-token-use.rs:1:13: 1:14 error: unknown start of token: 63
../src/test/compile-fail/bad-token-use.rs:1 use std::list;
                                                         ^

This is bad in a few different ways:

  1. "unknown start of token" is obscure, and why can't it print out '?' instead of 63?
  2. The error message does not show the erroneous code.
  3. The span is messed-up.
  4. I ran into this with a file in rustc, and in that case, the error message was much worse: the span was line 1 of rustc.rc. Panic-inducing.
@catamorphism
Copy link
Contributor Author

Non-critical for 0.6, de-milestoning

@catamorphism
Copy link
Contributor Author

Nominating for milestone 5, production-ready.

@graydon
Copy link
Contributor

graydon commented May 9, 2013

perfect storm of bad parser error messages, accepting

@graydon
Copy link
Contributor

graydon commented May 9, 2013

accepted for production-ready milestone

@emberian
Copy link
Member

emberian commented Aug 5, 2013

Still relevant

bors added a commit that referenced this issue Aug 18, 2013
The span was fixed at some point to point to the correct character, but
the error message is still bad. Update it to emit the actual character
in question (potentially escaped).

Fixes #3747.
@bors bors closed this as completed in fdaae34 Aug 18, 2013
bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 10, 2024
remove some SSE/SSE2 intrinsics that are no longer used by stdarch

Fixes rust-lang/miri#3691
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 18, 2024
remove some SSE/SSE2 intrinsics that are no longer used by stdarch

Fixes rust-lang/miri#3691
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-frontend Area: Compiler frontend (errors, parsing and HIR) E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants