From 4ad2b712ae633d20b03825f63afde9f2cebd17ac Mon Sep 17 00:00:00 2001 From: Kaede Hoshikawa Date: Fri, 15 Apr 2022 23:36:25 +0900 Subject: [PATCH] no implicit prelude. --- .../tests/hook_attr/hook-dynamic-dispatch-pass.rs | 8 ++++---- .../tests/hook_attr/hook-return-impl-trait-pass.rs | 11 ++++------- .../yew-macro/tests/hook_attr/hook-return-ref-pass.rs | 6 +++--- 3 files changed, 11 insertions(+), 14 deletions(-) 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 }