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

remove shootout warnings #17936

Merged
merged 1 commit into from
Oct 11, 2014
Merged

Conversation

TeXitoi
Copy link
Contributor

@TeXitoi TeXitoi commented Oct 10, 2014

Only one warning remain, and I can't find a way to remove it without doing more bound checks:

shootout-nbody.rs:105:36: 105:51 warning: use of deprecated item: use iter_mut, #[warn(deprecated)] on by default
shootout-nbody.rs:105             let bi = match b_slice.mut_shift_ref() {

using split_at_mut may be an option, but it will do more bound checking.

If anyone have an idea, I'll update this PR.

@alexcrichton
Copy link
Member

Yeah it looks like the recommended alternative, iter_mut won't quite work here because you'd almost want to clone/reverse a mutable iterator (which isn't quite sound). It's great to get rid of the other warnings, so we may as well land that in the meantime!

If we do end up removing mut_shift_ref, then it may wish to be included locally in the test as a safe function with an unsafe implementation, which is probably just fine as well!

bors added a commit that referenced this pull request Oct 11, 2014
…richton

Only one warning remain, and I can't find a way to remove it without doing more bound checks:

```
shootout-nbody.rs:105:36: 105:51 warning: use of deprecated item: use iter_mut, #[warn(deprecated)] on by default
shootout-nbody.rs:105             let bi = match b_slice.mut_shift_ref() {
```

using `split_at_mut` may be an option, but it will do more bound checking.

If anyone have an idea, I'll update this PR.
@bors bors closed this Oct 11, 2014
@bors bors merged commit 5653b4d into rust-lang:master Oct 11, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 29, 2024
feat: Implement `module_path` macro

Turns out this is a pain to implement because of our hir-def hir-expand split :)
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.

3 participants