-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
bytes!(..).to_owned() does not work in statement position #8770
Comments
Looks like |
This affects macros as well
|
Looks like a dup of #5941. |
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Jul 18, 2022
…petition, r=Manishearth Maybe trait bound on type repetition *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: fix maybe trait on [`type_repetition_in_bounds`] lint I simplified the two for loops, which did exactly the same. Only downside is, that I need a `copied`, but that's to convert from `&&` to `&`, to that should be a noop? One more thing: I only handle [`TraitBoundModifier::Maybe`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.TraitBoundModifier.html#variant.Maybe). Can anyone give me an example (and testcase) for [`TraitBoundModifier::MaybeConst`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.TraitBoundModifier.html#variant.MaybeConst)? closes rust-lang#8770
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The expression
bytes!("foo").to_owned()
works when placed in an expression position, as inlet x = bytes!("foo").to_owned()
. However, it does not work in a statement position, as in justbytes!("foo").to_owned()
by itself:The text was updated successfully, but these errors were encountered: