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

rustc: test: don't silently ignore bad benches #13000

Closed
wants to merge 1 commit into from
Closed

rustc: test: don't silently ignore bad benches #13000

wants to merge 1 commit into from

Conversation

emberian
Copy link
Member

This is adequate because when a function has a type that isn't caught here,
that is, it has a single argument, but it isn't &mut BenchHarness, it
errors later on with:

 error: mismatched types: expected `fn(&mut test::BenchHarness)` but found
`fn(int)` (expected &-ptr but found int)

which I consider acceptable.

Closes #12997

@alexcrichton
Copy link
Member

This looks good to me, but I don't think it closes #12997 because it still doesn't typecheck the signature. All it's doing is making sure that it's the right number of arguments.

r=me if you change the PR description and commit message to not close the issue

@emberian
Copy link
Member Author

It's already typechecked if the function modified here passes. See the PR
description.

On Tue, Mar 18, 2014 at 11:09 AM, Alex Crichton notifications@github.comwrote:

This looks good to me, but I don't think it closes #12997https://github.com/mozilla/rust/issues/12997because it still doesn't typecheck the signature. All it's doing is making
sure that it's the right number of arguments.

r=me if you change the PR description and commit message to not close the
issue


Reply to this email directly or view it on GitHubhttps://github.com//pull/13000#issuecomment-37943932
.

http://octayn.net/

@alexcrichton
Copy link
Member

Oops, sorry about that! Could you add a test for that as well?

This is adequate because when a function has a type that isn't caught here,
that is, it has a single argument, but it *isn't* `&mut BenchHarness`, it
errors later on with:

     error: mismatched types: expected `fn(&mut test::BenchHarness)` but found
     `fn(int)` (expected &-ptr but found int)

which I consider acceptable.

Closes #12997
@emberian
Copy link
Member Author

@alexcrichton r? added test

@bors bors closed this in 87e72c3 Mar 19, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 16, 2022
Take into account renamed extension id when launching
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.

Functions marked #[bench] are not typechecked
2 participants