Skip to content

Commit

Permalink
Hygienic path for ::std::option::Option
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 20, 2022
1 parent 7286307 commit 95bb29c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@
macro_rules! format_ident {
($fmt:expr) => {
$crate::format_ident_impl!([
::std::option::Option::None,
$crate::__private::Option::None,
$fmt
])
};

($fmt:expr, $($rest:tt)*) => {
$crate::format_ident_impl!([
::std::option::Option::None,
$crate::__private::Option::None,
$fmt
] $($rest)*)
};
Expand All @@ -141,7 +141,7 @@ macro_rules! format_ident_impl {
};
([$old:expr, $($fmt:tt)*] span = $span:expr, $($rest:tt)*) => {
$crate::format_ident_impl!([
::std::option::Option::Some::<$crate::__private::Span>($span),
$crate::__private::Option::Some::<$crate::__private::Span>($span),
$($fmt)*
] $($rest)*)
};
Expand Down
1 change: 1 addition & 0 deletions src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::ops::BitOr;

pub use proc_macro2::*;
pub use std::format;
pub use std::option::Option;

pub struct HasIterator; // True
pub struct ThereIsNoIteratorInRepetition; // False
Expand Down

0 comments on commit 95bb29c

Please sign in to comment.