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

libsyntax: fix for has_test_signature #21504

Closed
wants to merge 3 commits into from
Closed

libsyntax: fix for has_test_signature #21504

wants to merge 3 commits into from

Conversation

blackbeam
Copy link
Contributor

Fix for error: functions used as tests must have signature fn() -> () and error: functions used as benches must have signature fn(&mut Bencher) -> () in case of explicit return type declaration.

Currently

#[test]
fn some_test() -> () {}

will produce:

error: functions used as tests must have signature fn() -> ()

which is definitely wrong.

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@alexcrichton
Copy link
Member

@bors: r+ 3dbac78

@alexcrichton
Copy link
Member

@bors: r-

er actually, could you add a test for this case as well?

@alexcrichton alexcrichton assigned alexcrichton and unassigned brson Jan 22, 2015
@blackbeam
Copy link
Contributor Author

@alexcrichton Not sure that github notifies about added commits. re-r?

@alexcrichton
Copy link
Member

@bors: r+ fd02920 rollup

Thanks!

flaper87 added a commit to flaper87/rust that referenced this pull request Jan 23, 2015
…=alexcrichton

Fix for `error: functions used as tests must have signature fn() -> ()` and `error: functions used as benches must have signature `fn(&mut Bencher) -> ()` in case of explicit return type declaration.
flaper87 added a commit to flaper87/rust that referenced this pull request Jan 24, 2015
…=alexcrichton

Fix for `error: functions used as tests must have signature fn() -> ()` and `error: functions used as benches must have signature `fn(&mut Bencher) -> ()` in case of explicit return type declaration.
@blackbeam
Copy link
Contributor Author

@alexcrichton I have just fixed the test. Another WCPGW problem, sorry..

@alexcrichton
Copy link
Member

@bors: r+ e5b991a

@frewsxcv
Copy link
Member

Needs a rebase

@blackbeam
Copy link
Contributor Author

All except e5b991a (because of 577c464) was merged by #21582.
I think i should close this.

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

Successfully merging this pull request may close these issues.

5 participants