<p dir="auto">One is in <code class="notranslate">impl String</code> in libcollections/string.rs and has the signature <code class="notranslate">fn from_str(string: &amp;str) -&gt; String</code>.</p>
<p dir="auto">The other is in <code class="notranslate">impl FromStr for String</code> in libstd/from_str.rs and has the signature <code class="notranslate">fn from_str(s: &amp;str) -&gt; Option&lt;String&gt;</code>. In fact, FromStr::from_str() actually calls String::from_str().</p>
<p dir="auto">This situation probably came about because <code class="notranslate">struct String</code> exists in libcollections, which you could conceivably have without libstd in a freestanding environment, and the FromStr trait lives in libstd.</p>
<p dir="auto">Conceivably, FromStr could be moved to a different crate, or a dependency on libstd could be introduced to libcollections.</p>
<p dir="auto">I noticed that the docs on Iterator differ depending on if you look a <a href="http://doc.rust-lang.org/core/iter/trait.Iterator.html" rel="nofollow">core::iter::Iterator</a> or <a href="http://doc.rust-lang.org/std/iter/trait.Iterator.html" rel="nofollow">std::iter::Iterator</a>. In the <code class="notranslate">std</code> version the declaration of the lifetime <code class="notranslate">'r</code> in the methods is missing.<br>
Im not sure if this is a bug or intended but its confusing if you look at the <code class="notranslate">std</code> version and wonder where lifetime <code class="notranslate">'r</code> comes from.</p>