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

#![test] on a crate has an... interesting effect #28134

Closed
jonas-schievink opened this issue Aug 31, 2015 · 4 comments
Closed

#![test] on a crate has an... interesting effect #28134

jonas-schievink opened this issue Aug 31, 2015 · 4 comments
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@jonas-schievink
Copy link
Contributor

<anon>:1:1: 1:4 error: unresolved import `std::prelude::v1::*`. Maybe a missing `extern crate std`?
<anon>:1 #![test]
         ^~~
error: aborting due to previous error
@Mark-Simulacrum
Copy link
Member

This appears to now be fixed.

rustc 1.14.0-nightly (cae6ab1c4 2016-11-05)
error: only functions may be used as tests
 --> <anon>:1:1
  |
1 | #![test]
  | ^

error: aborting due to previous error

@jonas-schievink
Copy link
Contributor Author

Neat! Just needs a test if there isn't one already.

@Mark-Simulacrum
Copy link
Member

There's https://github.com/rust-lang/rust/blob/master/src/test/compile-fail/issue-14772.rs, but I'm not sure if that qualifies as testing this in particular. If not, I can add one.

@Mark-Simulacrum
Copy link
Member

Marking as E-needstest. I don't think the test I linked previously really fits this case.

@Mark-Simulacrum Mark-Simulacrum added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label May 16, 2017
@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. and removed I-papercut labels Jul 22, 2017
euclio added a commit to euclio/rust that referenced this issue Oct 4, 2018
bors added a commit that referenced this issue Oct 7, 2018
Add tests for some E-needstest issues

Fixes #28134.
Fixes #24338.
Fixes #29743.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

No branches or pull requests

3 participants