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

Add tests for issues with the 'E-needtest' label. #40296

Merged
merged 1 commit into from
Mar 9, 2017

Conversation

topecongiro
Copy link
Contributor

This PR adds tests for the following issues:
#15953, #18446, #22874 and #23311.

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

fn main() {
match "foo".as_bytes() {
b"food" => (),
[b'f', ..] => (), //~ ERROR expected an array or slice, found `&[u8]` [E0529]
Copy link
Contributor

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.

@alexcrichton
Copy link
Member

Thanks @topecongiro! r=me with @petrochenkov's suggestion

@topecongiro
Copy link
Contributor Author

topecongiro commented Mar 7, 2017

@petrochenkov Thank you for your comment!
r=alexcrichton (Is this correct?)

EDIT: I realized that after replacing [b'f', ..] with &[b'f', ..], the test no more fails. So I moved it from compile-fail to run-pass.

@petrochenkov
Copy link
Contributor

@bors r=alexcrichton

@bors
Copy link
Contributor

bors commented Mar 7, 2017

📌 Commit 7dc36e9 has been approved by alexcrichton

arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 8, 2017
…excrichton

Add tests for issues with the 'E-needtest' label.

This PR adds tests for the following issues:
bors added a commit that referenced this pull request Mar 9, 2017
@bors bors merged commit 7dc36e9 into rust-lang:master Mar 9, 2017
@bors
Copy link
Contributor

bors commented Mar 9, 2017

⌛ Testing commit 7dc36e9 with merge 3087a1f...

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.

5 participants