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

extend lifetime on binary_search_by_key of SliceExt trait #34762

Merged
merged 1 commit into from
Aug 9, 2016

Conversation

creativcoder
Copy link
Contributor

Fixes #34683.

@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 @alexcrichton (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. Due to 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 the contribution instructions for more information.

@creativcoder
Copy link
Contributor Author

@alexcrichton I need to add the example test case also. I am not sure about the location of test case to add, Is /test/run-pass/ the right place to add ?

@creativcoder creativcoder force-pushed the slice-ext branch 2 times, most recently from a10b263 to 8a2b740 Compare July 11, 2016 13:24
@alexcrichton
Copy link
Member

Thanks for the PR @creativcoder! And yeah either there or in src/libcoretest should be fine

@alexcrichton alexcrichton added the S-waiting-on-crater Status: Waiting on a crater run to be completed. label Jul 11, 2016
@eefriedman
Copy link
Contributor

It looks like this is missing a fix to the version in libstd?

fn binary_search_by_key<'a, B, F>(&'a self, b: &B, f: F) -> Result<usize, usize>
where F: FnMut(&'a Self::Item) -> B,
B: Ord,
Self::Item: 'a;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the Self::Item: 'a bound actually necessary? It looks redundant.

@alexcrichton
Copy link
Member

Crater reports one regression which looks spurious, so when paired with our confidence that this isn't actually a breaking change, looks like it's good from a stability perspective.

cc @rust-lang/libs

@alexcrichton alexcrichton added relnotes Marks issues that should be documented in the release notes of the next release. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Jul 11, 2016
@alexcrichton
Copy link
Member

@eefriedman to clarify, you mean the signature in libcollections, right?

Probably also means the crater run needs to be redone.

@eefriedman
Copy link
Contributor

Yes, that's what I meant; sorry, I was thinking "outside libcore" without really considering where exactly it is.

@aturon
Copy link
Member

aturon commented Jul 13, 2016

I'm +1 on this change.

@creativcoder
Copy link
Contributor Author

The signature in libcollections has been updated and added the test /src/test/run-pass/slice_binary_search.rs. Let me know if i missed anything here.

@alexcrichton
Copy link
Member

Thanks @creativcoder! Could you also do it for the other binary_search_* functions in libcollections?

@creativcoder
Copy link
Contributor Author

Done

@alexcrichton
Copy link
Member

Crater reports two regressions, both of which are spurious, so...

@bors: r+

@bors
Copy link
Contributor

bors commented Aug 9, 2016

📌 Commit 6fd1752 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Aug 9, 2016

⌛ Testing commit 6fd1752 with merge 58c5716...

bors added a commit that referenced this pull request Aug 9, 2016
extend lifetime on binary_search_by_key of SliceExt trait

Fixes #34683.
@bors bors merged commit 6fd1752 into rust-lang:master Aug 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants