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

libcore: Fix assertion failure in vec::windowe. #5968

Closed
wants to merge 1 commit into from
Closed

libcore: Fix assertion failure in vec::windowe. #5968

wants to merge 1 commit into from

Conversation

gifnksm
Copy link
Contributor

@gifnksm gifnksm commented Apr 20, 2013

vec::windowed fails if given window size is greater than vector length + 1.

for vec::windowed(7, &[1,2,3,4,5,6]) |vs| { fail!(); } // => do nothing
for vec::windowed(8, &[1,2,3,4,5,6]) |vs| { fail!(); } // => assertion failure in vec::slice

vec::windowed fails if given window size is greater than vector length + 1.
@brson
Copy link
Contributor

brson commented Apr 20, 2013

Thanks!

bors added a commit that referenced this pull request Apr 20, 2013
vec::windowed fails if given window size is greater than vector length + 1.

```rust
for vec::windowed(7, &[1,2,3,4,5,6]) |vs| { fail!(); } // => do nothing
for vec::windowed(8, &[1,2,3,4,5,6]) |vs| { fail!(); } // => assertion failure in vec::slice
```
@bors bors closed this Apr 20, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 28, 2020
…bility, r=flip1995

Fix the wrong use of `snippet_with_applicability`

For the context, please see rust-lang/rust-clippy#5822 (comment) and rust-lang/rust-clippy#5822 (comment).

---

changelog: none
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