mc1098 4c6da9aab3
Add fully qualified primitives in proc macro (#2037)
* Add primitive shadowing in macro tests

* Fix primitive types to be fully qualified
2021-09-07 09:40:09 +02:00

60 lines
1.4 KiB
Rust

#![no_implicit_prelude]
// Shadow primitives
#[allow(non_camel_case_types)]
pub struct bool;
#[allow(non_camel_case_types)]
pub struct char;
#[allow(non_camel_case_types)]
pub struct f32;
#[allow(non_camel_case_types)]
pub struct f64;
#[allow(non_camel_case_types)]
pub struct i128;
#[allow(non_camel_case_types)]
pub struct i16;
#[allow(non_camel_case_types)]
pub struct i32;
#[allow(non_camel_case_types)]
pub struct i64;
#[allow(non_camel_case_types)]
pub struct i8;
#[allow(non_camel_case_types)]
pub struct isize;
#[allow(non_camel_case_types)]
pub struct str;
#[allow(non_camel_case_types)]
pub struct u128;
#[allow(non_camel_case_types)]
pub struct u16;
#[allow(non_camel_case_types)]
pub struct u32;
#[allow(non_camel_case_types)]
pub struct u64;
#[allow(non_camel_case_types)]
pub struct u8;
#[allow(non_camel_case_types)]
pub struct usize;
fn main() {
::yew::html! { "" };
::yew::html! { 'a' };
::yew::html! { "hello" };
::yew::html! { "42" };
::yew::html! { "1.234" };
::yew::html! { "true" };
::yew::html! { <span>{ "" }</span> };
::yew::html! { <span>{ 'a' }</span> };
::yew::html! { <span>{ "hello" }</span> };
::yew::html! { <span>{ "42" }</span> };
::yew::html! { <span>{ "1.234" }</span> };
::yew::html! { <span>{ "true" }</span> };
::yew::html! { ::std::format!("Hello") };
::yew::html! { ::std::string::ToString::to_string("Hello") };
let msg = "Hello";
::yew::html! { msg };
}