Skip to content

Confusing error message when placing #![test] on a module #14772

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

Closed
ghost opened this issue Jun 9, 2014 · 0 comments
Closed

Confusing error message when placing #![test] on a module #14772

ghost opened this issue Jun 9, 2014 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints

Comments

@ghost
Copy link

ghost commented Jun 9, 2014

//foo.rs
mod test;

//test.rs
#![test]

This will give a

error: functions used as tests must have signature fn() -> ().
foo.rs: mod test;
        ^~~~~~~~~

Which is particularly confusing when the user has already written some test functions in test.rs.

bors added a commit that referenced this issue Oct 5, 2014
@bors bors closed this as completed in cc31d9c Oct 5, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue May 15, 2025
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant