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

Give a better error message when running cargo test on libstd itself #76444

Closed
jyn514 opened this issue Sep 7, 2020 · 2 comments
Closed

Give a better error message when running cargo test on libstd itself #76444

jyn514 opened this issue Sep 7, 2020 · 2 comments
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-diagnostics Area: Messages for errors, warnings, and lints D-confusing Diagnostics: Confusing error or lint that should be reworked. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@jyn514
Copy link
Member

jyn514 commented Sep 7, 2020

Right now, you get really terrible errors like this:

$ cargo test
error[E0277]: the size for values of type `()` cannot be known at compilation time
   --> /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.1.14/src/use_file.rs:30:44
    |
30  | pub fn getrandom_inner(dest: &mut [u8]) -> Result<(), Error> {
    |                                            ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `()`

162 times. It would be more helpful to instead say 'use x.py test instead'.

@jyn514 jyn514 added A-diagnostics Area: Messages for errors, warnings, and lints T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) D-confusing Diagnostics: Confusing error or lint that should be reworked. labels Sep 7, 2020
@jyn514 jyn514 added the A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself label Sep 13, 2020
@dawnFromDark

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented Mar 29, 2022

Fixed by #94796.

@jyn514 jyn514 closed this as completed Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-diagnostics Area: Messages for errors, warnings, and lints D-confusing Diagnostics: Confusing error or lint that should be reworked. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
2 participants