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

Funny help message "help: consider adding a leading b: bstringify!(foo)" #48872

Closed
glandium opened this issue Mar 9, 2018 · 2 comments
Closed

Comments

@glandium
Copy link
Contributor

glandium commented Mar 9, 2018

Reduced testcase:

fn foo() -> bool {
    b"".starts_with(stringify!(foo))
}

Compiler output:

error[E0308]: mismatched types
 --> src/main.rs:2:21
  |
2 |     b"".starts_with(stringify!(foo))
  |                     ^^^^^^^^^^^^^^^
  |                     |
  |                     expected slice, found str
  |                     help: consider adding a leading `b`: `bstringify!(foo)`
  |
  = note: expected type `&[u8]`
             found type `&'static str`
@zackmdavis
Copy link
Member

(duplicate of #48835 and #48364, I think)

@kennytm
Copy link
Member

kennytm commented Mar 9, 2018

Closing as duplicate of #48835. Thanks for the bug report anyway!

@kennytm kennytm closed this as completed Mar 9, 2018
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

No branches or pull requests

3 participants