Stringify! inconsistency between stable and nightly/beta

In the following example, in nightly/beta channel, extra whitespace will be added between ident and ::, I expect this to be consistent between stable and nightly/beta

macro_rules! stringify_path {
   ($path: path) => {stringify!($path)}
}
fn main() {
   // in stable: "a::b"
   // in beta/nightly: "a :: b"
   dbg!(stringify_path(a :: b))
}

rust playground

From the docs:

Note that the expanded results of the input tokens may change in the future. You should be careful if you rely on the output.

2 Likes

Thanks @quinedot. :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.