mirror of https://github.com/yewstack/yew
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:
parent
b33214efc1
commit
4023c88c39
|
@ -48,7 +48,7 @@ jobs:
|
|||
- uses: browser-actions/setup-geckodriver@latest
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: nanasess/setup-chromedriver@v1
|
||||
- uses: nanasess/setup-chromedriver@v2
|
||||
|
||||
- name: Run doctest
|
||||
run: |
|
||||
|
@ -67,7 +67,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
toolchain:
|
||||
- 1.60.0
|
||||
- 1.64.0
|
||||
- stable
|
||||
|
||||
steps:
|
||||
|
@ -95,7 +95,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: nanasess/setup-chromedriver@v1
|
||||
- uses: nanasess/setup-chromedriver@v2
|
||||
|
||||
- name: Run tests - yew
|
||||
run: |
|
||||
|
@ -116,7 +116,7 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
toolchain:
|
||||
- 1.60.0
|
||||
- 1.64.0
|
||||
- stable
|
||||
- nightly
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: nanasess/setup-chromedriver@v1
|
||||
- uses: nanasess/setup-chromedriver@v2
|
||||
|
||||
- name: Run website code snippet tests
|
||||
run: cargo test -p website-test --target wasm32-unknown-unknown
|
||||
|
|
|
@ -685,6 +685,12 @@ dependencies = [
|
|||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "equivalent"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1"
|
||||
|
||||
[[package]]
|
||||
name = "errno"
|
||||
version = "0.3.1"
|
||||
|
@ -1187,7 +1193,7 @@ dependencies = [
|
|||
"futures-sink",
|
||||
"futures-util",
|
||||
"http",
|
||||
"indexmap",
|
||||
"indexmap 1.9.3",
|
||||
"slab",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
|
@ -1200,6 +1206,12 @@ version = "0.12.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
|
||||
|
||||
[[package]]
|
||||
name = "headers"
|
||||
version = "0.3.8"
|
||||
|
@ -1389,11 +1401,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "implicit-clone"
|
||||
version = "0.3.5"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "40fc102e70475c320b185cd18c1e48bba2d7210b63970a4d581ef903e4368ef7"
|
||||
checksum = "73c84c395327945e71c6604eff15061c67849b9081318b4334b719bb2c11415f"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"indexmap 2.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -1403,7 +1415,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||
dependencies = [
|
||||
"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]]
|
||||
|
@ -3395,7 +3417,7 @@ dependencies = [
|
|||
"gloo",
|
||||
"html-escape",
|
||||
"implicit-clone",
|
||||
"indexmap",
|
||||
"indexmap 2.0.0",
|
||||
"js-sys",
|
||||
"prokio",
|
||||
"rustversion",
|
||||
|
|
|
@ -26,7 +26,7 @@ impl Component for GrandParent {
|
|||
match msg {
|
||||
Msg::ButtonClick(childs_name) => {
|
||||
// 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.last_clicked = Some(childs_name);
|
||||
true
|
||||
|
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
implicit-clone = { version = "0.3", features = ["map"] }
|
||||
implicit-clone = { version = "0.4", features = ["map"] }
|
||||
wasm-bindgen = "0.2"
|
||||
web-sys = "0.3"
|
||||
yew = { path = "../../packages/yew", features = ["csr"] }
|
||||
|
|
|
@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
|
|||
keywords = ["web", "wasm", "frontend", "webasm", "webassembly"]
|
||||
categories = ["gui", "web-programming", "wasm"]
|
||||
description = "A framework for making client-side single-page apps"
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.64.0"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tasks.test]
|
||||
clear = true
|
||||
toolchain = "1.60.0"
|
||||
toolchain = "1.64.0"
|
||||
command = "cargo"
|
||||
# test target can be optionally specified like `cargo make test html_macro`,
|
||||
args = ["test", "${@}"]
|
||||
|
|
|
@ -133,8 +133,8 @@ pub fn hook_impl(hook: HookFn) -> syn::Result<TokenStream> {
|
|||
|
||||
let inner_type_impl = if hook_sig.needs_boxing {
|
||||
let with_output = !matches!(hook_sig.output_type, Type::ImplTrait(_),);
|
||||
let inner_fn_rt = with_output.then(|| &inner_fn_rt);
|
||||
let output_type = with_output.then(|| &output_type);
|
||||
let inner_fn_rt = with_output.then_some(&inner_fn_rt);
|
||||
let output_type = with_output.then_some(&output_type);
|
||||
|
||||
let hook_lifetime = &hook_sig.hook_lifetime;
|
||||
let hook_lifetime_plus = quote! { #hook_lifetime + };
|
||||
|
|
|
@ -11,64 +11,76 @@ error: string literals must not contain more than one class (hint: use `"two", "
|
|||
| ^^^^^^^^^^^
|
||||
|
||||
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}`
|
||||
--> tests/classes_macro/classes-fail.rs:4:14
|
||||
|
|
||||
4 | classes!(42);
|
||||
| ^^ the trait `From<{integer}>` is not implemented for `Classes`
|
||||
|
|
||||
= help: the following other types implement trait `From<T>`:
|
||||
<Classes as From<&'static str>>
|
||||
<Classes as From<&Option<T>>>
|
||||
<Classes as From<&String>>
|
||||
<Classes as From<&[T]>>
|
||||
<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 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`
|
||||
--> $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}`
|
||||
--> tests/classes_macro/classes-fail.rs:5:14
|
||||
|
|
||||
5 | classes!(42.0);
|
||||
| ^^^^ the trait `From<{float}>` is not implemented for `Classes`
|
||||
|
|
||||
= help: the following other types implement trait `From<T>`:
|
||||
<Classes as From<&'static str>>
|
||||
<Classes as From<&Option<T>>>
|
||||
<Classes as From<&String>>
|
||||
<Classes as From<&[T]>>
|
||||
<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 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`
|
||||
--> $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}>`
|
||||
--> tests/classes_macro/classes-fail.rs:9:14
|
||||
|
|
||||
9 | classes!(vec![42]);
|
||||
| ^^^ the trait `From<{integer}>` is not implemented for `Classes`
|
||||
|
|
||||
= help: the following other types implement trait `From<T>`:
|
||||
<Classes as From<&'static str>>
|
||||
<Classes as From<&Option<T>>>
|
||||
<Classes as From<&String>>
|
||||
<Classes as From<&[T]>>
|
||||
<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 `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`
|
||||
--> $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
|
||||
|
@ -76,12 +88,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
|
|||
13 | classes!(some);
|
||||
| ^^^^ 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<&Option<T>>>
|
||||
<Classes as From<&String>>
|
||||
<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 `From<Option<{integer}>>` for `Classes`
|
||||
= note: 1 redundant requirement hidden
|
||||
|
@ -98,12 +114,16 @@ error[E0277]: the trait bound `Classes: From<u32>` is not satisfied
|
|||
14 | classes!(none);
|
||||
| ^^^^ 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<&Option<T>>>
|
||||
<Classes as From<&String>>
|
||||
<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 `From<Option<u32>>` for `Classes`
|
||||
= note: 1 redundant requirement hidden
|
||||
|
@ -120,12 +140,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
|
|||
16 | classes!("one", 42);
|
||||
| ^^ 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<&Option<T>>>
|
||||
<Classes as From<&String>>
|
||||
<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 by a bound in `Classes::push`
|
||||
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn classes_macro() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/classes_macro/*-pass.rs");
|
||||
|
|
|
@ -25,33 +25,18 @@ note: these functions exist but are inaccessible
|
|||
102 | fn foo() -> i32 {
|
||||
| ^^^^^^^^^^^^^^^ `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
|
||||
--> tests/derive_props/fail.rs:9:21
|
||||
|
|
||||
9 | #[derive(Clone, Properties, PartialEq)]
|
||||
| ^^^^^^^^^^ the trait `Default` is not implemented for `Value`
|
||||
|
|
||||
--> tests/derive_props/fail.rs:9:21
|
||||
|
|
||||
9 | #[derive(Clone, Properties, PartialEq)]
|
||||
| ^^^^^^^^^^ the trait `Default` is not implemented for `Value`
|
||||
|
|
||||
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`
|
||||
--> 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
|
||||
|
|
||||
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)
|
||||
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
|
||||
|
|
||||
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)
|
||||
help: consider annotating `Value` with `#[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
|
||||
--> tests/derive_props/fail.rs:54:19
|
||||
|
|
||||
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
|
||||
|
|
||||
54 | #[prop_or(123.to_string())]
|
||||
|
@ -107,30 +125,30 @@ help: try using a conversion method
|
|||
| ++++++++++++
|
||||
|
||||
error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
|
||||
--> tests/derive_props/fail.rs:64:24
|
||||
|
|
||||
64 | #[prop_or_else(123)]
|
||||
| ^^^ expected an `FnOnce<()>` closure, found `{integer}`
|
||||
|
|
||||
= help: the trait `FnOnce<()>` is not implemented for `{integer}`
|
||||
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
|
||||
--> tests/derive_props/fail.rs:64:24
|
||||
|
|
||||
64 | #[prop_or_else(123)]
|
||||
| ^^^ expected an `FnOnce<()>` closure, found `{integer}`
|
||||
|
|
||||
= help: the trait `FnOnce<()>` is not implemented for `{integer}`
|
||||
= note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }`
|
||||
note: required by a bound in `Option::<T>::unwrap_or_else`
|
||||
|
||||
error[E0593]: function is expected to take 0 arguments, but it takes 1 argument
|
||||
--> tests/derive_props/fail.rs:84:24
|
||||
|
|
||||
84 | #[prop_or_else(foo)]
|
||||
| ^^^ expected function that takes 0 arguments
|
||||
--> tests/derive_props/fail.rs:84:24
|
||||
|
|
||||
84 | #[prop_or_else(foo)]
|
||||
| ^^^ expected function that takes 0 arguments
|
||||
...
|
||||
88 | fn foo(bar: i32) -> String {
|
||||
| -------------------------- takes 1 argument
|
||||
|
|
||||
88 | fn foo(bar: i32) -> String {
|
||||
| -------------------------- takes 1 argument
|
||||
|
|
||||
note: required by a bound in `Option::<T>::unwrap_or_else`
|
||||
|
||||
error[E0271]: type mismatch resolving `<fn() -> i32 {t10::foo} as FnOnce<()>>::Output == String`
|
||||
--> tests/derive_props/fail.rs:98:24
|
||||
|
|
||||
98 | #[prop_or_else(foo)]
|
||||
| ^^^ expected struct `String`, found `i32`
|
||||
|
|
||||
--> tests/derive_props/fail.rs:98:24
|
||||
|
|
||||
98 | #[prop_or_else(foo)]
|
||||
| ^^^ expected struct `String`, found `i32`
|
||||
|
|
||||
note: required by a bound in `Option::<T>::unwrap_or_else`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn derive_props() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/derive_props/pass.rs");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn tests() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/function_component_attr/*-pass.rs");
|
||||
|
|
|
@ -10,4 +10,7 @@ error[E0277]: the trait bound `u32: IntoHtmlResult` is not satisfied
|
|||
11 | #[function_component(Comp)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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)
|
||||
|
|
|
@ -13,6 +13,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<a, _>` is not satisfied
|
|||
22 | html! { <Comp<Props> /> };
|
||||
| ^^^^ 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>`
|
||||
--> 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>,
|
||||
| ^^^^^^^^^^^^^^^^^^^ 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
|
||||
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
||||
|
@ -32,33 +42,26 @@ error[E0277]: the trait bound `Comp<MissingTypeBounds>: yew::BaseComponent` is n
|
|||
27 | html! { <Comp<MissingTypeBounds> /> };
|
||||
| ^^^^ the trait `yew::BaseComponent` is not implemented for `Comp<MissingTypeBounds>`
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<Comp<P> as yew::BaseComponent>
|
||||
= help: the trait `yew::BaseComponent` is implemented for `Comp<P>`
|
||||
= 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
|
||||
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
||||
|
|
||||
8 | #[function_component(Comp)]
|
||||
| --------------------------- doesn't satisfy `Comp<MissingTypeBounds>: yew::BaseComponent`
|
||||
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
||||
|
|
||||
8 | #[function_component(Comp)]
|
||||
| ------------------------- doesn't satisfy `Comp<MissingTypeBounds>: yew::BaseComponent`
|
||||
...
|
||||
27 | html! { <Comp<MissingTypeBounds> /> };
|
||||
| ^^^^ function or associated item cannot be called on `VChild<Comp<MissingTypeBounds>>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`Comp<MissingTypeBounds>: yew::BaseComponent`
|
||||
27 | html! { <Comp<MissingTypeBounds> /> };
|
||||
| ^^^^ function or associated item cannot be called on `VChild<Comp<MissingTypeBounds>>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`Comp<MissingTypeBounds>: yew::BaseComponent`
|
||||
note: the following trait must be implemented
|
||||
--> $WORKSPACE/packages/yew/src/html/component/mod.rs
|
||||
|
|
||||
| / 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)
|
||||
--> $WORKSPACE/packages/yew/src/html/component/mod.rs
|
||||
|
|
||||
| pub trait BaseComponent: Sized + 'static {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= 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
|
||||
--> tests/function_component_attr/generic-props-fail.rs:27:14
|
||||
|
@ -66,6 +69,12 @@ error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisf
|
|||
27 | html! { <Comp<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`
|
||||
--> tests/function_component_attr/generic-props-fail.rs:11:8
|
||||
|
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn tests() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/hook_attr/*-pass.rs");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn tests() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/hook_macro/*-pass.rs");
|
||||
|
|
|
@ -433,7 +433,7 @@ error[E0599]: no method named `r#type` found for struct `ChildPropertiesBuilder`
|
|||
--> tests/html_macro/component-fail.rs:85:20
|
||||
|
|
||||
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 /> };
|
||||
| ^^^^ 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
|
||||
|
|
||||
4 | #[derive(Clone, Properties, PartialEq)]
|
||||
| ---------- method `unknown` not found for this
|
||||
| ---------- method `unknown` not found for this struct
|
||||
...
|
||||
88 | html! { <Child unknown="unknown" /> };
|
||||
| ^^^^^^^ 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
|
||||
|
|
||||
= 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`
|
||||
--> 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
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<f32 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<f64 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<i128 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<i16 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
= help: the following other types implement trait `IntoPropValue<T>`:
|
||||
f32
|
||||
f64
|
||||
i128
|
||||
i16
|
||||
i32
|
||||
i64
|
||||
i8
|
||||
isize
|
||||
and $N others
|
||||
note: required by a bound in `ChildPropertiesBuilder::string`
|
||||
--> 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
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<f32 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<f64 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<i128 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<i16 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
= help: the following other types implement trait `IntoPropValue<T>`:
|
||||
f32
|
||||
f64
|
||||
i128
|
||||
i16
|
||||
i32
|
||||
i64
|
||||
i8
|
||||
isize
|
||||
and $N others
|
||||
note: required by a bound in `ChildPropertiesBuilder::string`
|
||||
--> 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
|
||||
|
|
||||
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={()} /> };
|
||||
| ^^^^^ 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
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<u32 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<f32 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<f64 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
<i128 as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
= help: the following other types implement trait `IntoPropValue<T>`:
|
||||
f32
|
||||
f64
|
||||
i128
|
||||
i16
|
||||
i32
|
||||
i64
|
||||
i8
|
||||
isize
|
||||
and $N others
|
||||
note: required by a bound in `ChildPropertiesBuilder::int`
|
||||
--> 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" /> };
|
||||
| ^^^^^ 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>`
|
||||
--> 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>,
|
||||
| ^^^^^^^^^^^^^^^^^^^ 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`
|
||||
--> 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
|
||||
|
|
||||
4 | #[derive(Clone, Properties, PartialEq)]
|
||||
| ---------- method `children` not found for this
|
||||
| ---------- method `children` not found for this struct
|
||||
...
|
||||
103 | html! { <Child>{ "Not allowed" }</Child> };
|
||||
| ^^^^^ method not found in `ChildPropertiesBuilder`
|
||||
|
@ -616,6 +648,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties
|
|||
115 | html! { <ChildContainer /> };
|
||||
| ^^^^^^^^^^^^^^ 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>`
|
||||
--> 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>,
|
||||
| ^^^^^^^^^^^^^^^^^^^ 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
|
||||
--> tests/html_macro/component-fail.rs:116:14
|
||||
|
@ -635,6 +677,16 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties
|
|||
116 | html! { <ChildContainer></ChildContainer> };
|
||||
| ^^^^^^^^^^^^^^ 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>`
|
||||
--> 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>,
|
||||
| ^^^^^^^^^^^^^^^^^^^ 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
|
||||
--> tests/html_macro/component-fail.rs:117:31
|
||||
--> tests/html_macro/component-fail.rs:117:14
|
||||
|
|
||||
117 | html! { <ChildContainer>{ "Not allowed" }</ChildContainer> };
|
||||
| -------------- ^^^^^^^^^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `yew::virtual_dom::VText`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
| ^^^^^^^^^^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `yew::virtual_dom::VText`
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<yew::virtual_dom::VText as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
= help: the trait `IntoPropValue<ChildrenRenderer<VNode>>` is implemented for `yew::virtual_dom::VText`
|
||||
note: required by a bound in `ChildContainerPropertiesBuilder::children`
|
||||
--> tests/html_macro/component-fail.rs:24:17
|
||||
|
|
||||
|
@ -666,7 +715,7 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children`
|
|||
25 | pub struct ChildContainerProperties {
|
||||
26 | pub children: ChildrenWithProps<Child>,
|
||||
| -------- 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
|
||||
--> 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`
|
||||
|
||||
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> };
|
||||
| -------------- ^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `VNode`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
| ^^^^^^^^^^^^^^ the trait `IntoPropValue<ChildrenRenderer<VChild<Child>>>` is not implemented for `VNode`
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<VNode as IntoPropValue<ChildrenRenderer<VNode>>>
|
||||
= help: the trait `IntoPropValue<ChildrenRenderer<VNode>>` is implemented for `VNode`
|
||||
note: required by a bound in `ChildContainerPropertiesBuilder::children`
|
||||
--> tests/html_macro/component-fail.rs:24:17
|
||||
|
|
||||
|
@ -694,4 +740,4 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children`
|
|||
25 | pub struct ChildContainerProperties {
|
||||
26 | pub children: ChildrenWithProps<Child>,
|
||||
| -------- 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)
|
||||
|
|
|
@ -4,29 +4,24 @@ error[E0277]: the trait bound `Unimplemented: yew::Component` is not satisfied
|
|||
6 | html! { <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: 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<Unimplemented>`, but its trait bounds were not satisfied
|
||||
--> tests/html_macro/component-unimplemented-fail.rs:6:14
|
||||
|
|
||||
3 | struct Unimplemented;
|
||||
| --------------------- doesn't satisfy `Unimplemented: BaseComponent`
|
||||
--> tests/html_macro/component-unimplemented-fail.rs:6:14
|
||||
|
|
||||
3 | struct Unimplemented;
|
||||
| -------------------- doesn't satisfy `Unimplemented: BaseComponent`
|
||||
...
|
||||
6 | html! { <Unimplemented /> };
|
||||
| ^^^^^^^^^^^^^ function or associated item cannot be called on `VChild<Unimplemented>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`Unimplemented: BaseComponent`
|
||||
6 | html! { <Unimplemented /> };
|
||||
| ^^^^^^^^^^^^^ function or associated item cannot be called on `VChild<Unimplemented>` due to unsatisfied trait bounds
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`Unimplemented: BaseComponent`
|
||||
note: the following trait must be implemented
|
||||
--> $WORKSPACE/packages/yew/src/html/component/mod.rs
|
||||
|
|
||||
| / 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)
|
||||
--> $WORKSPACE/packages/yew/src/html/component/mod.rs
|
||||
|
|
||||
| pub trait BaseComponent: Sized + 'static {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
|
@ -369,22 +369,40 @@ error[E0308]: mismatched types
|
|||
--> tests/html_macro/element-fail.rs:36:28
|
||||
|
|
||||
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
|
||||
--> tests/html_macro/element-fail.rs:37:29
|
||||
|
|
||||
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`
|
||||
found enum `Option<bool>`
|
||||
note: tuple variant defined here
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> tests/html_macro/element-fail.rs:38:29
|
||||
|
|
||||
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
|
||||
--> tests/html_macro/element-fail.rs:39:30
|
||||
|
@ -399,63 +417,112 @@ error[E0308]: mismatched types
|
|||
--> tests/html_macro/element-fail.rs:40:30
|
||||
|
|
||||
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
|
||||
--> tests/html_macro/element-fail.rs:43:26
|
||||
|
|
||||
43 | html! { <input type={()} /> };
|
||||
| ^^ 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
|
||||
--> tests/html_macro/element-fail.rs:44:27
|
||||
|
|
||||
44 | html! { <input value={()} /> };
|
||||
| ^^ 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
|
||||
--> tests/html_macro/element-fail.rs:45:22
|
||||
|
|
||||
45 | html! { <a href={()} /> };
|
||||
| ^^ 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
|
||||
--> tests/html_macro/element-fail.rs:46:28
|
||||
|
|
||||
46 | html! { <input string={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
|
||||
--> tests/html_macro/element-fail.rs:47:23
|
||||
|
|
||||
47 | html! { <a media={Some(NotToString)} /> };
|
||||
| ----^^^^^^^^^^^^^
|
||||
| |
|
||||
| the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<NotToString>`
|
||||
| required by a bound introduced by this call
|
||||
| ^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<NotToString>`
|
||||
|
|
||||
= 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<implicit_clone::unsync::IString>>>
|
||||
<Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>>
|
||||
<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
|
||||
--> tests/html_macro/element-fail.rs:48:22
|
||||
|
|
||||
48 | html! { <a href={Some(5)} /> };
|
||||
| ----^^^
|
||||
| |
|
||||
| the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<{integer}>`
|
||||
| required by a bound introduced by this call
|
||||
| ^^^^ the trait `IntoPropValue<Option<implicit_clone::unsync::IString>>` is not implemented for `Option<{integer}>`
|
||||
|
|
||||
= 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<implicit_clone::unsync::IString>>>
|
||||
<Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>>
|
||||
<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}`
|
||||
--> 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
|
||||
|
|
||||
= 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 by a bound in `yew::html::onclick::Wrapper::__macro_new`
|
||||
--> $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)
|
||||
| | }
|
||||
| |_^ 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>`
|
||||
--> 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
|
||||
|
|
||||
= 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 by a bound in `yew::html::onclick::Wrapper::__macro_new`
|
||||
--> $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)
|
||||
| | }
|
||||
| |_^ 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
|
||||
--> 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}>`
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following implementations were found:
|
||||
<Option<T> as IntoEventCallback<EVENT>>
|
||||
<Option<yew::Callback<EVENT>> as IntoEventCallback<EVENT>>
|
||||
= help: the following other types implement trait `IntoEventCallback<EVENT>`:
|
||||
Option<T>
|
||||
Option<yew::Callback<EVENT>>
|
||||
note: required by a bound in `yew::html::onfocus::Wrapper::__macro_new`
|
||||
--> $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)
|
||||
| | }
|
||||
| |_^ 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
|
||||
--> tests/html_macro/element-fail.rs:56:25
|
||||
|
|
||||
56 | html! { <input ref={()} /> };
|
||||
| ^^
|
||||
| |
|
||||
| the trait `IntoPropValue<yew::NodeRef>` is not implemented for `()`
|
||||
| required by a bound introduced by this call
|
||||
| ^^ the trait `IntoPropValue<yew::NodeRef>` 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
|
||||
= 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
|
||||
--> tests/html_macro/element-fail.rs:57:25
|
||||
|
|
||||
57 | html! { <input ref={Some(NodeRef::default())} /> };
|
||||
| ----^^^^^^^^^^^^^^^^^^^^
|
||||
| |
|
||||
| the trait `IntoPropValue<yew::NodeRef>` is not implemented for `Option<yew::NodeRef>`
|
||||
| required by a bound introduced by this call
|
||||
| ^^^^ the trait `IntoPropValue<yew::NodeRef>` is not implemented for `Option<yew::NodeRef>`
|
||||
|
|
||||
= 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<implicit_clone::unsync::IString>>>
|
||||
<Option<F> as IntoPropValue<Option<yew::Callback<I, O>>>>
|
||||
<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>`
|
||||
--> 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
|
||||
|
|
||||
= 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 by a bound in `yew::html::onclick::Wrapper::__macro_new`
|
||||
--> $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)
|
||||
| | }
|
||||
| |_^ 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
|
||||
--> tests/html_macro/element-fail.rs:60:28
|
||||
|
|
||||
60 | html! { <input string={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
|
||||
--> tests/html_macro/element-fail.rs:62:25
|
||||
|
|
||||
62 | html! { <input ref={()} /> };
|
||||
| ^^
|
||||
| |
|
||||
| the trait `IntoPropValue<yew::NodeRef>` is not implemented for `()`
|
||||
| required by a bound introduced by this call
|
||||
| ^^ the trait `IntoPropValue<yew::NodeRef>` 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
|
||||
= 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
|
||||
--> tests/html_macro/element-fail.rs:77:15
|
||||
|
|
||||
77 | html! { <@{55}></@> };
|
||||
| ^--^
|
||||
| ||
|
||||
| |this tail expression is of type `_`
|
||||
| the trait `From<{integer}>` is not implemented for `Cow<'static, str>`
|
||||
| ^^^^ 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 CString>>
|
||||
<Cow<'a, CStr> as From<CString>>
|
||||
<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
|
||||
= note: required because of the requirements on the impl of `Into<Cow<'static, str>>` for `{integer}`
|
||||
|
|
|
@ -17,55 +17,55 @@ error[E0277]: `()` is not an iterator
|
|||
--> tests/html_macro/iterable-fail.rs:6:17
|
||||
|
|
||||
6 | html! { for {()} };
|
||||
| ^--^
|
||||
| ||
|
||||
| |this tail expression is of type `_`
|
||||
| `()` is not an iterator
|
||||
| ^^^^ `()` is not an iterator
|
||||
|
|
||||
= help: the trait `Iterator` is not implemented for `()`
|
||||
= note: required because of the requirements on the impl of `IntoIterator` for `()`
|
||||
|
||||
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
--> tests/html_macro/iterable-fail.rs:7:17
|
||||
|
|
||||
7 | html! { for Vec::<()>::new().into_iter() };
|
||||
| ^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= 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: 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 `Into<VNode>` for `()`
|
||||
= note: required because of the requirements on the impl of `FromIterator<()>` for `VNode`
|
||||
--> tests/html_macro/iterable-fail.rs:7:17
|
||||
|
|
||||
7 | html! { for Vec::<()>::new().into_iter() };
|
||||
| ^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= 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
|
||||
= 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 `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 `FromIterator<()>` for `VNode`
|
||||
note: required by a bound in `collect`
|
||||
|
||||
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
--> tests/html_macro/iterable-fail.rs:10:17
|
||||
|
|
||||
10 | html! { for empty };
|
||||
| ^^^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= 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: 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 `Into<VNode>` for `()`
|
||||
= note: required because of the requirements on the impl of `FromIterator<()>` for `VNode`
|
||||
--> tests/html_macro/iterable-fail.rs:10:17
|
||||
|
|
||||
10 | html! { for empty };
|
||||
| ^^^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= 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
|
||||
= 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 `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 `FromIterator<()>` for `VNode`
|
||||
note: required by a bound in `collect`
|
||||
|
||||
error[E0277]: `()` doesn't implement `std::fmt::Display`
|
||||
--> tests/html_macro/iterable-fail.rs:13:17
|
||||
|
|
||||
13 | html! { for empty.iter() };
|
||||
| ^^^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= 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: 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 `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 `FromIterator<&()>` for `VNode`
|
||||
--> tests/html_macro/iterable-fail.rs:13:17
|
||||
|
|
||||
13 | html! { for empty.iter() };
|
||||
| ^^^^^ `()` cannot be formatted with the default formatter
|
||||
|
|
||||
= 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
|
||||
= 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 `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 `Into<VNode>` for `&()`
|
||||
= note: required because of the requirements on the impl of `FromIterator<&()>` for `VNode`
|
||||
note: required by a bound in `collect`
|
||||
|
||||
error[E0277]: `()` is not an iterator
|
||||
|
|
|
@ -39,6 +39,13 @@ error[E0425]: cannot find value `invalid` in this scope
|
|||
|
|
||||
7 | html! { invalid };
|
||||
| ^^^^^^^ 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`
|
||||
--> 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 `()`
|
||||
= 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 `From<()>` for `VNode`
|
||||
= 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 `()`
|
||||
= 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 `From<()>` for `VNode`
|
||||
= note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use yew::{html, html_nested};
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn html_macro() {
|
||||
let t = trybuild::TestCases::new();
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
||||
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 });
|
||||
| ^^^^ 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
|
||||
|
|
||||
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 });
|
||||
| ^^^^^^^^^^^^^^ method not found in `PropsBuilder`
|
||||
|
|
|
@ -11,3 +11,7 @@ note: required by a bound in `yew::Properties`
|
|||
| pub trait Properties: PartialEq {
|
||||
| ^^^^^^^^^ 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)
|
||||
help: consider annotating `Props` with `#[derive(PartialEq)]`
|
||||
|
|
||||
4 | #[derive(PartialEq)]
|
||||
|
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn props_macro() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/props_macro/*-pass.rs");
|
||||
|
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
|||
license = "MIT OR Apache-2.0"
|
||||
description = "Contains macros used with yew-router"
|
||||
repository = "https://github.com/yewstack/yew"
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.64.0"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tasks.test]
|
||||
clear = true
|
||||
toolchain = "1.60.0"
|
||||
toolchain = "1.64.0"
|
||||
command = "cargo"
|
||||
args = ["test"]
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#[allow(dead_code)]
|
||||
#[rustversion::attr(stable(1.60), test)]
|
||||
#[rustversion::attr(stable(1.64), test)]
|
||||
fn tests() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/routable_derive/*-pass.rs");
|
||||
|
|
|
@ -9,7 +9,7 @@ keywords = ["web", "yew", "router"]
|
|||
categories = ["gui", "web-programming"]
|
||||
description = "A router implementation for the Yew framework"
|
||||
repository = "https://github.com/yewstack/yew"
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.64.0"
|
||||
|
||||
[dependencies]
|
||||
yew = { version = "0.20.0", path = "../yew", default-features= false }
|
||||
|
|
|
@ -14,12 +14,12 @@ keywords = ["web", "webasm", "javascript"]
|
|||
categories = ["gui", "wasm", "web-programming"]
|
||||
description = "A framework for creating reliable and efficient web applications"
|
||||
readme = "../../README.md"
|
||||
rust-version = "1.60.0"
|
||||
rust-version = "1.64.0"
|
||||
|
||||
[dependencies]
|
||||
console_error_panic_hook = "0.1"
|
||||
gloo = "0.8"
|
||||
indexmap = { version = "1", features = ["std"] }
|
||||
indexmap = { version = "2", features = ["std"] }
|
||||
js-sys = "0.3"
|
||||
slab = "0.4"
|
||||
wasm-bindgen = "0.2"
|
||||
|
@ -27,7 +27,7 @@ yew-macro = { version = "^0.20.0", path = "../yew-macro" }
|
|||
thiserror = "1.0"
|
||||
futures = { version = "0.3", default-features = false, features = ["std"] }
|
||||
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 }
|
||||
bincode = { version = "1.3.3", optional = true }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
|
|
@ -337,7 +337,7 @@ where
|
|||
};
|
||||
|
||||
Self {
|
||||
_never: std::marker::PhantomData::default(),
|
||||
_never: std::marker::PhantomData,
|
||||
hook_ctx: HookContext::new(
|
||||
scope,
|
||||
re_render,
|
||||
|
|
|
@ -19,34 +19,25 @@ pub struct NodeSeq<IN, OUT>(Vec<OUT>, PhantomData<IN>);
|
|||
|
||||
impl<IN: Into<OUT>, OUT> From<IN> for NodeSeq<IN, OUT> {
|
||||
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> {
|
||||
fn from(val: Option<IN>) -> Self {
|
||||
Self(
|
||||
val.map(|s| vec![s.into()]).unwrap_or_default(),
|
||||
PhantomData::default(),
|
||||
)
|
||||
Self(val.map(|s| vec![s.into()]).unwrap_or_default(), PhantomData)
|
||||
}
|
||||
}
|
||||
|
||||
impl<IN: Into<OUT>, OUT> From<Vec<IN>> for NodeSeq<IN, OUT> {
|
||||
fn from(val: Vec<IN>) -> Self {
|
||||
Self(
|
||||
val.into_iter().map(|x| x.into()).collect(),
|
||||
PhantomData::default(),
|
||||
)
|
||||
Self(val.into_iter().map(|x| x.into()).collect(), PhantomData)
|
||||
}
|
||||
}
|
||||
|
||||
impl<IN: Into<OUT> + Clone, OUT> From<&ChildrenRenderer<IN>> for NodeSeq<IN, OUT> {
|
||||
fn from(val: &ChildrenRenderer<IN>) -> Self {
|
||||
Self(
|
||||
val.iter().map(|x| x.into()).collect(),
|
||||
PhantomData::default(),
|
||||
)
|
||||
Self(val.iter().map(|x| x.into()).collect(), PhantomData)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ bundler for Rust.
|
|||
To install Rust, follow the [official instructions](https://www.rust-lang.org/tools/install).
|
||||
|
||||
:::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
|
||||
`rustup show` (under "active toolchain") or `rustc --version`. To update your
|
||||
toolchain, run `rustup update`.
|
||||
|
|
Loading…
Reference in New Issue