<p dir="auto">The format macros seem to be having some trouble parsing an argument that contains <code class="notranslate">super ::</code> and <code class="notranslate">self ::</code> paths, where the white space is significant. Here's an example:</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="fn bar() -&gt; int { 5 }

mod foo {
    pub fn foo1() { let _ = format!(&quot;{}&quot;, super :: bar()); }
    pub fn foo2() { println!(&quot;{}&quot;, super :: bar()); }
    pub fn foo3() { panic!(&quot;{}&quot;, super :: bar()); }
    pub fn foo4() { 5 }
    pub fn foo5() { panic!(&quot;{}&quot;, self :: foo4()); }
}

fn main() {
    foo::foo1();
    foo::foo2();
    foo::foo3();
    println!(&quot;{}&quot;, foo :: foo4())
}"><pre class="notranslate"><span class="pl-k">fn</span> <span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">int</span> <span class="pl-kos">{</span> <span class="pl-c1">5</span> <span class="pl-kos">}</span>

<span class="pl-k">mod</span> foo <span class="pl-kos">{</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo1</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> _ = <span class="pl-en">format</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, <span class="pl-k">super</span> :: bar<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo2</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, <span class="pl-k">super</span> :: bar<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo3</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">panic</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, <span class="pl-k">super</span> :: bar<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo4</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c1">5</span> <span class="pl-kos">}</span>
    <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo5</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">panic</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, <span class="pl-smi">self</span> :: foo4<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    foo<span class="pl-kos">::</span><span class="pl-en">foo1</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    foo<span class="pl-kos">::</span><span class="pl-en">foo2</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    foo<span class="pl-kos">::</span><span class="pl-en">foo3</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-en">println</span><span class="pl-en">!</span><span class="pl-kos">(</span><span class="pl-s">"{}"</span>, foo :: foo4<span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Errors with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test.rs:4:43: 4:48 error: expected identifier, found keyword `super`
test.rs:4     pub fn foo1() { let _ = format!(&quot;{}&quot;, super :: bar()); }
                                                    ^~~~~
test.rs:5:36: 5:41 error: expected identifier, found keyword `super`
test.rs:5     pub fn foo2() { println!(&quot;{}&quot;, super :: bar()); }
                                             ^~~~~
test.rs:6:34: 6:39 error: expected identifier, found keyword `super`
test.rs:6     pub fn foo3() { panic!(&quot;{}&quot;, super :: bar()); }
                                           ^~~~~
test.rs:8:21: 8:50 error: expected token: `,`
test.rs:8     pub fn foo5() { panic!(&quot;{}&quot;, self :: foo4()); }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~"><pre class="notranslate"><code class="notranslate">test.rs:4:43: 4:48 error: expected identifier, found keyword `super`
test.rs:4     pub fn foo1() { let _ = format!("{}", super :: bar()); }
                                                    ^~~~~
test.rs:5:36: 5:41 error: expected identifier, found keyword `super`
test.rs:5     pub fn foo2() { println!("{}", super :: bar()); }
                                             ^~~~~
test.rs:6:34: 6:39 error: expected identifier, found keyword `super`
test.rs:6     pub fn foo3() { panic!("{}", super :: bar()); }
                                           ^~~~~
test.rs:8:21: 8:50 error: expected token: `,`
test.rs:8     pub fn foo5() { panic!("{}", self :: foo4()); }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre></div>
<p dir="auto">Notice that a regular module paths work, but the special <code class="notranslate">super</code> and <code class="notranslate">self</code> tokens do not.</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pub struct A;

mod test {
    use super :: A;
}"><pre class="notranslate"><span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">A</span><span class="pl-kos">;</span>

<span class="pl-k">mod</span> test <span class="pl-kos">{</span>
    <span class="pl-k">use</span> <span class="pl-k">super</span> <span class="pl-kos">::</span> <span class="pl-v">A</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo.rs:4:9: 4:14 error: found `super` in ident position                               
foo.rs:4     use super :: A;                                                          
                 ^~~~~                                                                
error: aborting due to previous error                                                 "><pre class="notranslate"><code class="notranslate">foo.rs:4:9: 4:14 error: found `super` in ident position                               
foo.rs:4     use super :: A;                                                          
                 ^~~~~                                                                
error: aborting due to previous error                                                 
</code></pre></div>