You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see this happen: I had expected compilation to succeed
Instead, this happened: Compilation fails with the error message below.
error[E0277]: the trait bound `for<'a> <Utf8 as Type>::Ref<'a>: AsBytes` is not satisfied
--> src\main.rs:41:14
|
41 | let _b = Bytes::<Utf8>::new();
| ^^^^^^^^^^^^^^^^^^ the trait `for<'a> AsBytes` is not implemented for `<Utf8 as Type>::Ref<'a>`
|
note: required by `Bytes::<T>::new`
--> src\main.rs:33:5
|
33 | pub fn new() -> Self {
| ^^^^^^^^^^^^^^^^^^^^
help: consider further restricting the associated type
|
40 | fn main() where for<'a> <Utf8 as Type>::Ref<'a>: AsBytes {
| ++++++++++++++++++++++++++++++++++++++++++++++
I tried this code:
I expected to see this happen: I had expected compilation to succeed
Instead, this happened: Compilation fails with the error message below.
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: