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

prefer reporting errors over warnings #4

Open
setharnold opened this issue Feb 8, 2018 · 1 comment
Open

prefer reporting errors over warnings #4

setharnold opened this issue Feb 8, 2018 · 1 comment

Comments

@setharnold
Copy link

Hello,

When eval sees a request like: eval: static X: u8 = [1,2][4]; it will report the warning from rustc rather than reporting the error that prevented compilation:

<panicbit> eval: static X: u8 = [1,2][4];
-eval:#rust-offtopic- warning: static item is never used: `X`
-eval:#rust-offtopic-  --> src/main.rs:3:9
-eval:#rust-offtopic- ~~~ Output truncated; full output at 
          https://play.rust-lang.org/?gist=41c374e4777addb6aa7f8e239fbed2f3&version=stable&mode=debug

I think the output would be more useful if it reported the first error, rather than whatever happened to be the first output:

error[E0080]: constant evaluation error

Thanks

@panicbit
Copy link
Owner

panicbit commented Feb 8, 2018

It would be useful to be able to get the compiler's json output from the playground to avoid this becoming a mess.

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