yew/packages/yew-macro/tests/classes_macro/classes-fail.stderr
Cecile Tonglet 772763c2e2
Make Classes cheap to clone (#3021)
* Use AttrValue instead of Cow in Classes

* Wrap indexset into Rc

* Impl ImplicitClone for Classes

* clippy

* Trigger CI

* Update macro stderr

* Copy optimization made for String to AttrValue

* Update macro stderr again
2022-12-10 18:02:36 +05:00

135 lines
5.8 KiB
Plaintext

error: expected `,`
--> tests/classes_macro/classes-fail.rs:7:20
|
7 | classes!("one" "two");
| ^^^^^
error: string literals must not contain more than one class (hint: use `"two", "three"`)
--> tests/classes_macro/classes-fail.rs:18:21
|
18 | classes!("one", "two three", "four");
| ^^^^^^^^^^^
error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:4:14
|
4 | classes!(42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:5:14
|
5 | classes!(42.0);
| ^^^^ the trait `From<{float}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{float}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:9:14
|
9 | classes!(vec![42]);
| ^^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` for `Vec<{integer}>`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:13:14
|
13 | classes!(some);
| ^^^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Option<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` for `Option<{integer}>`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
error[E0277]: the trait bound `Classes: From<u32>` is not satisfied
--> tests/classes_macro/classes-fail.rs:14:14
|
14 | classes!(none);
| ^^^^ the trait `From<u32>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `u32`
= note: required because of the requirements on the impl of `From<Option<u32>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` for `Option<u32>`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:16:21
|
16 | classes!("one", 42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`