diff --git a/packages/yew-macro/tests/hook_attr/hook-dynamic-dispatch-pass.rs b/packages/yew-macro/tests/hook_attr/hook-dynamic-dispatch-pass.rs index f03f6d60fb0..ae045161536 100644 --- a/packages/yew-macro/tests/hook_attr/hook-dynamic-dispatch-pass.rs +++ b/packages/yew-macro/tests/hook_attr/hook-dynamic-dispatch-pass.rs @@ -1,8 +1,8 @@ -use yew::prelude::*; +#![no_implicit_prelude] -#[hook] -fn use_boxed_fn(_f: Box &str>) { - todo!() +#[::yew::prelude::hook] +fn use_boxed_fn(_f: ::std::boxed::Box &str>) { + ::std::todo!() } fn main() {} diff --git a/packages/yew-macro/tests/hook_attr/hook-return-impl-trait-pass.rs b/packages/yew-macro/tests/hook_attr/hook-return-impl-trait-pass.rs index d8cdcf0231d..93da94e6041 100644 --- a/packages/yew-macro/tests/hook_attr/hook-return-impl-trait-pass.rs +++ b/packages/yew-macro/tests/hook_attr/hook-return-impl-trait-pass.rs @@ -1,11 +1,8 @@ -use std::ops::Deref; -use std::rc::Rc; +#![no_implicit_prelude] -use yew::prelude::*; - -#[hook] -fn use_deref_as_u32() -> impl Deref { - Rc::new(0) +#[::yew::prelude::hook] +fn use_deref_as_u32() -> impl ::std::ops::Deref { + ::std::rc::Rc::new(0) } fn main() {} diff --git a/packages/yew-macro/tests/hook_attr/hook-return-ref-pass.rs b/packages/yew-macro/tests/hook_attr/hook-return-ref-pass.rs index caa97a6577f..01022da3806 100644 --- a/packages/yew-macro/tests/hook_attr/hook-return-ref-pass.rs +++ b/packages/yew-macro/tests/hook_attr/hook-return-ref-pass.rs @@ -1,7 +1,7 @@ -use yew::prelude::*; +#![no_implicit_prelude] -#[hook] -fn use_str_ref(f: &str) -> &str { +#[::yew::prelude::hook] +fn use_str_ref(f: &::std::primitive::str) -> &::std::primitive::str { f }