-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add tests for issues with the 'E-needtest' label. #40296
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/test/compile-fail/issue-23311.rs
Outdated
fn main() { | ||
match "foo".as_bytes() { | ||
b"food" => (), | ||
[b'f', ..] => (), //~ ERROR expected an array or slice, found `&[u8]` [E0529] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rules for slice patterns slightly changed since #23311 was filed.
[b'f', ..]
needs to be replaced with &[b'f', ..]
to reproduce the old behavior.
Thanks @topecongiro! r=me with @petrochenkov's suggestion |
6840f3b
to
c1064f6
Compare
@petrochenkov Thank you for your comment! EDIT: I realized that after replacing |
c1064f6
to
7dc36e9
Compare
@bors r=alexcrichton |
📌 Commit 7dc36e9 has been approved by |
…excrichton Add tests for issues with the 'E-needtest' label. This PR adds tests for the following issues:
This PR adds tests for the following issues:
#15953, #18446, #22874 and #23311.