From 47dc5d000f15b2c74d097b80810f765d91395aad Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Wed, 16 Aug 2023 20:05:03 -0700 Subject: [PATCH] Switch to using primitives in macro-generated code through std::primitive --- src/export.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/export.rs b/src/export.rs index 5c06ebdd26..e6d3ffd07c 100644 --- a/src/export.rs +++ b/src/export.rs @@ -6,6 +6,7 @@ pub use std::fmt::{self, Debug, Formatter}; pub use std::hash::{Hash, Hasher}; pub use std::marker::Copy; pub use std::option::Option::{None, Some}; +pub use std::primitive::{bool, str}; pub use std::result::Result::{Err, Ok}; pub use std::stringify; @@ -34,14 +35,4 @@ pub use proc_macro::TokenStream; #[cfg(feature = "printing")] pub use quote::{ToTokens, TokenStreamExt}; -#[allow(non_camel_case_types)] -pub type bool = help::Bool; -#[allow(non_camel_case_types)] -pub type str = help::Str; - -mod help { - pub type Bool = bool; - pub type Str = str; -} - pub struct private(pub(crate) ());