<p dir="auto">This program:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() {
    let a: &amp;str = &quot;one&quot;;
    let b: String = &quot;two&quot;.into_string();
    let c = a + b;
    println!(&quot;{}&quot;, c);
}"><pre class="notranslate"><code class="notranslate">fn main() {
    let a: &amp;str = "one";
    let b: String = "two".into_string();
    let c = a + b;
    println!("{}", c);
}
</code></pre></div>
<p dir="auto">outputs <code class="notranslate">twoone</code> instead of <code class="notranslate">onetwo</code>. The issue is in <a href="https://github.com/rust-lang/rust/blob/89d2061c8f1cc2bcd5e9bb8a97e214f482d5ff2c/src/libcollections/string.rs#L877-L883"><code class="notranslate">impl&lt;'a&gt; Add&lt;String, String&gt; for &amp;'a str</code></a>: it adds the slice (which is on the left-hand side of <code class="notranslate">+</code>) to the end of the string (which is on the right-hand side of <code class="notranslate">+</code>).</p>
<p dir="auto">Probably because of the changes in <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/dbc7e17cce0344b774c2ad45066f84d29ce972e9/hovercard" href="https://github.com/rust-lang/rust/commit/dbc7e17cce0344b774c2ad45066f84d29ce972e9"><tt>dbc7e17</tt></a> / <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/rust-lang/rust/commit/076e932fd5c6deb1a71e73f46f700743e0b9746c/hovercard" href="https://github.com/rust-lang/rust/commit/076e932fd5c6deb1a71e73f46f700743e0b9746c"><tt>076e932</tt></a> the following code now prints <strong>"Text: suffixprefix"</strong> (playpen link: <a href="http://is.gd/5f44Bo" rel="nofollow">http://is.gd/5f44Bo</a>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fn main() {
    let prefix = &quot;prefix&quot;;
    let suffix = &quot;suffix&quot;.to_string();
    println!(&quot;Text: {}&quot; , prefix + suffix);
}"><pre class="notranslate"><code class="notranslate">fn main() {
    let prefix = "prefix";
    let suffix = "suffix".to_string();
    println!("Text: {}" , prefix + suffix);
}
</code></pre></div>
<p dir="auto">I think compiler should display a error or warning in this case.</p>