-
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
Concatenating bytestrings fails; rustc suggests non-existent bconcat!()
#52710
Comments
Heh, this is because the compiler assumes you used a normal string literal like |
Heh indeed. I originally tried
I can't think of a reason why |
I'll take a look and fix the incorrect suggestion. The https://github.com/rust-lang/rust/blob/master/src/libsyntax_ext/concat.rs It seems to me that the only real restriction that it should have is not mixing byte str literals and str literals when concatenating, and even then it should be possible to convert from one to the other. Changing the linked code to keep two accumulators, one for @rust-lang/lang is there any reason to not change |
The diagnostic bug is fixed in nightly by #51978. |
Closing. There's now an RFC for the feature and the bug has been fixed. |
concat!()
doesn't work on bytestrings (why?). When trying it, it fails with:bconcat!()
sounds interesting, but it isn't documented, and the compiler doesn't accept it:I think the real fix here is that
bconcat!()
should exist.The text was updated successfully, but these errors were encountered: