Fixed property build tests.
This commit is contained in:
parent
23a535ab11
commit
afd88bfe75
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn no_inputs(child: impl UiNode) -> impl UiNode {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use zero_ui::core::{property, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn no_args() -> impl UiNode {
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn invalid<'a>(child: impl UiNode, input: &'a str) -> impl UiNode {
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
use zero_ui::core::{
|
||||
property,
|
||||
var::*,
|
||||
widget_instance::{NilUiNode, UiNode},
|
||||
};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, NilUiNode, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn invalid_child(child: NilUiNode, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: property input can only have `impl OneTrait` types
|
||||
--> cases/property/child_type_constraints_ui_node.rs:8:29
|
||||
--> cases/property/child_type_constraints_ui_node.rs:4:29
|
||||
|
|
||||
8 | pub fn invalid_child(child: NilUiNode, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
4 | pub fn invalid_child(child: NilUiNode, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
| ^^^^^^^^^
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
use zero_ui::core::{
|
||||
property,
|
||||
var::*,
|
||||
widget_instance::{NilUiNode, UiNode},
|
||||
};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, NilUiNode, UiNode};
|
||||
|
||||
struct NotUiNode;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: property input can only have `impl OneTrait` types
|
||||
--> cases/property/child_type_is_not_ui_node.rs:10:29
|
||||
|
|
||||
10 | pub fn invalid_child(child: NotUiNode, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
| ^^^^^^^^^
|
||||
--> cases/property/child_type_is_not_ui_node.rs:6:29
|
||||
|
|
||||
6 | pub fn invalid_child(child: NotUiNode, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
| ^^^^^^^^^
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
#[property(CONTEXT, default)]
|
||||
pub fn missing_default_parethesis(child: impl UiNode, a: impl IntoVar<bool>, b: impl IntoVar<u32>) -> impl UiNode {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, UiNode};
|
||||
|
||||
#[property(CONTEXT, unknown = true)]
|
||||
fn unknown_arg(child: impl UiNode, input: bool) -> impl UiNode {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// FunctionQualifiers: https://doc.rust-lang.org/reference/items/functions.html
|
||||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub async fn invalid_async(child: impl UiNode, _input: impl IntoVar<u32>) -> impl UiNode {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn invalid_destruct(child: impl UiNode, (a, b): (bool, u8)) -> impl UiNode {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
#[property(invalid)]
|
||||
pub fn invalid_priority(child: impl UiNode, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
|
|
|
@ -10,5 +10,5 @@ help: consider importing one of these items
|
|||
|
|
||||
1 + use std::ptr::invalid;
|
||||
|
|
||||
1 + use zero_ui::prelude::access::invalid;
|
||||
1 + use zero_ui::access::invalid;
|
||||
|
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
use zero_ui::core::{
|
||||
property,
|
||||
var::IntoVar,
|
||||
widget_instance::{NilUiNode, UiNode},
|
||||
};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, NilUiNode, UiNode};
|
||||
|
||||
struct Foo;
|
||||
impl Foo {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
error: methods cannot be properties
|
||||
--> cases/property/method_cannot_be_property.rs:10:25
|
||||
|
|
||||
10 | pub fn self_method1(self, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
| ^^^^
|
||||
--> cases/property/method_cannot_be_property.rs:6:25
|
||||
|
|
||||
6 | pub fn self_method1(self, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
| ^^^^
|
||||
|
||||
error: methods cannot be properties
|
||||
--> cases/property/method_cannot_be_property.rs:16:25
|
||||
--> cases/property/method_cannot_be_property.rs:12:25
|
||||
|
|
||||
16 | pub fn self_method2(self: Box<Self>, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
12 | pub fn self_method2(self: Box<Self>, input: impl IntoVar<bool>) -> impl UiNode {
|
||||
| ^^^^
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn get_state(child: impl UiNode, state: impl IntoVar<u32>) -> impl UiNode {
|
||||
let _ = state;
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn get_state_invalid(child: impl UiNode, state: impl IntoVar<NotDefault>) -> impl UiNode {
|
||||
let _ = state;
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn has_state(child: impl UiNode, state: impl IntoVar<bool>) -> impl UiNode {
|
||||
let _ = (child, state);
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn has_state_invalid(child: impl UiNode, state: impl IntoVar<u32>) -> impl UiNode {
|
||||
let _ = (child, state);
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn is_state(child: impl UiNode, state: impl IntoVar<bool>) -> impl UiNode {
|
||||
let _ = (child, state);
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub fn is_state_invalid(child: impl UiNode, state: impl IntoVar<u32>) -> impl UiNode {
|
||||
let _ = (child, state);
|
||||
zero_ui::core::widget_instance::NilUiNode
|
||||
zero_ui::wgt_prelude::NilUiNode
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::property;
|
||||
use zero_ui::wgt_prelude::property;
|
||||
|
||||
#[property(CONTEXT)]
|
||||
pub struct Foo {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use zero_ui::core::{property, var::IntoVar, widget_instance::UiNode};
|
||||
use zero_ui::wgt_prelude::{property, IntoVar, UiNode};
|
||||
|
||||
pub struct NotUiNode;
|
||||
|
||||
|
|
Loading…
Reference in New Issue