Reviewed build tests.
This commit is contained in:
parent
053b30c277
commit
92e19bcef1
|
@ -1,5 +1,5 @@
|
|||
error: cannot unset in when assign
|
||||
--> cases/widget_new/cannot_unset_in_when.rs:9:22
|
||||
--> cases/widget_new/cannot_unset_in_when.rs:8:22
|
||||
|
|
||||
9 | margin = unset!;
|
||||
8 | margin = unset!;
|
||||
| ^^^^^
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error: expected property or when
|
||||
--> cases/widget_new/error_first_token.rs:6:9
|
||||
--> cases/widget_new/error_first_token.rs:5:9
|
||||
|
|
||||
6 | =
|
||||
5 | =
|
||||
| ^
|
||||
|
||||
error: expected property path
|
||||
--> cases/widget_new/error_first_token.rs:13:13
|
||||
--> cases/widget_new/error_first_token.rs:12:13
|
||||
|
|
||||
13 | =
|
||||
12 | =
|
||||
| ^
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: use of undeclared crate or module `unknown`
|
||||
--> cases/widget_new/error_in_property_expr.rs:8:21
|
||||
--> cases/widget_new/error_in_property_expr.rs:7:21
|
||||
|
|
||||
8 | let _ = unknown::path();
|
||||
7 | let _ = unknown::path();
|
||||
| ^^^^^^^ use of undeclared crate or module `unknown`
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
error[E0308]: mismatched types
|
||||
--> cases/widget_new/error_in_when_expr1.rs:9:26
|
||||
--> cases/widget_new/error_in_when_expr1.rs:8:26
|
||||
|
|
||||
9 | let a: u32 = true;
|
||||
8 | let a: u32 = true;
|
||||
| --- ^^^^ expected `u32`, found `bool`
|
||||
| |
|
||||
| expected due to this
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: expected a when block expr and properties
|
||||
--> cases/widget_new/error_in_when_expr2.rs:10:9
|
||||
|
|
||||
10 | }
|
||||
| ^
|
||||
--> cases/widget_new/error_in_when_expr2.rs:9:9
|
||||
|
|
||||
9 | }
|
||||
| ^
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: expected identifier or index
|
||||
--> cases/widget_new/error_in_when_expr3.rs:8:23
|
||||
--> cases/widget_new/error_in_when_expr3.rs:7:23
|
||||
|
|
||||
8 | when *#margin.0. {
|
||||
7 | when *#margin.0. {
|
||||
| ^^
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
error[E0277]: the trait bound `bool: IntoVar<SideOffsets>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type1.rs:6:13
|
||||
--> cases/widget_new/incorrect_arg_type1.rs:6:18
|
||||
|
|
||||
6 | let _ = Wgt! {
|
||||
| _____________^
|
||||
7 | | margin = true
|
||||
| | ------ required by a bound introduced by this call
|
||||
8 | | };
|
||||
| |_____^ the trait `IntoVar<SideOffsets>` is not implemented for `bool`
|
||||
6 | margin = true
|
||||
| ------ ^^^^ the trait `IntoVar<SideOffsets>` is not implemented for `bool`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `margin::__new__`
|
||||
note: required by a bound in `zero_ui::properties::margin::margin`
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `margin::__new__`
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `margin::margin`
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
error[E0277]: the trait bound `bool: IntoVar<u32>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type2.rs:11:13
|
||||
error[E0277]: the trait bound `bool: zero_ui::prelude::IntoVar<u32>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type2.rs:11:23
|
||||
|
|
||||
11 | let _ = Wgt! {
|
||||
| _____________^
|
||||
12 | | simple_type = true
|
||||
| | ----------- required by a bound introduced by this call
|
||||
13 | | };
|
||||
| |_____^ the trait `IntoVar<u32>` is not implemented for `bool`
|
||||
11 | simple_type = true
|
||||
| ----------- ^^^^ the trait `zero_ui::prelude::IntoVar<u32>` is not implemented for `bool`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
= help: the following other types implement trait `zero_ui::prelude::IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `simple_type::__new__`
|
||||
--> cases/widget_new/incorrect_arg_type2.rs:5:53
|
||||
note: required by a bound in `simple_type::simple_type`
|
||||
--> cases/widget_new/incorrect_arg_type2.rs:4:53
|
||||
|
|
||||
4 | #[property(CONTEXT)]
|
||||
| -------------------- required by a bound in this
|
||||
5 | pub fn simple_type(child: impl UiNode, simple: impl IntoVar<u32>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^ required by this bound in `simple_type::__new__`
|
||||
4 | pub fn simple_type(child: impl UiNode, simple: impl IntoVar<u32>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^ required by this bound in `simple_type::simple_type`
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
error[E0277]: the trait bound `bool: IntoVar<GradientStops>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type3.rs:7:13
|
||||
--> cases/widget_new/incorrect_arg_type3.rs:6:40
|
||||
|
|
||||
7 | let _ = Wgt! {
|
||||
| _____________^
|
||||
8 | | background_gradient = 0.deg(), true
|
||||
| | ------------------- required by a bound introduced by this call
|
||||
9 | | };
|
||||
| |_____^ the trait `IntoVar<GradientStops>` is not implemented for `bool`
|
||||
6 | background_gradient = 0.deg(), true
|
||||
| ------------------- ^^^^ the trait `IntoVar<GradientStops>` is not implemented for `bool`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `background_gradient::__new__`
|
||||
note: required by a bound in `zero_ui::properties::background_gradient::background_gradient`
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `background_gradient::__new__`
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `background_gradient::background_gradient`
|
||||
|
|
|
@ -1,21 +1,15 @@
|
|||
error[E0277]: the trait bound `bool: IntoVar<GradientStops>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type4.rs:7:13
|
||||
|
|
||||
7 | let _ = Wgt! {
|
||||
| ______________^
|
||||
8 | | // only background_gradient gets highlighted here because generics..
|
||||
9 | |/ background_gradient = {
|
||||
10 | || axis: 0.deg(),
|
||||
11 | || stops: true
|
||||
| ||_________________- required by a bound introduced by this call
|
||||
12 | | }
|
||||
13 | | };
|
||||
| |______^ the trait `IntoVar<GradientStops>` is not implemented for `bool`
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
--> cases/widget_new/incorrect_arg_type4.rs:9:20
|
||||
|
|
||||
9 | stops: true
|
||||
| ----- ^^^^ the trait `IntoVar<GradientStops>` is not implemented for `bool`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `background_gradient::stops`
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `background_gradient::stops`
|
||||
note: required by a bound in `background_gradient_inputs__::stops`
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `background_gradient_inputs__::stops`
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
error[E0277]: the trait bound `bool: IntoVar<u32>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type5.rs:11:13
|
||||
error[E0277]: the trait bound `bool: zero_ui::prelude::IntoVar<u32>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type5.rs:11:27
|
||||
|
|
||||
11 | let _ = Wgt! {
|
||||
| _____________^
|
||||
12 | | simple_type = 42, true
|
||||
| | ----------- required by a bound introduced by this call
|
||||
13 | | };
|
||||
| |_____^ the trait `IntoVar<u32>` is not implemented for `bool`
|
||||
11 | simple_type = 42, true
|
||||
| ----------- ^^^^ the trait `zero_ui::prelude::IntoVar<u32>` is not implemented for `bool`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
= help: the following other types implement trait `zero_ui::prelude::IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `simple_type::__new__`
|
||||
--> cases/widget_new/incorrect_arg_type5.rs:5:84
|
||||
note: required by a bound in `simple_type::simple_type`
|
||||
--> cases/widget_new/incorrect_arg_type5.rs:4:84
|
||||
|
|
||||
4 | #[property(CONTEXT)]
|
||||
| -------------------- required by a bound in this
|
||||
5 | pub fn simple_type(child: impl UiNode, simple_a: impl IntoVar<u32>, simple_b: impl IntoVar<u32>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^ required by this bound in `simple_type::__new__`
|
||||
4 | pub fn simple_type(child: impl UiNode, simple_a: impl IntoVar<u32>, simple_b: impl IntoVar<u32>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^ required by this bound in `simple_type::simple_type`
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
error[E0277]: the trait bound `bool: IntoVar<u32>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type6.rs:11:13
|
||||
error[E0277]: the trait bound `bool: zero_ui::prelude::IntoVar<u32>` is not satisfied
|
||||
--> cases/widget_new/incorrect_arg_type6.rs:13:23
|
||||
|
|
||||
11 | let _ = Wgt! {
|
||||
| ______________^
|
||||
12 | |/ simple_type = {
|
||||
13 | || simple_a: 42,
|
||||
14 | || simple_b: true,
|
||||
| ||____________________- required by a bound introduced by this call
|
||||
15 | | }
|
||||
16 | | };
|
||||
| |______^ the trait `IntoVar<u32>` is not implemented for `bool`
|
||||
13 | simple_b: true,
|
||||
| -------- ^^^^ the trait `zero_ui::prelude::IntoVar<u32>` is not implemented for `bool`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
= help: the following other types implement trait `zero_ui::prelude::IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `simple_type::simple_b`
|
||||
--> cases/widget_new/incorrect_arg_type6.rs:5:84
|
||||
note: required by a bound in `simple_type_inputs__::simple_b`
|
||||
--> cases/widget_new/incorrect_arg_type6.rs:4:84
|
||||
|
|
||||
5 | pub fn simple_type(child: impl UiNode, simple_a: impl IntoVar<u32>, simple_b: impl IntoVar<u32>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^ required by this bound in `simple_type::simple_b`
|
||||
4 | pub fn simple_type(child: impl UiNode, simple_a: impl IntoVar<u32>, simple_b: impl IntoVar<u32>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^ required by this bound in `simple_type_inputs__::simple_b`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0308]: mismatched types
|
||||
--> cases/widget_new/incorrect_when_expr_type1.rs:11:14
|
||||
|
|
||||
11 | when *#margin {
|
||||
| ^^^^^^^^ expected `bool`, found struct `SideOffsets`
|
||||
--> cases/widget_new/incorrect_when_expr_type1.rs:9:14
|
||||
|
|
||||
9 | when *#margin {
|
||||
| ^^^^^^^^ expected `bool`, found struct `SideOffsets`
|
||||
|
|
|
@ -1,19 +1,5 @@
|
|||
error[E0277]: the trait bound `(): IntoVar<SideOffsets>` is not satisfied
|
||||
--> cases/widget_new/malformed_fields1.rs:6:13
|
||||
|
|
||||
6 | let _ = Wgt! {
|
||||
| ______________^
|
||||
7 | |/ margin = {
|
||||
8 | || margin: 0;
|
||||
| ||__________________- required by a bound introduced by this call
|
||||
9 | | };
|
||||
10 | | };
|
||||
| |______^ the trait `IntoVar<SideOffsets>` is not implemented for `()`
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `margin::margin`
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `margin::margin`
|
||||
error: expected one of `)`, `,`, `.`, `?`, or an operator, found `;`
|
||||
--> cases/widget_new/malformed_fields1.rs:7:22
|
||||
|
|
||||
7 | margin: 0;
|
||||
| ^ expected one of `)`, `,`, `.`, `?`, or an operator
|
||||
|
|
|
@ -1,19 +1,22 @@
|
|||
error[E0277]: the trait bound `(): IntoVar<SideOffsets>` is not satisfied
|
||||
--> cases/widget_new/malformed_fields2.rs:6:13
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/malformed_fields2.rs:7:13
|
||||
|
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | margin = {
|
||||
7 | | margin:
|
||||
| | ^^^^^^
|
||||
8 | | };
|
||||
9 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
6 | let _ = Wgt! {
|
||||
| ______________^
|
||||
7 | |/ margin = {
|
||||
8 | || margin:
|
||||
| ||__________________- required by a bound introduced by this call
|
||||
9 | | };
|
||||
10 | | };
|
||||
| |______^ the trait `IntoVar<SideOffsets>` is not implemented for `()`
|
||||
| margin(/* margin */)
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `margin::margin`
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `margin::margin`
|
||||
|
|
|
@ -1,24 +1,11 @@
|
|||
error: macro expansion ignores token `compile_error` and any following
|
||||
--> cases/widget_new/malformed_property_attribute.rs:7:11
|
||||
|
|
||||
5 | let _w = Button! {
|
||||
| ______________-
|
||||
6 | | #![allow(inner_attribute)]
|
||||
7 | | #[!foo]
|
||||
| | ^
|
||||
8 | | margin = 10;
|
||||
9 | | };
|
||||
| |_____- caused by the macro expansion here
|
||||
|
|
||||
= note: the usage of `zero_ui::core::widget_new!` is likely invalid in expression context
|
||||
help: you might be missing a semicolon here
|
||||
--> $WORKSPACE/zero-ui/src/widgets/button.rs
|
||||
|
|
||||
| #[widget($crate::widgets::Button)];
|
||||
| +
|
||||
|
||||
error: expected square brackets
|
||||
--> cases/widget_new/malformed_property_attribute.rs:6:10
|
||||
|
|
||||
6 | #![allow(inner_attribute)]
|
||||
| ^
|
||||
|
||||
error: expected identifier
|
||||
--> cases/widget_new/malformed_property_attribute.rs:7:11
|
||||
|
|
||||
7 | #[!foo]
|
||||
| ^
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
error: expected property or when
|
||||
error: expected identifier, found keyword `_`
|
||||
--> cases/widget_new/malformed_property_path1.rs:6:9
|
||||
|
|
||||
6 | _ = 0;
|
||||
|
|
|
@ -3,11 +3,3 @@ error: expected `=`
|
|||
|
|
||||
6 | margin! = 0;
|
||||
| ^
|
||||
|
||||
warning: unused import: `properties::margin`
|
||||
--> cases/widget_new/malformed_property_path2.rs:1:15
|
||||
|
|
||||
1 | use zero_ui::{properties::margin, widgets::wgt};
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
|
|
@ -4,13 +4,8 @@ error: expected `;`
|
|||
6 | zero_ui::properties:margin = 0;
|
||||
| ^
|
||||
|
||||
error[E0433]: failed to resolve: use of undeclared crate or module `margin`
|
||||
--> cases/widget_new/malformed_property_path3.rs:6:29
|
||||
error: missing value
|
||||
--> cases/widget_new/malformed_property_path3.rs:6:18
|
||||
|
|
||||
6 | zero_ui::properties:margin = 0;
|
||||
| ^^^^^^ use of undeclared crate or module `margin`
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
1 | use zero_ui::prelude::margin;
|
||||
|
|
||||
| ^^^^^^^^^^
|
||||
|
|
|
@ -1,19 +1,21 @@
|
|||
error[E0061]: this function takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_arg1.rs:8:9
|
||||
error[E0061]: this method takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_arg1.rs:6:9
|
||||
|
|
||||
8 | background_gradient = 0.deg(), ;
|
||||
| ^^^^^^^^^^^^^^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | background_gradient = 0.deg(), ;
|
||||
| | ^^^^^^^^^^^^^^^^^^^
|
||||
7 | | margin = 0;
|
||||
8 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| / #[property(FILL, default(0.deg(), {
|
||||
| | let c = colors::BLACK.transparent();
|
||||
| | crate::core::gradient::stops![c, c]
|
||||
| | }))]
|
||||
| |____^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
help: provide the argument
|
||||
--> |$WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| background_gradient(0.deg(), /* stops */)
|
||||
|
|
||||
8 | background_gradient(#[crate::core::widget($crate::widgets::wgt)], /* stops */) = 0.deg(), ;
|
||||
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
|
@ -1,40 +1,39 @@
|
|||
error[E0277]: the trait bound `(): IntoVar<LinearGradientAxis>` is not satisfied
|
||||
--> cases/widget_new/missing_field_all_multi.rs:6:13
|
||||
|
|
||||
6 | let _ = Wgt! {
|
||||
| _____________^
|
||||
7 | | // background_gradient has two fields
|
||||
8 | | // this is interpreted as an unnamed assign `{ }` is the value
|
||||
9 | | // and the second value is missing
|
||||
10 | | background_gradient = { }
|
||||
| | ------------------- required by a bound introduced by this call
|
||||
11 | | };
|
||||
| |_____^ the trait `IntoVar<LinearGradientAxis>` is not implemented for `()`
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
--> cases/widget_new/missing_field_all_multi.rs:9:31
|
||||
|
|
||||
9 | background_gradient = { }
|
||||
| ------------------- ^^^ the trait `IntoVar<LinearGradientAxis>` is not implemented for `()`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `background_gradient::__new__`
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `background_gradient::__new__`
|
||||
note: required by a bound in `zero_ui::properties::background_gradient::background_gradient`
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `background_gradient::background_gradient`
|
||||
|
||||
error[E0061]: this function takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_field_all_multi.rs:10:9
|
||||
error[E0061]: this method takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_field_all_multi.rs:9:9
|
||||
|
|
||||
10 | background_gradient = { }
|
||||
| ^^^^^^^^^^^^^^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | // background_gradient has two fields
|
||||
7 | | // this is interpreted as an unnamed assign `{ }` is the value
|
||||
8 | | // and the second value is missing
|
||||
9 | | background_gradient = { }
|
||||
| | ^^^^^^^^^^^^^^^^^^^
|
||||
10 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| / #[property(FILL, default(0.deg(), {
|
||||
| | let c = colors::BLACK.transparent();
|
||||
| | crate::core::gradient::stops![c, c]
|
||||
| | }))]
|
||||
| |____^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
help: provide the argument
|
||||
--> |$WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| background_gradient({ }, /* stops */)
|
||||
|
|
||||
10 | background_gradient(#[crate::core::widget($crate::widgets::wgt)], /* stops */) = { }
|
||||
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
error[E0277]: the trait bound `(): IntoVar<SideOffsets>` is not satisfied
|
||||
--> cases/widget_new/missing_field_all_single.rs:6:13
|
||||
|
|
||||
6 | let _ = Wgt! {
|
||||
| _____________^
|
||||
7 | | // margin has one field
|
||||
8 | | // this is interpreted as an unnamed assign `{ }` is the value
|
||||
9 | | margin = { }
|
||||
| | ------ required by a bound introduced by this call
|
||||
10 | | };
|
||||
| |_____^ the trait `IntoVar<SideOffsets>` is not implemented for `()`
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
--> cases/widget_new/missing_field_all_single.rs:8:18
|
||||
|
|
||||
8 | margin = { }
|
||||
| ------ ^^^ the trait `IntoVar<SideOffsets>` is not implemented for `()`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `margin::__new__`
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `margin::__new__`
|
||||
note: required by a bound in `zero_ui::properties::margin::margin`
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `margin::margin`
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
error[E0061]: this function takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_field_multi.rs:11:9
|
||||
error[E0061]: this method takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_field_multi.rs:9:9
|
||||
|
|
||||
11 | background_gradient = {
|
||||
| ^^^^^^^^^^^^^^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | // background_gradient has two fields
|
||||
7 | | // the error highlights the property
|
||||
8 | | // in a struct initializer the struct name is highlighted
|
||||
9 | | background_gradient = {
|
||||
| | ^^^^^^^^^^^^^^^^^^^
|
||||
10 | | axis: 0.deg(),
|
||||
11 | | }
|
||||
12 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
@ -14,6 +23,7 @@ note: associated function defined here
|
|||
| |____^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: provide the argument
|
||||
--> |$WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| background_gradient(axis, /* stops */)
|
||||
|
|
||||
11 | background_gradient(axis, /* stops */) = {
|
||||
| +++++++++++++++++++
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: expected `;`
|
||||
--> cases/widget_new/missing_semi1.rs:10:9
|
||||
|
|
||||
10 | enabled = true;
|
||||
| ^^^^^^^
|
||||
--> cases/widget_new/missing_semi1.rs:8:9
|
||||
|
|
||||
8 | enabled = true;
|
||||
| ^^^^^^^
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: expected `;`
|
||||
--> cases/widget_new/missing_semi2.rs:11:9
|
||||
|
|
||||
11 | enabled = true;
|
||||
| ^^^^^^^
|
||||
--> cases/widget_new/missing_semi2.rs:9:9
|
||||
|
|
||||
9 | enabled = true;
|
||||
| ^^^^^^^
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: expected `;`
|
||||
--> cases/widget_new/missing_semi_before_when1.rs:8:9
|
||||
--> cases/widget_new/missing_semi_before_when1.rs:7:9
|
||||
|
|
||||
8 | when *#is_pressed {
|
||||
7 | when *#is_pressed {
|
||||
| ^^^^
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: expected `,`
|
||||
--> cases/widget_new/missing_semi_in_when1.rs:12:13
|
||||
--> cases/widget_new/missing_semi_in_when1.rs:10:13
|
||||
|
|
||||
12 | cursor = CursorIcon::Hand;
|
||||
10 | cursor = CursorIcon::Hand;
|
||||
| ^^^^^^
|
||||
|
|
|
@ -1,22 +1,31 @@
|
|||
error: expected `,`
|
||||
--> cases/widget_new/missing_semi_in_when2.rs:12:13
|
||||
--> cases/widget_new/missing_semi_in_when2.rs:10:13
|
||||
|
|
||||
12 | cursor = CursorIcon::Hand;
|
||||
10 | cursor = CursorIcon::Hand;
|
||||
| ^^^^^^
|
||||
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_semi_in_when2.rs:11:13
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_semi_in_when2.rs:9:13
|
||||
|
|
||||
11 | margin =
|
||||
| ^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | margin = 0;
|
||||
7 | | cursor = CursorIcon::Default;
|
||||
8 | | when *#is_pressed {
|
||||
9 | | margin =
|
||||
| | ^^^^^^
|
||||
10 | | cursor = CursorIcon::Hand;
|
||||
11 | | }
|
||||
12 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| #[property(LAYOUT, default(0))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| margin(/* margin */)
|
||||
|
|
||||
11 | margin(/* margin */) =
|
||||
| ++++++++++++++
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value1.rs:7:9
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value1.rs:6:9
|
||||
|
|
||||
7 | margin = ;
|
||||
| ^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | margin = ;
|
||||
| | ^^^^^^
|
||||
7 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| #[property(LAYOUT, default(0))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| margin(/* margin */)
|
||||
|
|
||||
7 | margin(/* margin */) = ;
|
||||
| ++++++++++++++
|
||||
|
|
|
@ -1,16 +1,20 @@
|
|||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value2.rs:7:9
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value2.rs:6:9
|
||||
|
|
||||
7 | margin =
|
||||
| ^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | margin =
|
||||
| | ^^^^^^
|
||||
7 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| #[property(LAYOUT, default(0))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| margin(/* margin */)
|
||||
|
|
||||
7 | margin(/* margin */) =
|
||||
| ++++++++++++++
|
||||
|
|
|
@ -1,16 +1,23 @@
|
|||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value3.rs:8:9
|
||||
|
|
||||
8 | cursor = ;
|
||||
| ^^^^^^ an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/mouse.rs
|
||||
|
|
||||
| #[property(CONTEXT, default(CursorIcon::Default))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: provide the argument
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value3.rs:7:9
|
||||
|
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | // we expected an error here.
|
||||
7 | | cursor = ;
|
||||
| | ^^^^^^
|
||||
8 | | // we expect margin to be used here.
|
||||
9 | | margin = 0;
|
||||
10 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/mouse.rs
|
||||
|
|
||||
| pub fn cursor(child: impl UiNode, cursor: impl IntoVar<Option<CursorIcon>>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| cursor(/* cursor */)
|
||||
|
|
||||
8 | cursor(/* cursor */) = ;
|
||||
| ++++++++++++++
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
error: expected `;`
|
||||
--> cases/widget_new/missing_value4.rs:9:9
|
||||
--> cases/widget_new/missing_value4.rs:8:9
|
||||
|
|
||||
9 | margin = 0;
|
||||
8 | margin = 0;
|
||||
| ^^^^^^
|
||||
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value4.rs:7:9
|
||||
|
|
||||
7 | cursor =
|
||||
| ^^^^^^ an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/mouse.rs
|
||||
|
|
||||
| #[property(CONTEXT, default(CursorIcon::Default))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: provide the argument
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value4.rs:6:9
|
||||
|
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | cursor =
|
||||
| | ^^^^^^
|
||||
7 | | // we expect these properties to be used.
|
||||
8 | | margin = 0;
|
||||
9 | | enabled = true;
|
||||
10 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/mouse.rs
|
||||
|
|
||||
| pub fn cursor(child: impl UiNode, cursor: impl IntoVar<Option<CursorIcon>>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| cursor(/* cursor */)
|
||||
|
|
||||
7 | cursor(/* cursor */) =
|
||||
| ++++++++++++++
|
||||
|
|
|
@ -1,25 +1,28 @@
|
|||
error: expected expression, found `)`
|
||||
--> cases/widget_new/missing_value5.rs:7:9
|
||||
|
|
||||
7 | cursor =
|
||||
| ^^^^^^ expected expression
|
||||
--> cases/widget_new/missing_value5.rs:5:13
|
||||
|
|
||||
5 | let _ = Wgt! {
|
||||
| _____________^
|
||||
6 | | cursor =
|
||||
7 | | #[allow(unused_imports)]
|
||||
8 | | margin = {
|
||||
... |
|
||||
11 | | }
|
||||
12 | | };
|
||||
| |_____^ expected expression
|
||||
|
|
||||
= note: this error originates in the macro `zero_ui::core::widget_new` which comes from the expansion of the macro `Wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: expected `;`
|
||||
--> cases/widget_new/missing_value5.rs:9:9
|
||||
--> cases/widget_new/missing_value5.rs:8:9
|
||||
|
|
||||
9 | margin = {
|
||||
8 | margin = {
|
||||
| ^^^^^^
|
||||
|
||||
warning: unused import: `cursor`
|
||||
--> cases/widget_new/missing_value5.rs:1:27
|
||||
warning: unused import: `zero_ui::core::units::PxPoint`
|
||||
--> cases/widget_new/missing_value5.rs:9:17
|
||||
|
|
||||
1 | use zero_ui::properties::{cursor, margin};
|
||||
| ^^^^^^
|
||||
9 | use zero_ui::core::units::PxPoint;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
||||
warning: unused import: `zero_ui::core::units::PxPoint`
|
||||
--> cases/widget_new/missing_value5.rs:10:17
|
||||
|
|
||||
10 | use zero_ui::core::units::PxPoint;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,25 +1,27 @@
|
|||
error: expected `;`
|
||||
--> cases/widget_new/missing_value6.rs:9:9
|
||||
--> cases/widget_new/missing_value6.rs:7:9
|
||||
|
|
||||
9 | margin = 0;
|
||||
7 | margin = 0;
|
||||
| ^^^^^^
|
||||
|
||||
error[E0061]: this function takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_value6.rs:8:9
|
||||
error[E0061]: this method takes 2 arguments but 1 argument was supplied
|
||||
--> cases/widget_new/missing_value6.rs:6:9
|
||||
|
|
||||
8 | background_gradient = 0.deg(),
|
||||
| ^^^^^^^^^^^^^^^^^^^ an argument is missing
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | background_gradient = 0.deg(),
|
||||
| | ^^^^^^^^^^^^^^^^^^^
|
||||
7 | | margin = 0;
|
||||
8 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/visual.rs
|
||||
|
|
||||
| / #[property(FILL, default(0.deg(), {
|
||||
| | let c = colors::BLACK.transparent();
|
||||
| | crate::core::gradient::stops![c, c]
|
||||
| | }))]
|
||||
| |____^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
| pub fn background_gradient(child: impl UiNode, axis: impl IntoVar<LinearGradientAxis>, stops: impl IntoVar<GradientStops>) -> impl UiNode {
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
help: provide the argument
|
||||
--> |$WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| background_gradient(0.deg(), /* stops */)
|
||||
|
|
||||
8 | background_gradient(#[crate::core::widget($crate::widgets::wgt)], /* stops */) = 0.deg(),
|
||||
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
|
@ -1,22 +1,29 @@
|
|||
error: expected `;`
|
||||
--> cases/widget_new/missing_value_before_when1.rs:8:9
|
||||
|
|
||||
8 | when *#is_pressed {
|
||||
| ^^^^
|
||||
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value_before_when1.rs:7:9
|
||||
|
|
||||
7 | margin = // missing 0; here
|
||||
| ^^^^^^ an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| #[property(LAYOUT, default(0))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: this error originates in the attribute macro `property` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
help: provide the argument
|
||||
7 | when *#is_pressed {
|
||||
| ^^^^
|
||||
|
||||
error[E0061]: this method takes 1 argument but 0 arguments were supplied
|
||||
--> cases/widget_new/missing_value_before_when1.rs:6:9
|
||||
|
|
||||
5 | let _ = Wgt! {
|
||||
| _____________-
|
||||
6 | | margin = // missing 0; here
|
||||
| | ^^^^^^
|
||||
7 | | when *#is_pressed {
|
||||
8 | | margin = 20;
|
||||
9 | | }
|
||||
10 | | };
|
||||
| |_____- an argument is missing
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $WORKSPACE/zero-ui/src/properties/layout.rs
|
||||
|
|
||||
| pub fn margin(child: impl UiNode, margin: impl IntoVar<SideOffsets>) -> impl UiNode {
|
||||
| ^^^^^^
|
||||
help: provide the argument
|
||||
--> $WORKSPACE/zero-ui/src/widgets.rs
|
||||
|
|
||||
| margin(/* margin */)
|
||||
|
|
||||
7 | margin(/* margin */) = // missing 0; here
|
||||
| ++++++++++++++
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
warning: unused variable: `node`
|
||||
--> cases/widget_new/not_allowed_in_when1.rs:16:17
|
||||
error[E0599]: no method named `allowed_in_when_expr` found for struct `foo_meta__` in the current scope
|
||||
--> cases/widget_new/not_allowed_in_when1.rs:11:13
|
||||
|
|
||||
16 | let node = #foo;
|
||||
| ^^^^ help: if this is intentional, prefix it with an underscore: `_node`
|
||||
|
|
||||
= note: `#[warn(unused_variables)]` on by default
|
||||
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> cases/widget_new/not_allowed_in_when1.rs:13:13
|
||||
|
|
||||
13 | let _ = Wgt! {
|
||||
3 | #[property(CONTEXT)]
|
||||
| -------------------- method `allowed_in_when_expr` not found for this struct
|
||||
...
|
||||
11 | let _ = Wgt! {
|
||||
| _____________^
|
||||
14 | | margin = 0;
|
||||
15 | | when {
|
||||
16 | | let node = #foo;
|
||||
12 | | margin = 0;
|
||||
13 | | when {
|
||||
14 | | let node = #foo;
|
||||
... |
|
||||
20 | | }
|
||||
21 | | };
|
||||
| |_____^ the evaluated program panicked at 'property `foo` cannot be read in when expr', $DIR/cases/widget_new/not_allowed_in_when1.rs:13:13
|
||||
18 | | }
|
||||
19 | | };
|
||||
| |_____^ help: there is a method with a similar name: `allowed_in_when_assign`
|
||||
|
|
||||
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `zero_ui::core::widget_new` which comes from the expansion of the macro `Wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
error[E0080]: evaluation of constant value failed
|
||||
--> cases/widget_new/not_allowed_in_when2.rs:19:13
|
||||
error[E0599]: no method named `allowed_in_when_assign` found for struct `foo_meta__` in the current scope
|
||||
--> cases/widget_new/not_allowed_in_when2.rs:13:13
|
||||
|
|
||||
19 | foo = true;
|
||||
| ^^^ the evaluated program panicked at 'property `foo` cannot be assigned in when', $DIR/cases/widget_new/not_allowed_in_when2.rs:19:13
|
||||
5 | #[property(CONTEXT)]
|
||||
| -------------------- method `allowed_in_when_assign` not found for this struct
|
||||
...
|
||||
13 | let _ = Wgt! {
|
||||
| _____________^
|
||||
14 | | foo = false;
|
||||
15 | | margin = 0;
|
||||
16 | |
|
||||
... |
|
||||
20 | | }
|
||||
21 | | };
|
||||
| |_____^ help: there is a method with a similar name: `allowed_in_when_expr`
|
||||
|
|
||||
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `zero_ui::core::widget_new` which comes from the expansion of the macro `Wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
|
@ -2,15 +2,11 @@ error[E0283]: type annotations needed
|
|||
--> cases/widget_new/property_generic1.rs:7:9
|
||||
|
|
||||
7 | value = 0;
|
||||
| ^^^^^ cannot infer type of the type parameter `T` declared on the struct `value`
|
||||
| ^^^^^ cannot infer type for type parameter `T` declared on the associated function `value`
|
||||
|
|
||||
= note: cannot satisfy `_: VarValue`
|
||||
note: required by a bound in `zero_ui::widgets::toggle::value::<T>::__new__`
|
||||
--> $WORKSPACE/zero-ui/src/widgets/toggle_wgt.rs
|
||||
note: required by a bound in `zero_ui::widgets::Toggle::value`
|
||||
--> $WORKSPACE/zero-ui/src/widgets/toggle.rs
|
||||
|
|
||||
| pub fn value<T: VarValue + PartialEq>(child: impl UiNode, value: impl IntoVar<T>) -> impl UiNode {
|
||||
| ^^^^^^^^ required by this bound in `value::<T>::__new__`
|
||||
help: consider specifying the generic argument
|
||||
|
|
||||
7 | value::<T> = 0;
|
||||
| +++++
|
||||
| pub fn value<T: VarValue + PartialEq>(child: impl UiNode, value: impl IntoVar<T>) -> impl UiNode {
|
||||
| ^^^^^^^^ required by this bound in `Toggle::value`
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
error[E0277]: the trait bound `{integer}: IntoVar<bool>` is not satisfied
|
||||
--> cases/widget_new/property_generic2.rs:7:23
|
||||
--> cases/widget_new/property_generic2.rs:7:25
|
||||
|
|
||||
7 | value::<bool> = 0;
|
||||
| ----- ^ the trait `IntoVar<bool>` is not implemented for `{integer}`
|
||||
| ----- ^ the trait `IntoVar<bool>` is not implemented for `{integer}`
|
||||
| |
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
= help: the following other types implement trait `IntoVar<T>`:
|
||||
<implementers-list>
|
||||
note: required by a bound in `zero_ui::widgets::toggle::value::<T>::__new__`
|
||||
--> $WORKSPACE/zero-ui/src/widgets/toggle_wgt.rs
|
||||
note: required by a bound in `zero_ui::widgets::Toggle::value`
|
||||
--> $WORKSPACE/zero-ui/src/widgets/toggle.rs
|
||||
|
|
||||
| pub fn value<T: VarValue + PartialEq>(child: impl UiNode, value: impl IntoVar<T>) -> impl UiNode {
|
||||
| ^^^^^^^^^^ required by this bound in `value::<T>::__new__`
|
||||
| pub fn value<T: VarValue + PartialEq>(child: impl UiNode, value: impl IntoVar<T>) -> impl UiNode {
|
||||
| ^^^^^^^^^^ required by this bound in `Toggle::value`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0599]: no function or associated item named `unknown` found for struct `margin` in the current scope
|
||||
--> cases/widget_new/unknown_field.rs:8:13
|
||||
error[E0599]: no method named `unknown` found for struct `margin_inputs__` in the current scope
|
||||
--> cases/widget_new/unknown_field.rs:7:13
|
||||
|
|
||||
8 | unknown: 0,
|
||||
| ^^^^^^^ function or associated item not found in `margin`
|
||||
7 | unknown: 0,
|
||||
| ^^^^^^^ method not found in `margin_inputs__`
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
error[E0599]: no associated item named `__w_1__` found for struct `is_pressed` in the current scope
|
||||
--> cases/widget_new/unknown_member_in_when_expr1.rs:8:16
|
||||
error[E0599]: no method named `__w_1__` found for struct `is_pressed_inputs__` in the current scope
|
||||
--> cases/widget_new/unknown_member_in_when_expr1.rs:7:16
|
||||
|
|
||||
8 | when *#is_pressed.1 { // only .0 or .state allowed.
|
||||
| ^^^^^^^^^^
|
||||
| |
|
||||
| associated item not found in `is_pressed`
|
||||
| help: there is an associated function with a similar name: `__w_0__`
|
||||
7 | when *#is_pressed.1 { // only .0 or .state allowed.
|
||||
| ^^^^^^^^^^ help: there is a method with a similar name: `__w_0__`
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
error[E0599]: no associated item named `__w_unknown__` found for struct `is_pressed` in the current scope
|
||||
--> cases/widget_new/unknown_member_in_when_expr2.rs:8:16
|
||||
error[E0599]: no method named `__w_unknown__` found for struct `is_pressed_inputs__` in the current scope
|
||||
--> cases/widget_new/unknown_member_in_when_expr2.rs:7:16
|
||||
|
|
||||
8 | when *#is_pressed.unknown { // only .0 or .state allowed.
|
||||
| ^^^^^^^^^^
|
||||
| |
|
||||
| associated item not found in `is_pressed`
|
||||
| help: there is an associated function with a similar name: `__new__`
|
||||
7 | when *#is_pressed.unknown { // only .0 or .state allowed.
|
||||
| ^^^^^^^^^^ help: there is a method with a similar name: `__w_0__`
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0433]: failed to resolve: use of undeclared crate or module `unknown`
|
||||
error[E0599]: no method named `unknown` found for mutable reference `&mut Wgt` in the current scope
|
||||
--> cases/widget_new/unknown_property1.rs:6:9
|
||||
|
|
||||
6 | unknown = 0;
|
||||
| ^^^^^^^ use of undeclared crate or module `unknown`
|
||||
| ^^^^^^^ method not found in `&mut Wgt`
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
error[E0433]: failed to resolve: use of undeclared crate or module `unknown`
|
||||
error[E0599]: no method named `unknown_meta__` found for mutable reference `&mut Wgt` in the current scope
|
||||
--> cases/widget_new/unknown_property2.rs:6:9
|
||||
|
|
||||
6 | unknown = {
|
||||
| ^^^^^^^ use of undeclared crate or module `unknown`
|
||||
| ^^^^^^^ method not found in `&mut Wgt`
|
||||
|
||||
error[E0599]: no method named `unknown_sorted__` found for mutable reference `&mut Wgt` in the current scope
|
||||
--> cases/widget_new/unknown_property2.rs:6:9
|
||||
|
|
||||
6 | unknown = {
|
||||
| ^^^^^^^ help: there is a method with a similar name: `id_sorted__`
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
error: unknown special value, expected `unset!`
|
||||
--> cases/widget_new/unknown_special_value.rs:7:18
|
||||
--> cases/widget_new/unknown_special_value.rs:6:18
|
||||
|
|
||||
7 | margin = foo!;
|
||||
6 | margin = foo!;
|
||||
| ^^^
|
||||
|
||||
warning: unused import: `zero_ui::properties::margin`
|
||||
--> cases/widget_new/unknown_special_value.rs:1:5
|
||||
|
|
||||
1 | use zero_ui::properties::margin;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
error: unexpected token
|
||||
--> cases/widget_new/unknown_special_value_in_when.rs:9:25
|
||||
--> cases/widget_new/unknown_special_value_in_when.rs:8:25
|
||||
|
|
||||
9 | margin = foo!;
|
||||
8 | margin = foo!;
|
||||
| ^
|
||||
|
||||
warning: unused imports: `margin`, `states::is_pressed`
|
||||
--> cases/widget_new/unknown_special_value_in_when.rs:1:27
|
||||
|
|
||||
1 | use zero_ui::properties::{margin, states::is_pressed};
|
||||
| ^^^^^^ ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
error: expected a when block expr and properties
|
||||
--> cases/widget_new/when_missing_block.rs:7:16
|
||||
--> cases/widget_new/when_missing_block.rs:6:16
|
||||
|
|
||||
7 | when *#is_pressed
|
||||
6 | when *#is_pressed
|
||||
| ^^^^^^^^^^
|
||||
|
||||
warning: unused import: `zero_ui::properties::states::is_pressed`
|
||||
--> cases/widget_new/when_missing_block.rs:1:5
|
||||
|
|
||||
1 | use zero_ui::properties::states::is_pressed;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` on by default
|
||||
|
|
|
@ -7,4 +7,4 @@ error: expected when expression
|
|||
7 | | };
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
= note: this error originates in the macro `Wgt` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
|
Loading…
Reference in New Issue