Bump indexmap from 1.9.3 to 2.0.0 (#3322)

* Bump indexmap from 1.9.3 to 2.0.0

Bumps [indexmap](https://github.com/bluss/indexmap) from 1.9.3 to 2.0.0.
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/1.9.3...2.0.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update dependency minimum version

* clippy

* Bump MSRV to 1.64

* more clippy

* Update action that fails (probably outdated)

* Bump implicit-clone to 0.3.8

* Forgot to bump MSRV in some places

* Forgot to update setup-chromedriver in one place

* Bump implicit-clone to 0.4.0

* Update stderr files

* clippy

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
This commit is contained in:
dependabot[bot] 2023-07-29 22:00:53 +09:00 committed by GitHub
parent b33214efc1
commit 4023c88c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 557 additions and 311 deletions

View File

@ -48,7 +48,7 @@ jobs:
- uses: browser-actions/setup-geckodriver@latest - uses: browser-actions/setup-geckodriver@latest
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- uses: nanasess/setup-chromedriver@v1 - uses: nanasess/setup-chromedriver@v2
- name: Run doctest - name: Run doctest
run: | run: |
@ -67,7 +67,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
toolchain: toolchain:
- 1.60.0 - 1.64.0
- stable - stable
steps: steps:
@ -95,7 +95,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- uses: nanasess/setup-chromedriver@v1 - uses: nanasess/setup-chromedriver@v2
- name: Run tests - yew - name: Run tests - yew
run: | run: |
@ -116,7 +116,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
toolchain: toolchain:
- 1.60.0 - 1.64.0
- stable - stable
- nightly - nightly

View File

@ -44,7 +44,7 @@ jobs:
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
- uses: nanasess/setup-chromedriver@v1 - uses: nanasess/setup-chromedriver@v2
- name: Run website code snippet tests - name: Run website code snippet tests
run: cargo test -p website-test --target wasm32-unknown-unknown run: cargo test -p website-test --target wasm32-unknown-unknown

34
Cargo.lock generated
View File

@ -685,6 +685,12 @@ dependencies = [
"termcolor", "termcolor",
] ]
[[package]]
name = "equivalent"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1"
[[package]] [[package]]
name = "errno" name = "errno"
version = "0.3.1" version = "0.3.1"
@ -1187,7 +1193,7 @@ dependencies = [
"futures-sink", "futures-sink",
"futures-util", "futures-util",
"http", "http",
"indexmap", "indexmap 1.9.3",
"slab", "slab",
"tokio", "tokio",
"tokio-util", "tokio-util",
@ -1200,6 +1206,12 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hashbrown"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
[[package]] [[package]]
name = "headers" name = "headers"
version = "0.3.8" version = "0.3.8"
@ -1389,11 +1401,11 @@ dependencies = [
[[package]] [[package]]
name = "implicit-clone" name = "implicit-clone"
version = "0.3.5" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40fc102e70475c320b185cd18c1e48bba2d7210b63970a4d581ef903e4368ef7" checksum = "73c84c395327945e71c6604eff15061c67849b9081318b4334b719bb2c11415f"
dependencies = [ dependencies = [
"indexmap", "indexmap 2.0.0",
] ]
[[package]] [[package]]
@ -1403,7 +1415,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
dependencies = [ dependencies = [
"autocfg", "autocfg",
"hashbrown", "hashbrown 0.12.3",
]
[[package]]
name = "indexmap"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
dependencies = [
"equivalent",
"hashbrown 0.14.0",
] ]
[[package]] [[package]]
@ -3395,7 +3417,7 @@ dependencies = [
"gloo", "gloo",
"html-escape", "html-escape",
"implicit-clone", "implicit-clone",
"indexmap", "indexmap 2.0.0",
"js-sys", "js-sys",
"prokio", "prokio",
"rustversion", "rustversion",

View File

@ -26,7 +26,7 @@ impl Component for GrandParent {
match msg { match msg {
Msg::ButtonClick(childs_name) => { Msg::ButtonClick(childs_name) => {
// Update the shared state // Update the shared state
let mut shared_state = Rc::make_mut(&mut self.state); let shared_state = Rc::make_mut(&mut self.state);
shared_state.total_clicks += 1; shared_state.total_clicks += 1;
shared_state.last_clicked = Some(childs_name); shared_state.last_clicked = Some(childs_name);
true true

View File

@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
implicit-clone = { version = "0.3", features = ["map"] } implicit-clone = { version = "0.4", features = ["map"] }
wasm-bindgen = "0.2" wasm-bindgen = "0.2"
web-sys = "0.3" web-sys = "0.3"
yew = { path = "../../packages/yew", features = ["csr"] } yew = { path = "../../packages/yew", features = ["csr"] }

View File

@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
keywords = ["web", "wasm", "frontend", "webasm", "webassembly"] keywords = ["web", "wasm", "frontend", "webasm", "webassembly"]
categories = ["gui", "web-programming", "wasm"] categories = ["gui", "web-programming", "wasm"]
description = "A framework for making client-side single-page apps" description = "A framework for making client-side single-page apps"
rust-version = "1.60.0" rust-version = "1.64.0"
[lib] [lib]
proc-macro = true proc-macro = true

View File

@ -1,6 +1,6 @@
[tasks.test] [tasks.test]
clear = true clear = true
toolchain = "1.60.0" toolchain = "1.64.0"
command = "cargo" command = "cargo"
# test target can be optionally specified like `cargo make test html_macro`, # test target can be optionally specified like `cargo make test html_macro`,
args = ["test", "${@}"] args = ["test", "${@}"]

View File

@ -133,8 +133,8 @@ pub fn hook_impl(hook: HookFn) -> syn::Result<TokenStream> {
let inner_type_impl = if hook_sig.needs_boxing { let inner_type_impl = if hook_sig.needs_boxing {
let with_output = !matches!(hook_sig.output_type, Type::ImplTrait(_),); let with_output = !matches!(hook_sig.output_type, Type::ImplTrait(_),);
let inner_fn_rt = with_output.then(|| &inner_fn_rt); let inner_fn_rt = with_output.then_some(&inner_fn_rt);
let output_type = with_output.then(|| &output_type); let output_type = with_output.then_some(&output_type);
let hook_lifetime = &hook_sig.hook_lifetime; let hook_lifetime = &hook_sig.hook_lifetime;
let hook_lifetime_plus = quote! { #hook_lifetime + }; let hook_lifetime_plus = quote! { #hook_lifetime + };

View File

@ -16,12 +16,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
4 | classes!(42); 4 | classes!(42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes` | ^^ the trait `From<{integer}>` is not implemented for `Classes`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>> <Classes as From<&'static str>>
<Classes as From<&Option<T>>> <Classes as From<&Option<T>>>
<Classes as From<&String>> <Classes as From<&String>>
<Classes as From<&[T]>> <Classes as From<&[T]>>
and 6 others <Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N 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 `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push` note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs --> $WORKSPACE/packages/yew/src/html/classes.rs
@ -35,12 +39,16 @@ error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied
5 | classes!(42.0); 5 | classes!(42.0);
| ^^^^ the trait `From<{float}>` is not implemented for `Classes` | ^^^^ the trait `From<{float}>` is not implemented for `Classes`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>> <Classes as From<&'static str>>
<Classes as From<&Option<T>>> <Classes as From<&Option<T>>>
<Classes as From<&String>> <Classes as From<&String>>
<Classes as From<&[T]>> <Classes as From<&[T]>>
and 6 others <Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{float}` = note: required because of the requirements on the impl of `Into<Classes>` for `{float}`
note: required by a bound in `Classes::push` note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs --> $WORKSPACE/packages/yew/src/html/classes.rs
@ -54,12 +62,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
9 | classes!(vec![42]); 9 | classes!(vec![42]);
| ^^^ the trait `From<{integer}>` is not implemented for `Classes` | ^^^ the trait `From<{integer}>` is not implemented for `Classes`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>> <Classes as From<&'static str>>
<Classes as From<&Option<T>>> <Classes as From<&Option<T>>>
<Classes as From<&String>> <Classes as From<&String>>
<Classes as From<&[T]>> <Classes as From<&[T]>>
and 6 others <Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N 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 `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes` = note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden = note: 1 redundant requirement hidden
@ -76,12 +88,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
13 | classes!(some); 13 | classes!(some);
| ^^^^ the trait `From<{integer}>` is not implemented for `Classes` | ^^^^ the trait `From<{integer}>` is not implemented for `Classes`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>> <Classes as From<&'static str>>
<Classes as From<&Option<T>>> <Classes as From<&Option<T>>>
<Classes as From<&String>> <Classes as From<&String>>
<Classes as From<&[T]>> <Classes as From<&[T]>>
and 6 others <Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N 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 `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Option<{integer}>>` for `Classes` = note: required because of the requirements on the impl of `From<Option<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden = note: 1 redundant requirement hidden
@ -98,12 +114,16 @@ error[E0277]: the trait bound `Classes: From<u32>` is not satisfied
14 | classes!(none); 14 | classes!(none);
| ^^^^ the trait `From<u32>` is not implemented for `Classes` | ^^^^ the trait `From<u32>` is not implemented for `Classes`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>> <Classes as From<&'static str>>
<Classes as From<&Option<T>>> <Classes as From<&Option<T>>>
<Classes as From<&String>> <Classes as From<&String>>
<Classes as From<&[T]>> <Classes as From<&[T]>>
and 6 others <Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N 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 `Into<Classes>` for `u32`
= note: required because of the requirements on the impl of `From<Option<u32>>` for `Classes` = note: required because of the requirements on the impl of `From<Option<u32>>` for `Classes`
= note: 1 redundant requirement hidden = note: 1 redundant requirement hidden
@ -120,12 +140,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
16 | classes!("one", 42); 16 | classes!("one", 42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes` | ^^ the trait `From<{integer}>` is not implemented for `Classes`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>> <Classes as From<&'static str>>
<Classes as From<&Option<T>>> <Classes as From<&Option<T>>>
<Classes as From<&String>> <Classes as From<&String>>
<Classes as From<&[T]>> <Classes as From<&[T]>>
and 6 others <Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N 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 `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push` note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs --> $WORKSPACE/packages/yew/src/html/classes.rs

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn classes_macro() { fn classes_macro() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/classes_macro/*-pass.rs"); t.pass("tests/classes_macro/*-pass.rs");

View File

@ -25,25 +25,6 @@ note: these functions exist but are inaccessible
102 | fn foo() -> i32 { 102 | fn foo() -> i32 {
| ^^^^^^^^^^^^^^^ `crate::t10::foo`: not accessible | ^^^^^^^^^^^^^^^ `crate::t10::foo`: not accessible
error[E0277]: the trait bound `AssertAllProps: HasProp<t3::_Props::value, _>` is not satisfied
--> tests/derive_props/fail.rs:35:24
|
35 | ::yew::props!{ Props { } };
| ^^^^^ the trait `HasProp<t3::_Props::value, _>` is not implemented for `AssertAllProps`
|
note: required because of the requirements on the impl of `HasAllProps<t3::Props, (_,)>` for `t3::CheckPropsAll<AssertAllProps>`
--> tests/derive_props/fail.rs:29:21
|
29 | #[derive(Clone, Properties, PartialEq)]
| ^^^^^^^^^^
= note: required because of the requirements on the impl of `AllPropsFor<t3::PropsBuilder, (_,)>` for `AssertAllProps`
note: required by a bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
--> $WORKSPACE/packages/yew/src/html/component/properties.rs
|
| Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Value: Default` is not satisfied error[E0277]: the trait bound `Value: Default` is not satisfied
--> tests/derive_props/fail.rs:9:21 --> tests/derive_props/fail.rs:9:21
| |
@ -52,6 +33,10 @@ error[E0277]: the trait bound `Value: Default` is not satisfied
| |
note: required by a bound in `Option::<T>::unwrap_or_default` note: required by a bound in `Option::<T>::unwrap_or_default`
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Value` with `#[derive(Default)]`
|
8 | #[derive(Default)]
|
error[E0369]: binary operation `==` cannot be applied to type `Value` error[E0369]: binary operation `==` cannot be applied to type `Value`
--> tests/derive_props/fail.rs:13:9 --> tests/derive_props/fail.rs:13:9
@ -66,7 +51,7 @@ note: an implementation of `PartialEq<_>` might be missing for `Value`
--> tests/derive_props/fail.rs:8:5 --> tests/derive_props/fail.rs:8:5
| |
8 | struct Value; 8 | struct Value;
| ^^^^^^^^^^^^^ must implement `PartialEq<_>` | ^^^^^^^^^^^^ must implement `PartialEq<_>`
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Value` with `#[derive(PartialEq)]` help: consider annotating `Value` with `#[derive(PartialEq)]`
| |
@ -86,19 +71,52 @@ note: an implementation of `PartialEq<_>` might be missing for `Value`
--> tests/derive_props/fail.rs:8:5 --> tests/derive_props/fail.rs:8:5
| |
8 | struct Value; 8 | struct Value;
| ^^^^^^^^^^^^^ must implement `PartialEq<_>` | ^^^^^^^^^^^^ must implement `PartialEq<_>`
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Value` with `#[derive(PartialEq)]` help: consider annotating `Value` with `#[derive(PartialEq)]`
| |
8 | #[derive(PartialEq)] 8 | #[derive(PartialEq)]
| |
error[E0277]: the trait bound `AssertAllProps: HasProp<t3::_Props::value, _>` is not satisfied
--> tests/derive_props/fail.rs:35:24
|
35 | ::yew::props!{ Props { } };
| ^^^^^ the trait `HasProp<t3::_Props::value, _>` is not implemented for `AssertAllProps`
|
= help: the following other types implement trait `HasProp<P, How>`:
<CheckChildrenPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckContextProviderPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropschildren<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropschildren<B> as HasProp<children, HasContextProviderPropschildren<B>>>
<HasContextProviderPropscontext<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropscontext<B> as HasProp<yew::context::_ContextProviderProps::context, HasContextProviderPropscontext<B>>>
<suspense::component::CheckSuspensePropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<t10::CheckPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
and $N others
note: required because of the requirements on the impl of `HasAllProps<t3::Props, (_,)>` for `t3::CheckPropsAll<AssertAllProps>`
--> tests/derive_props/fail.rs:29:21
|
29 | #[derive(Clone, Properties, PartialEq)]
| ^^^^^^^^^^
= note: required because of the requirements on the impl of `AllPropsFor<t3::PropsBuilder, (_,)>` for `AssertAllProps`
note: required by a bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
--> $WORKSPACE/packages/yew/src/html/component/properties.rs
|
| Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::<Token, B>::build`
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types error[E0308]: mismatched types
--> tests/derive_props/fail.rs:54:19 --> tests/derive_props/fail.rs:54:19
| |
54 | #[prop_or(123)] 54 | #[prop_or(123)]
| ^^^ expected struct `String`, found integer | ^^^
| |
| expected struct `String`, found integer
| arguments to this function are incorrect
| |
note: associated function defined here
help: try using a conversion method help: try using a conversion method
| |
54 | #[prop_or(123.to_string())] 54 | #[prop_or(123.to_string())]

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn derive_props() { fn derive_props() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/derive_props/pass.rs"); t.pass("tests/derive_props/pass.rs");

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn tests() { fn tests() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/function_component_attr/*-pass.rs"); t.pass("tests/function_component_attr/*-pass.rs");

View File

@ -10,4 +10,7 @@ error[E0277]: the trait bound `u32: IntoHtmlResult` is not satisfied
11 | #[function_component(Comp)] 11 | #[function_component(Comp)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoHtmlResult` is not implemented for `u32` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoHtmlResult` is not implemented for `u32`
| |
= help: the following other types implement trait `IntoHtmlResult`:
Result<VNode, RenderError>
VNode
= note: this error originates in the attribute macro `function_component` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the attribute macro `function_component` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -13,6 +13,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<a, _>` is not satisfied
22 | html! { <Comp<Props> /> }; 22 | html! { <Comp<Props> /> };
| ^^^^ the trait `HasProp<a, _>` is not implemented for `AssertAllProps` | ^^^^ the trait `HasProp<a, _>` is not implemented for `AssertAllProps`
| |
= help: the following other types implement trait `HasProp<P, How>`:
<CheckChildrenPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckContextProviderPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropschildren<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropschildren<B> as HasProp<children, HasContextProviderPropschildren<B>>>
<HasContextProviderPropscontext<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasContextProviderPropscontext<B> as HasProp<yew::context::_ContextProviderProps::context, HasContextProviderPropscontext<B>>>
<HasPropsa<B> as HasProp<P, &dyn HasProp<P, How>>>
and $N others
note: required because of the requirements on the impl of `HasAllProps<Props, (_,)>` for `CheckPropsAll<AssertAllProps>` note: required because of the requirements on the impl of `HasAllProps<Props, (_,)>` for `CheckPropsAll<AssertAllProps>`
--> tests/function_component_attr/generic-props-fail.rs:3:17 --> tests/function_component_attr/generic-props-fail.rs:3:17
| |
@ -24,7 +34,7 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil
| |
| Token: AllPropsFor<B, How>, | Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build` | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Comp<MissingTypeBounds>: yew::BaseComponent` is not satisfied error[E0277]: the trait bound `Comp<MissingTypeBounds>: yew::BaseComponent` is not satisfied
--> tests/function_component_attr/generic-props-fail.rs:27:14 --> tests/function_component_attr/generic-props-fail.rs:27:14
@ -32,15 +42,14 @@ error[E0277]: the trait bound `Comp<MissingTypeBounds>: yew::BaseComponent` is n
27 | html! { <Comp<MissingTypeBounds> /> }; 27 | html! { <Comp<MissingTypeBounds> /> };
| ^^^^ the trait `yew::BaseComponent` is not implemented for `Comp<MissingTypeBounds>` | ^^^^ the trait `yew::BaseComponent` is not implemented for `Comp<MissingTypeBounds>`
| |
= help: the following implementations were found: = help: the trait `yew::BaseComponent` is implemented for `Comp<P>`
<Comp<P> as yew::BaseComponent>
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0599]: the function or associated item `new` exists for struct `VChild<Comp<MissingTypeBounds>>`, but its trait bounds were not satisfied error[E0599]: the function or associated item `new` exists for struct `VChild<Comp<MissingTypeBounds>>`, but its trait bounds were not satisfied
--> tests/function_component_attr/generic-props-fail.rs:27:14 --> tests/function_component_attr/generic-props-fail.rs:27:14
| |
8 | #[function_component(Comp)] 8 | #[function_component(Comp)]
| --------------------------- doesn't satisfy `Comp<MissingTypeBounds>: yew::BaseComponent` | ------------------------- doesn't satisfy `Comp<MissingTypeBounds>: yew::BaseComponent`
... ...
27 | html! { <Comp<MissingTypeBounds> /> }; 27 | html! { <Comp<MissingTypeBounds> /> };
| ^^^^ function or associated item cannot be called on `VChild<Comp<MissingTypeBounds>>` due to unsatisfied trait bounds | ^^^^ function or associated item cannot be called on `VChild<Comp<MissingTypeBounds>>` due to unsatisfied trait bounds
@ -50,14 +59,8 @@ error[E0599]: the function or associated item `new` exists for struct `VChild<Co
note: the following trait must be implemented note: the following trait must be implemented
--> $WORKSPACE/packages/yew/src/html/component/mod.rs --> $WORKSPACE/packages/yew/src/html/component/mod.rs
| |
| / pub trait BaseComponent: Sized + 'static { | pub trait BaseComponent: Sized + 'static {
| | /// The Component's Message. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | type Message: 'static;
| |
... |
| | fn prepare_state(&self) -> Option<String>;
| | }
| |_^
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisfied error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisfied
@ -66,6 +69,12 @@ error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisf
27 | html! { <Comp<MissingTypeBounds> /> }; 27 | html! { <Comp<MissingTypeBounds> /> };
| ^^^^ the trait `yew::Properties` is not implemented for `MissingTypeBounds` | ^^^^ the trait `yew::Properties` is not implemented for `MissingTypeBounds`
| |
= help: the following other types implement trait `yew::Properties`:
()
ChildrenProps
ContextProviderProps<T>
Props
SuspenseProps
note: required by a bound in `Comp` note: required by a bound in `Comp`
--> tests/function_component_attr/generic-props-fail.rs:11:8 --> tests/function_component_attr/generic-props-fail.rs:11:8
| |

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn tests() { fn tests() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/hook_attr/*-pass.rs"); t.pass("tests/hook_attr/*-pass.rs");

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn tests() { fn tests() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/hook_macro/*-pass.rs"); t.pass("tests/hook_macro/*-pass.rs");

View File

@ -433,7 +433,7 @@ error[E0599]: no method named `r#type` found for struct `ChildPropertiesBuilder`
--> tests/html_macro/component-fail.rs:85:20 --> tests/html_macro/component-fail.rs:85:20
| |
4 | #[derive(Clone, Properties, PartialEq)] 4 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `r#type` not found for this | ---------- method `r#type` not found for this struct
... ...
85 | html! { <Child type=0 /> }; 85 | html! { <Child type=0 /> };
| ^^^^ method not found in `ChildPropertiesBuilder` | ^^^^ method not found in `ChildPropertiesBuilder`
@ -450,7 +450,7 @@ error[E0599]: no method named `unknown` found for struct `ChildPropertiesBuilder
--> tests/html_macro/component-fail.rs:88:20 --> tests/html_macro/component-fail.rs:88:20
| |
4 | #[derive(Clone, Properties, PartialEq)] 4 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `unknown` not found for this | ---------- method `unknown` not found for this struct
... ...
88 | html! { <Child unknown="unknown" /> }; 88 | html! { <Child unknown="unknown" /> };
| ^^^^^^^ method not found in `ChildPropertiesBuilder` | ^^^^^^^ method not found in `ChildPropertiesBuilder`
@ -463,6 +463,16 @@ error[E0277]: the trait bound `(): IntoPropValue<String>` is not satisfied
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the following other types implement trait `IntoPropValue<T>`:
<&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
note: required by a bound in `ChildPropertiesBuilder::string` note: required by a bound in `ChildPropertiesBuilder::string`
--> tests/html_macro/component-fail.rs:4:17 --> tests/html_macro/component-fail.rs:4:17
| |
@ -481,11 +491,15 @@ error[E0277]: the trait bound `{integer}: IntoPropValue<String>` is not satisfie
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoPropValue<T>`:
<f32 as IntoPropValue<ChildrenRenderer<VNode>>> f32
<f64 as IntoPropValue<ChildrenRenderer<VNode>>> f64
<i128 as IntoPropValue<ChildrenRenderer<VNode>>> i128
<i16 as IntoPropValue<ChildrenRenderer<VNode>>> i16
i32
i64
i8
isize
and $N others and $N others
note: required by a bound in `ChildPropertiesBuilder::string` note: required by a bound in `ChildPropertiesBuilder::string`
--> tests/html_macro/component-fail.rs:4:17 --> tests/html_macro/component-fail.rs:4:17
@ -505,11 +519,15 @@ error[E0277]: the trait bound `{integer}: IntoPropValue<String>` is not satisfie
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoPropValue<T>`:
<f32 as IntoPropValue<ChildrenRenderer<VNode>>> f32
<f64 as IntoPropValue<ChildrenRenderer<VNode>>> f64
<i128 as IntoPropValue<ChildrenRenderer<VNode>>> i128
<i16 as IntoPropValue<ChildrenRenderer<VNode>>> i16
i32
i64
i8
isize
and $N others and $N others
note: required by a bound in `ChildPropertiesBuilder::string` note: required by a bound in `ChildPropertiesBuilder::string`
--> tests/html_macro/component-fail.rs:4:17 --> tests/html_macro/component-fail.rs:4:17
@ -533,7 +551,7 @@ error[E0599]: no method named `r#ref` found for struct `ChildPropertiesBuilder`
--> tests/html_macro/component-fail.rs:96:26 --> tests/html_macro/component-fail.rs:96:26
| |
4 | #[derive(Clone, Properties, PartialEq)] 4 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `r#ref` not found for this | ---------- method `r#ref` not found for this struct
... ...
96 | html! { <Child int=1 r#ref={()} /> }; 96 | html! { <Child int=1 r#ref={()} /> };
| ^^^^^ method not found in `ChildPropertiesBuilder` | ^^^^^ method not found in `ChildPropertiesBuilder`
@ -546,11 +564,15 @@ error[E0277]: the trait bound `u32: IntoPropValue<i32>` is not satisfied
| | | |
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoPropValue<T>`:
<u32 as IntoPropValue<ChildrenRenderer<VNode>>> f32
<f32 as IntoPropValue<ChildrenRenderer<VNode>>> f64
<f64 as IntoPropValue<ChildrenRenderer<VNode>>> i128
<i128 as IntoPropValue<ChildrenRenderer<VNode>>> i16
i32
i64
i8
isize
and $N others and $N others
note: required by a bound in `ChildPropertiesBuilder::int` note: required by a bound in `ChildPropertiesBuilder::int`
--> tests/html_macro/component-fail.rs:4:17 --> tests/html_macro/component-fail.rs:4:17
@ -568,6 +590,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<int, _>` is not satisfied
99 | html! { <Child string="abc" /> }; 99 | html! { <Child string="abc" /> };
| ^^^^^ the trait `HasProp<int, _>` is not implemented for `AssertAllProps` | ^^^^^ the trait `HasProp<int, _>` is not implemented for `AssertAllProps`
| |
= help: the following other types implement trait `HasProp<P, How>`:
<CheckChildContainerPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckChildPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckChildrenPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckContextProviderPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckHtmlInPropsPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasChildContainerPropertieschildren<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasChildContainerPropertieschildren<B> as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren<B>>>
<HasChildPropertiesint<B> as HasProp<P, &dyn HasProp<P, How>>>
and $N others
note: required because of the requirements on the impl of `HasAllProps<ChildProperties, (_,)>` for `CheckChildPropertiesAll<AssertAllProps>` note: required because of the requirements on the impl of `HasAllProps<ChildProperties, (_,)>` for `CheckChildPropertiesAll<AssertAllProps>`
--> tests/html_macro/component-fail.rs:4:17 --> tests/html_macro/component-fail.rs:4:17
| |
@ -579,7 +611,7 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil
| |
| Token: AllPropsFor<B, How>, | Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build` | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0609]: no field `children` on type `ChildProperties` error[E0609]: no field `children` on type `ChildProperties`
--> tests/html_macro/component-fail.rs:103:14 --> tests/html_macro/component-fail.rs:103:14
@ -594,7 +626,7 @@ error[E0599]: no method named `children` found for struct `ChildPropertiesBuilde
--> tests/html_macro/component-fail.rs:103:14 --> tests/html_macro/component-fail.rs:103:14
| |
4 | #[derive(Clone, Properties, PartialEq)] 4 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `children` not found for this | ---------- method `children` not found for this struct
... ...
103 | html! { <Child>{ "Not allowed" }</Child> }; 103 | html! { <Child>{ "Not allowed" }</Child> };
| ^^^^^ method not found in `ChildPropertiesBuilder` | ^^^^^ method not found in `ChildPropertiesBuilder`
@ -616,6 +648,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties
115 | html! { <ChildContainer /> }; 115 | html! { <ChildContainer /> };
| ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps` | ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps`
| |
= help: the following other types implement trait `HasProp<P, How>`:
<CheckChildContainerPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckChildPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckChildrenPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckContextProviderPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckHtmlInPropsPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasChildContainerPropertieschildren<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasChildContainerPropertieschildren<B> as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren<B>>>
<HasChildPropertiesint<B> as HasProp<P, &dyn HasProp<P, How>>>
and $N others
note: required because of the requirements on the impl of `HasAllProps<ChildContainerProperties, (_,)>` for `CheckChildContainerPropertiesAll<AssertAllProps>` note: required because of the requirements on the impl of `HasAllProps<ChildContainerProperties, (_,)>` for `CheckChildContainerPropertiesAll<AssertAllProps>`
--> tests/html_macro/component-fail.rs:24:17 --> tests/html_macro/component-fail.rs:24:17
| |
@ -627,7 +669,7 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil
| |
| Token: AllPropsFor<B, How>, | Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build` | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties::children, _>` is not satisfied error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties::children, _>` is not satisfied
--> tests/html_macro/component-fail.rs:116:14 --> tests/html_macro/component-fail.rs:116:14
@ -635,6 +677,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties
116 | html! { <ChildContainer></ChildContainer> }; 116 | html! { <ChildContainer></ChildContainer> };
| ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps` | ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps`
| |
= help: the following other types implement trait `HasProp<P, How>`:
<CheckChildContainerPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckChildPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckChildrenPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckContextProviderPropsAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<CheckHtmlInPropsPropertiesAll<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasChildContainerPropertieschildren<B> as HasProp<P, &dyn HasProp<P, How>>>
<HasChildContainerPropertieschildren<B> as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren<B>>>
<HasChildPropertiesint<B> as HasProp<P, &dyn HasProp<P, How>>>
and $N others
note: required because of the requirements on the impl of `HasAllProps<ChildContainerProperties, (_,)>` for `CheckChildContainerPropertiesAll<AssertAllProps>` note: required because of the requirements on the impl of `HasAllProps<ChildContainerProperties, (_,)>` for `CheckChildContainerPropertiesAll<AssertAllProps>`
--> tests/html_macro/component-fail.rs:24:17 --> tests/html_macro/component-fail.rs:24:17
| |
@ -646,18 +698,15 @@ note: required by a bound in `yew::html::component::properties::__macro::PreBuil
| |
| Token: AllPropsFor<B, How>, | Token: AllPropsFor<B, How>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build` | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::<Token, B>::build`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `yew::virtual_dom::VText: IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not satisfied error[E0277]: the trait bound `yew::virtual_dom::VText: IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not satisfied
--> tests/html_macro/component-fail.rs:117:31 --> tests/html_macro/component-fail.rs:117:14
| |
117 | html! { <ChildContainer>{ "Not allowed" }</ChildContainer> }; 117 | html! { <ChildContainer>{ "Not allowed" }</ChildContainer> };
| -------------- ^^^^^^^^^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `yew::virtual_dom::VText` | ^^^^^^^^^^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `yew::virtual_dom::VText`
| |
| required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the trait `IntoPropValue<ChildrenRenderer<VNode>>` is implemented for `yew::virtual_dom::VText`
<yew::virtual_dom::VText as IntoPropValue<ChildrenRenderer<VNode>>>
note: required by a bound in `ChildContainerPropertiesBuilder::children` note: required by a bound in `ChildContainerPropertiesBuilder::children`
--> tests/html_macro/component-fail.rs:24:17 --> tests/html_macro/component-fail.rs:24:17
| |
@ -666,7 +715,7 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children`
25 | pub struct ChildContainerProperties { 25 | pub struct ChildContainerProperties {
26 | pub children: ChildrenWithProps<Child>, 26 | pub children: ChildrenWithProps<Child>,
| -------- required by a bound in this | -------- required by a bound in this
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `VChild<Child>: From<VNode>` is not satisfied error[E0277]: the trait bound `VChild<Child>: From<VNode>` is not satisfied
--> tests/html_macro/component-fail.rs:118:29 --> tests/html_macro/component-fail.rs:118:29
@ -677,15 +726,12 @@ error[E0277]: the trait bound `VChild<Child>: From<VNode>` is not satisfied
= note: required because of the requirements on the impl of `Into<VChild<Child>>` for `VNode` = note: required because of the requirements on the impl of `Into<VChild<Child>>` for `VNode`
error[E0277]: the trait bound `VNode: IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not satisfied error[E0277]: the trait bound `VNode: IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not satisfied
--> tests/html_macro/component-fail.rs:119:30 --> tests/html_macro/component-fail.rs:119:14
| |
119 | html! { <ChildContainer><other /></ChildContainer> }; 119 | html! { <ChildContainer><other /></ChildContainer> };
| -------------- ^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `VNode` | ^^^^^^^^^^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `VNode`
| |
| required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the trait `IntoPropValue<ChildrenRenderer<VNode>>` is implemented for `VNode`
<VNode as IntoPropValue<ChildrenRenderer<VNode>>>
note: required by a bound in `ChildContainerPropertiesBuilder::children` note: required by a bound in `ChildContainerPropertiesBuilder::children`
--> tests/html_macro/component-fail.rs:24:17 --> tests/html_macro/component-fail.rs:24:17
| |
@ -694,4 +740,4 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children`
25 | pub struct ChildContainerProperties { 25 | pub struct ChildContainerProperties {
26 | pub children: ChildrenWithProps<Child>, 26 | pub children: ChildrenWithProps<Child>,
| -------- required by a bound in this | -------- required by a bound in this
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -4,6 +4,7 @@ error[E0277]: the trait bound `Unimplemented: yew::Component` is not satisfied
6 | html! { <Unimplemented /> }; 6 | html! { <Unimplemented /> };
| ^^^^^^^^^^^^^ the trait `yew::Component` is not implemented for `Unimplemented` | ^^^^^^^^^^^^^ the trait `yew::Component` is not implemented for `Unimplemented`
| |
= help: the trait `yew::Component` is implemented for `ContextProvider<T>`
= note: required because of the requirements on the impl of `BaseComponent` for `Unimplemented` = note: required because of the requirements on the impl of `BaseComponent` for `Unimplemented`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
@ -11,7 +12,7 @@ error[E0599]: the function or associated item `new` exists for struct `VChild<Un
--> tests/html_macro/component-unimplemented-fail.rs:6:14 --> tests/html_macro/component-unimplemented-fail.rs:6:14
| |
3 | struct Unimplemented; 3 | struct Unimplemented;
| --------------------- doesn't satisfy `Unimplemented: BaseComponent` | -------------------- doesn't satisfy `Unimplemented: BaseComponent`
... ...
6 | html! { <Unimplemented /> }; 6 | html! { <Unimplemented /> };
| ^^^^^^^^^^^^^ function or associated item cannot be called on `VChild<Unimplemented>` due to unsatisfied trait bounds | ^^^^^^^^^^^^^ function or associated item cannot be called on `VChild<Unimplemented>` due to unsatisfied trait bounds
@ -21,12 +22,6 @@ error[E0599]: the function or associated item `new` exists for struct `VChild<Un
note: the following trait must be implemented note: the following trait must be implemented
--> $WORKSPACE/packages/yew/src/html/component/mod.rs --> $WORKSPACE/packages/yew/src/html/component/mod.rs
| |
| / pub trait BaseComponent: Sized + 'static { | pub trait BaseComponent: Sized + 'static {
| | /// The Component's Message. | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| | type Message: 'static;
| |
... |
| | fn prepare_state(&self) -> Option<String>;
| | }
| |_^
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -369,22 +369,40 @@ error[E0308]: mismatched types
--> tests/html_macro/element-fail.rs:36:28 --> tests/html_macro/element-fail.rs:36:28
| |
36 | html! { <input checked=1 /> }; 36 | html! { <input checked=1 /> };
| ^ expected `bool`, found integer | -----------------------^-----
| | |
| | expected `bool`, found integer
| arguments to this enum variant are incorrect
|
note: tuple variant defined here
error[E0308]: mismatched types error[E0308]: mismatched types
--> tests/html_macro/element-fail.rs:37:29 --> tests/html_macro/element-fail.rs:37:29
| |
37 | html! { <input checked={Some(false)} /> }; 37 | html! { <input checked={Some(false)} /> };
| ^^^^^^^^^^^ expected `bool`, found enum `Option` | ------------------------^^^^^^^^^^^------
| | |
| | expected `bool`, found enum `Option`
| arguments to this enum variant are incorrect
| |
= note: expected type `bool` = note: expected type `bool`
found enum `Option<bool>` found enum `Option<bool>`
note: tuple variant defined here
error[E0308]: mismatched types error[E0308]: mismatched types
--> tests/html_macro/element-fail.rs:38:29 --> tests/html_macro/element-fail.rs:38:29
| |
38 | html! { <input disabled=1 /> }; 38 | html! { <input disabled=1 /> };
| ^ expected `bool`, found integer | ^
| |
| expected `bool`, found integer
| arguments to this function are incorrect
|
note: function defined here
--> $WORKSPACE/packages/yew/src/utils/mod.rs
|
| pub fn __ensure_type<T>(_: T) {}
| ^^^^^^^^^^^^^
error[E0308]: mismatched types error[E0308]: mismatched types
--> tests/html_macro/element-fail.rs:39:30 --> tests/html_macro/element-fail.rs:39:30
@ -399,63 +417,112 @@ error[E0308]: mismatched types
--> tests/html_macro/element-fail.rs:40:30 --> tests/html_macro/element-fail.rs:40:30
| |
40 | html! { <option selected=1 /> }; 40 | html! { <option selected=1 /> };
| ^ expected `bool`, found integer | ^
| |
| expected `bool`, found integer
| arguments to this function are incorrect
|
note: function defined here
--> $WORKSPACE/packages/yew/src/utils/mod.rs
|
| pub fn __ensure_type<T>(_: T) {}
| ^^^^^^^^^^^^^
error[E0277]: the trait bound `(): IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `(): IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:43:26 --> tests/html_macro/element-fail.rs:43:26
| |
43 | html! { <input type={()} /> }; 43 | html! { <input type={()} /> };
| ^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `()` | ^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `()`
|
= help: the following other types implement trait `IntoPropValue<T>`:
<&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
error[E0277]: the trait bound `(): IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `(): IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:44:27 --> tests/html_macro/element-fail.rs:44:27
| |
44 | html! { <input value={()} /> }; 44 | html! { <input value={()} /> };
| ^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `()` | ^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `()`
|
= help: the following other types implement trait `IntoPropValue<T>`:
<&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
error[E0277]: the trait bound `(): IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `(): IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:45:22 --> tests/html_macro/element-fail.rs:45:22
| |
45 | html! { <a href={()} /> }; 45 | html! { <a href={()} /> };
| ^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `()` | ^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `()`
|
= help: the following other types implement trait `IntoPropValue<T>`:
<&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
error[E0277]: the trait bound `NotToString: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `NotToString: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:46:28 --> tests/html_macro/element-fail.rs:46:28
| |
46 | html! { <input string={NotToString} /> }; 46 | html! { <input string={NotToString} /> };
| ^^^^^^^^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `NotToString` | ^^^^^^^^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `NotToString`
|
= help: the following other types implement trait `IntoPropValue<T>`:
<&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
error[E0277]: the trait bound `Option<NotToString>: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `Option<NotToString>: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:47:23 --> tests/html_macro/element-fail.rs:47:23
| |
47 | html! { <a media={Some(NotToString)} /> }; 47 | html! { <a media={Some(NotToString)} /> };
| ----^^^^^^^^^^^^^ | ^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<NotToString>`
| |
| the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<NotToString>`
| required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoPropValue<T>`:
<Option<&'static str> as IntoPropValue<Option<String>>> <Option<&'static str> as IntoPropValue<Option<String>>>
<Option<&'static str> as IntoPropValue<Option<implicit_clone::unsync::IString>>> <Option<&'static str> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>> <Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>>
<Option<Rc<str>> as IntoPropValue<Option<implicit_clone::unsync::IString>>> <Option<Rc<str>> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
and $N others <Option<String> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<Option<VChild<T>> as IntoPropValue<Option<ChildrenRenderer<C>>>>
error[E0277]: the trait bound `Option<{integer}>: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `Option<{integer}>: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:48:22 --> tests/html_macro/element-fail.rs:48:22
| |
48 | html! { <a href={Some(5)} /> }; 48 | html! { <a href={Some(5)} /> };
| ----^^^ | ^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<{integer}>`
| |
| the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<{integer}>`
| required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoPropValue<T>`:
<Option<&'static str> as IntoPropValue<Option<String>>> <Option<&'static str> as IntoPropValue<Option<String>>>
<Option<&'static str> as IntoPropValue<Option<implicit_clone::unsync::IString>>> <Option<&'static str> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>> <Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>>
<Option<Rc<str>> as IntoPropValue<Option<implicit_clone::unsync::IString>>> <Option<Rc<str>> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
and $N others <Option<String> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<Option<VChild<T>> as IntoPropValue<Option<ChildrenRenderer<C>>>>
error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `{integer}` error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `{integer}`
--> tests/html_macro/element-fail.rs:51:28 --> tests/html_macro/element-fail.rs:51:28
@ -467,6 +534,11 @@ error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `{integer}`
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Fn<(MouseEvent,)>` is not implemented for `{integer}` = help: the trait `Fn<(MouseEvent,)>` is not implemented for `{integer}`
= help: the following other types implement trait `IntoEventCallback<EVENT>`:
&yew::Callback<EVENT>
Option<T>
Option<yew::Callback<EVENT>>
yew::Callback<EVENT>
= note: required because of the requirements on the impl of `IntoEventCallback<MouseEvent>` for `{integer}` = note: required because of the requirements on the impl of `IntoEventCallback<MouseEvent>` for `{integer}`
note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` note: required by a bound in `yew::html::onclick::Wrapper::__macro_new`
--> $WORKSPACE/packages/yew/src/html/listener/events.rs --> $WORKSPACE/packages/yew/src/html/listener/events.rs
@ -479,7 +551,7 @@ note: required by a bound in `yew::html::onclick::Wrapper::__macro_new`
| | ontransitionstart(TransitionEvent) | | ontransitionstart(TransitionEvent)
| | } | | }
| |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new` | |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new`
= note: this error originates in the macro `impl_action` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback<String>` error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback<String>`
--> tests/html_macro/element-fail.rs:52:29 --> tests/html_macro/element-fail.rs:52:29
@ -491,6 +563,9 @@ error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback<Strin
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Fn<(MouseEvent,)>` is not implemented for `yew::Callback<String>` = help: the trait `Fn<(MouseEvent,)>` is not implemented for `yew::Callback<String>`
= help: the following other types implement trait `IntoEventCallback<EVENT>`:
&yew::Callback<EVENT>
yew::Callback<EVENT>
= note: required because of the requirements on the impl of `IntoEventCallback<MouseEvent>` for `yew::Callback<String>` = note: required because of the requirements on the impl of `IntoEventCallback<MouseEvent>` for `yew::Callback<String>`
note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` note: required by a bound in `yew::html::onclick::Wrapper::__macro_new`
--> $WORKSPACE/packages/yew/src/html/listener/events.rs --> $WORKSPACE/packages/yew/src/html/listener/events.rs
@ -503,7 +578,7 @@ note: required by a bound in `yew::html::onclick::Wrapper::__macro_new`
| | ontransitionstart(TransitionEvent) | | ontransitionstart(TransitionEvent)
| | } | | }
| |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new` | |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new`
= note: this error originates in the macro `impl_action` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Option<{integer}>: IntoEventCallback<FocusEvent>` is not satisfied error[E0277]: the trait bound `Option<{integer}>: IntoEventCallback<FocusEvent>` is not satisfied
--> tests/html_macro/element-fail.rs:53:29 --> tests/html_macro/element-fail.rs:53:29
@ -514,9 +589,9 @@ error[E0277]: the trait bound `Option<{integer}>: IntoEventCallback<FocusEvent>`
| | the trait `IntoEventCallback<FocusEvent>` is not implemented for `Option<{integer}>` | | the trait `IntoEventCallback<FocusEvent>` is not implemented for `Option<{integer}>`
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoEventCallback<EVENT>`:
<Option<T> as IntoEventCallback<EVENT>> Option<T>
<Option<yew::Callback<EVENT>> as IntoEventCallback<EVENT>> Option<yew::Callback<EVENT>>
note: required by a bound in `yew::html::onfocus::Wrapper::__macro_new` note: required by a bound in `yew::html::onfocus::Wrapper::__macro_new`
--> $WORKSPACE/packages/yew/src/html/listener/events.rs --> $WORKSPACE/packages/yew/src/html/listener/events.rs
| |
@ -528,32 +603,40 @@ note: required by a bound in `yew::html::onfocus::Wrapper::__macro_new`
| | ontransitionstart(TransitionEvent) | | ontransitionstart(TransitionEvent)
| | } | | }
| |_^ required by this bound in `yew::html::onfocus::Wrapper::__macro_new` | |_^ required by this bound in `yew::html::onfocus::Wrapper::__macro_new`
= note: this error originates in the macro `impl_action` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `(): IntoPropValue<yew::NodeRef>` is not satisfied error[E0277]: the trait bound `(): IntoPropValue<yew::NodeRef>` is not satisfied
--> tests/html_macro/element-fail.rs:56:25 --> tests/html_macro/element-fail.rs:56:25
| |
56 | html! { <input ref={()} /> }; 56 | html! { <input ref={()} /> };
| ^^ | ^^ the trait `IntoPropValue<yew::NodeRef>` is not implemented for `()`
| | |
| the trait `IntoPropValue<yew::NodeRef>` is not implemented for `()` = help: the following other types implement trait `IntoPropValue<T>`:
| required by a bound introduced by this call <&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Option<yew::NodeRef>: IntoPropValue<yew::NodeRef>` is not satisfied error[E0277]: the trait bound `Option<yew::NodeRef>: IntoPropValue<yew::NodeRef>` is not satisfied
--> tests/html_macro/element-fail.rs:57:25 --> tests/html_macro/element-fail.rs:57:25
| |
57 | html! { <input ref={Some(NodeRef::default())} /> }; 57 | html! { <input ref={Some(NodeRef::default())} /> };
| ----^^^^^^^^^^^^^^^^^^^^ | ^^^^ the trait `IntoPropValue<yew::NodeRef>` is not implemented for `Option<yew::NodeRef>`
| |
| the trait `IntoPropValue<yew::NodeRef>` is not implemented for `Option<yew::NodeRef>`
| required by a bound introduced by this call
| |
= help: the following implementations were found: = help: the following other types implement trait `IntoPropValue<T>`:
<Option<&'static str> as IntoPropValue<Option<String>>> <Option<&'static str> as IntoPropValue<Option<String>>>
<Option<&'static str> as IntoPropValue<Option<implicit_clone::unsync::IString>>> <Option<&'static str> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>> <Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>>
<Option<Rc<str>> as IntoPropValue<Option<implicit_clone::unsync::IString>>> <Option<Rc<str>> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
and $N others <Option<String> as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<Option<VChild<T>> as IntoPropValue<Option<ChildrenRenderer<C>>>>
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback<String>` error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback<String>`
--> tests/html_macro/element-fail.rs:58:29 --> tests/html_macro/element-fail.rs:58:29
@ -565,6 +648,9 @@ error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback<Strin
| required by a bound introduced by this call | required by a bound introduced by this call
| |
= help: the trait `Fn<(MouseEvent,)>` is not implemented for `yew::Callback<String>` = help: the trait `Fn<(MouseEvent,)>` is not implemented for `yew::Callback<String>`
= help: the following other types implement trait `IntoEventCallback<EVENT>`:
&yew::Callback<EVENT>
yew::Callback<EVENT>
= note: required because of the requirements on the impl of `IntoEventCallback<MouseEvent>` for `yew::Callback<String>` = note: required because of the requirements on the impl of `IntoEventCallback<MouseEvent>` for `yew::Callback<String>`
note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` note: required by a bound in `yew::html::onclick::Wrapper::__macro_new`
--> $WORKSPACE/packages/yew/src/html/listener/events.rs --> $WORKSPACE/packages/yew/src/html/listener/events.rs
@ -577,36 +663,57 @@ note: required by a bound in `yew::html::onclick::Wrapper::__macro_new`
| | ontransitionstart(TransitionEvent) | | ontransitionstart(TransitionEvent)
| | } | | }
| |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new` | |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new`
= note: this error originates in the macro `impl_action` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `NotToString: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied error[E0277]: the trait bound `NotToString: IntoPropValue<Option<implicit_clone::unsync::IString>>` is not satisfied
--> tests/html_macro/element-fail.rs:60:28 --> tests/html_macro/element-fail.rs:60:28
| |
60 | html! { <input string={NotToString} /> }; 60 | html! { <input string={NotToString} /> };
| ^^^^^^^^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `NotToString` | ^^^^^^^^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `NotToString`
|
= help: the following other types implement trait `IntoPropValue<T>`:
<&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
error[E0277]: the trait bound `(): IntoPropValue<yew::NodeRef>` is not satisfied error[E0277]: the trait bound `(): IntoPropValue<yew::NodeRef>` is not satisfied
--> tests/html_macro/element-fail.rs:62:25 --> tests/html_macro/element-fail.rs:62:25
| |
62 | html! { <input ref={()} /> }; 62 | html! { <input ref={()} /> };
| ^^ | ^^ the trait `IntoPropValue<yew::NodeRef>` is not implemented for `()`
| | |
| the trait `IntoPropValue<yew::NodeRef>` is not implemented for `()` = help: the following other types implement trait `IntoPropValue<T>`:
| required by a bound introduced by this call <&'static [(K, V)] as IntoPropValue<implicit_clone::unsync::IMap<K, V>>>
<&'static [T] as IntoPropValue<implicit_clone::unsync::IArray<T>>>
<&'static str as IntoPropValue<Classes>>
<&'static str as IntoPropValue<Option<String>>>
<&'static str as IntoPropValue<Option<implicit_clone::unsync::IString>>>
<&'static str as IntoPropValue<String>>
<&'static str as IntoPropValue<implicit_clone::unsync::IString>>
<&T as IntoPropValue<Option<T>>>
and $N others
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Cow<'static, str>: From<{integer}>` is not satisfied error[E0277]: the trait bound `Cow<'static, str>: From<{integer}>` is not satisfied
--> tests/html_macro/element-fail.rs:77:15 --> tests/html_macro/element-fail.rs:77:15
| |
77 | html! { <@{55}></@> }; 77 | html! { <@{55}></@> };
| ^--^ | ^^^^ the trait `From<{integer}>` is not implemented for `Cow<'static, str>`
| ||
| |this tail expression is of type `_`
| the trait `From<{integer}>` is not implemented for `Cow<'static, str>`
| |
= help: the following implementations were found: = help: the following other types implement trait `From<T>`:
<Cow<'a, CStr> as From<&'a CStr>> <Cow<'a, CStr> as From<&'a CStr>>
<Cow<'a, CStr> as From<&'a CString>> <Cow<'a, CStr> as From<&'a CString>>
<Cow<'a, CStr> as From<CString>> <Cow<'a, CStr> as From<CString>>
<Cow<'a, OsStr> as From<&'a OsStr>> <Cow<'a, OsStr> as From<&'a OsStr>>
<Cow<'a, OsStr> as From<&'a OsString>>
<Cow<'a, OsStr> as From<OsString>>
<Cow<'a, Path> as From<&'a Path>>
<Cow<'a, Path> as From<&'a PathBuf>>
and $N others and $N others
= note: required because of the requirements on the impl of `Into<Cow<'static, str>>` for `{integer}` = note: required because of the requirements on the impl of `Into<Cow<'static, str>>` for `{integer}`

View File

@ -17,10 +17,7 @@ error[E0277]: `()` is not an iterator
--> tests/html_macro/iterable-fail.rs:6:17 --> tests/html_macro/iterable-fail.rs:6:17
| |
6 | html! { for {()} }; 6 | html! { for {()} };
| ^--^ | ^^^^ `()` is not an iterator
| ||
| |this tail expression is of type `_`
| `()` is not an iterator
| |
= help: the trait `Iterator` is not implemented for `()` = help: the trait `Iterator` is not implemented for `()`
= note: required because of the requirements on the impl of `IntoIterator` for `()` = note: required because of the requirements on the impl of `IntoIterator` for `()`
@ -33,6 +30,7 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
| |
= help: the trait `std::fmt::Display` is not implemented for `()` = help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= help: the trait `FromIterator<A>` is implemented for `VNode`
= note: required because of the requirements on the impl of `ToString` for `()` = note: required because of the requirements on the impl of `ToString` for `()`
= note: required because of the requirements on the impl of `From<()>` for `VNode` = note: required because of the requirements on the impl of `From<()>` for `VNode`
= note: required because of the requirements on the impl of `Into<VNode>` for `()` = note: required because of the requirements on the impl of `Into<VNode>` for `()`
@ -47,6 +45,7 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
| |
= help: the trait `std::fmt::Display` is not implemented for `()` = help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= help: the trait `FromIterator<A>` is implemented for `VNode`
= note: required because of the requirements on the impl of `ToString` for `()` = note: required because of the requirements on the impl of `ToString` for `()`
= note: required because of the requirements on the impl of `From<()>` for `VNode` = note: required because of the requirements on the impl of `From<()>` for `VNode`
= note: required because of the requirements on the impl of `Into<VNode>` for `()` = note: required because of the requirements on the impl of `Into<VNode>` for `()`
@ -61,6 +60,7 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
| |
= help: the trait `std::fmt::Display` is not implemented for `()` = help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= help: the trait `FromIterator<A>` is implemented for `VNode`
= note: required because of the requirements on the impl of `std::fmt::Display` for `&()` = note: required because of the requirements on the impl of `std::fmt::Display` for `&()`
= note: required because of the requirements on the impl of `ToString` for `&()` = note: required because of the requirements on the impl of `ToString` for `&()`
= note: required because of the requirements on the impl of `From<&()>` for `VNode` = note: required because of the requirements on the impl of `From<&()>` for `VNode`

View File

@ -39,6 +39,13 @@ error[E0425]: cannot find value `invalid` in this scope
| |
7 | html! { invalid }; 7 | html! { invalid };
| ^^^^^^^ not found in this scope | ^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
1 | use core::ptr::invalid;
|
1 | use std::ptr::invalid;
|
error[E0277]: `()` doesn't implement `std::fmt::Display` error[E0277]: `()` doesn't implement `std::fmt::Display`
--> tests/html_macro/node-fail.rs:6:13 --> tests/html_macro/node-fail.rs:6:13
@ -48,6 +55,16 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
| |
= help: the trait `std::fmt::Display` is not implemented for `()` = help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= help: the following other types implement trait `From<T>`:
<VNode as From<ChildrenRenderer<VNode>>>
<VNode as From<T>>
<VNode as From<VChild<COMP>>>
<VNode as From<yew::virtual_dom::VComp>>
<VNode as From<yew::virtual_dom::VList>>
<VNode as From<yew::virtual_dom::VPortal>>
<VNode as From<yew::virtual_dom::VSuspense>>
<VNode as From<yew::virtual_dom::VTag>>
<VNode as From<yew::virtual_dom::VText>>
= note: required because of the requirements on the impl of `ToString` for `()` = note: required because of the requirements on the impl of `ToString` for `()`
= note: required because of the requirements on the impl of `From<()>` for `VNode` = note: required because of the requirements on the impl of `From<()>` for `VNode`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
@ -60,6 +77,16 @@ error[E0277]: `()` doesn't implement `std::fmt::Display`
| |
= help: the trait `std::fmt::Display` is not implemented for `()` = help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= help: the following other types implement trait `From<T>`:
<VNode as From<ChildrenRenderer<VNode>>>
<VNode as From<T>>
<VNode as From<VChild<COMP>>>
<VNode as From<yew::virtual_dom::VComp>>
<VNode as From<yew::virtual_dom::VList>>
<VNode as From<yew::virtual_dom::VPortal>>
<VNode as From<yew::virtual_dom::VSuspense>>
<VNode as From<yew::virtual_dom::VTag>>
<VNode as From<yew::virtual_dom::VText>>
= note: required because of the requirements on the impl of `ToString` for `()` = note: required because of the requirements on the impl of `ToString` for `()`
= note: required because of the requirements on the impl of `From<()>` for `VNode` = note: required because of the requirements on the impl of `From<()>` for `VNode`
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -1,7 +1,7 @@
use yew::{html, html_nested}; use yew::{html, html_nested};
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn html_macro() { fn html_macro() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();

View File

@ -34,7 +34,7 @@ error[E0599]: no method named `fail` found for struct `PropsBuilder` in the curr
--> tests/props_macro/props-fail.rs:10:31 --> tests/props_macro/props-fail.rs:10:31
| |
3 | #[derive(Clone, Properties, PartialEq)] 3 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `fail` not found for this | ---------- method `fail` not found for this struct
... ...
10 | yew::props!(Props { a: 5, fail: 10 }); 10 | yew::props!(Props { a: 5, fail: 10 });
| ^^^^ method not found in `PropsBuilder` | ^^^^ method not found in `PropsBuilder`
@ -51,7 +51,7 @@ error[E0599]: no method named `does_not_exist` found for struct `PropsBuilder` i
--> tests/props_macro/props-fail.rs:15:25 --> tests/props_macro/props-fail.rs:15:25
| |
3 | #[derive(Clone, Properties, PartialEq)] 3 | #[derive(Clone, Properties, PartialEq)]
| ---------- method `does_not_exist` not found for this | ---------- method `does_not_exist` not found for this struct
... ...
15 | yew::props!(Props { does_not_exist }); 15 | yew::props!(Props { does_not_exist });
| ^^^^^^^^^^^^^^ method not found in `PropsBuilder` | ^^^^^^^^^^^^^^ method not found in `PropsBuilder`

View File

@ -11,3 +11,7 @@ note: required by a bound in `yew::Properties`
| pub trait Properties: PartialEq { | pub trait Properties: PartialEq {
| ^^^^^^^^^ required by this bound in `yew::Properties` | ^^^^^^^^^ required by this bound in `yew::Properties`
= note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider annotating `Props` with `#[derive(PartialEq)]`
|
4 | #[derive(PartialEq)]
|

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn props_macro() { fn props_macro() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/props_macro/*-pass.rs"); t.pass("tests/props_macro/*-pass.rs");

View File

@ -6,7 +6,7 @@ edition = "2021"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
description = "Contains macros used with yew-router" description = "Contains macros used with yew-router"
repository = "https://github.com/yewstack/yew" repository = "https://github.com/yewstack/yew"
rust-version = "1.60.0" rust-version = "1.64.0"
[lib] [lib]
proc-macro = true proc-macro = true

View File

@ -1,6 +1,6 @@
[tasks.test] [tasks.test]
clear = true clear = true
toolchain = "1.60.0" toolchain = "1.64.0"
command = "cargo" command = "cargo"
args = ["test"] args = ["test"]

View File

@ -1,5 +1,5 @@
#[allow(dead_code)] #[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)] #[rustversion::attr(stable(1.64), test)]
fn tests() { fn tests() {
let t = trybuild::TestCases::new(); let t = trybuild::TestCases::new();
t.pass("tests/routable_derive/*-pass.rs"); t.pass("tests/routable_derive/*-pass.rs");

View File

@ -9,7 +9,7 @@ keywords = ["web", "yew", "router"]
categories = ["gui", "web-programming"] categories = ["gui", "web-programming"]
description = "A router implementation for the Yew framework" description = "A router implementation for the Yew framework"
repository = "https://github.com/yewstack/yew" repository = "https://github.com/yewstack/yew"
rust-version = "1.60.0" rust-version = "1.64.0"
[dependencies] [dependencies]
yew = { version = "0.20.0", path = "../yew", default-features= false } yew = { version = "0.20.0", path = "../yew", default-features= false }

View File

@ -14,12 +14,12 @@ keywords = ["web", "webasm", "javascript"]
categories = ["gui", "wasm", "web-programming"] categories = ["gui", "wasm", "web-programming"]
description = "A framework for creating reliable and efficient web applications" description = "A framework for creating reliable and efficient web applications"
readme = "../../README.md" readme = "../../README.md"
rust-version = "1.60.0" rust-version = "1.64.0"
[dependencies] [dependencies]
console_error_panic_hook = "0.1" console_error_panic_hook = "0.1"
gloo = "0.8" gloo = "0.8"
indexmap = { version = "1", features = ["std"] } indexmap = { version = "2", features = ["std"] }
js-sys = "0.3" js-sys = "0.3"
slab = "0.4" slab = "0.4"
wasm-bindgen = "0.2" wasm-bindgen = "0.2"
@ -27,7 +27,7 @@ yew-macro = { version = "^0.20.0", path = "../yew-macro" }
thiserror = "1.0" thiserror = "1.0"
futures = { version = "0.3", default-features = false, features = ["std"] } futures = { version = "0.3", default-features = false, features = ["std"] }
html-escape = { version = "0.2.13", optional = true } html-escape = { version = "0.2.13", optional = true }
implicit-clone = { version = "0.3", features = ["map"] } implicit-clone = { version = "0.4.0", features = ["map"] }
base64ct = { version = "1.6.0", features = ["std"], optional = true } base64ct = { version = "1.6.0", features = ["std"], optional = true }
bincode = { version = "1.3.3", optional = true } bincode = { version = "1.3.3", optional = true }
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }

View File

@ -337,7 +337,7 @@ where
}; };
Self { Self {
_never: std::marker::PhantomData::default(), _never: std::marker::PhantomData,
hook_ctx: HookContext::new( hook_ctx: HookContext::new(
scope, scope,
re_render, re_render,

View File

@ -19,34 +19,25 @@ pub struct NodeSeq<IN, OUT>(Vec<OUT>, PhantomData<IN>);
impl<IN: Into<OUT>, OUT> From<IN> for NodeSeq<IN, OUT> { impl<IN: Into<OUT>, OUT> From<IN> for NodeSeq<IN, OUT> {
fn from(val: IN) -> Self { fn from(val: IN) -> Self {
Self(vec![val.into()], PhantomData::default()) Self(vec![val.into()], PhantomData)
} }
} }
impl<IN: Into<OUT>, OUT> From<Option<IN>> for NodeSeq<IN, OUT> { impl<IN: Into<OUT>, OUT> From<Option<IN>> for NodeSeq<IN, OUT> {
fn from(val: Option<IN>) -> Self { fn from(val: Option<IN>) -> Self {
Self( Self(val.map(|s| vec![s.into()]).unwrap_or_default(), PhantomData)
val.map(|s| vec![s.into()]).unwrap_or_default(),
PhantomData::default(),
)
} }
} }
impl<IN: Into<OUT>, OUT> From<Vec<IN>> for NodeSeq<IN, OUT> { impl<IN: Into<OUT>, OUT> From<Vec<IN>> for NodeSeq<IN, OUT> {
fn from(val: Vec<IN>) -> Self { fn from(val: Vec<IN>) -> Self {
Self( Self(val.into_iter().map(|x| x.into()).collect(), PhantomData)
val.into_iter().map(|x| x.into()).collect(),
PhantomData::default(),
)
} }
} }
impl<IN: Into<OUT> + Clone, OUT> From<&ChildrenRenderer<IN>> for NodeSeq<IN, OUT> { impl<IN: Into<OUT> + Clone, OUT> From<&ChildrenRenderer<IN>> for NodeSeq<IN, OUT> {
fn from(val: &ChildrenRenderer<IN>) -> Self { fn from(val: &ChildrenRenderer<IN>) -> Self {
Self( Self(val.iter().map(|x| x.into()).collect(), PhantomData)
val.iter().map(|x| x.into()).collect(),
PhantomData::default(),
)
} }
} }

View File

@ -11,7 +11,7 @@ bundler for Rust.
To install Rust, follow the [official instructions](https://www.rust-lang.org/tools/install). To install Rust, follow the [official instructions](https://www.rust-lang.org/tools/install).
:::important :::important
The minimum supported Rust version (MSRV) for Yew is `1.60.0`. Older versions will not compile. The minimum supported Rust version (MSRV) for Yew is `1.64.0`. Older versions will not compile.
You can check your toolchain version using You can check your toolchain version using
`rustup show` (under "active toolchain") or `rustc --version`. To update your `rustup show` (under "active toolchain") or `rustc --version`. To update your
toolchain, run `rustup update`. toolchain, run `rustup update`.