File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -220,21 +220,20 @@ pub trait AsMut<T: ?Sized> {
220220///
221221/// # Implementing [`Into`] for conversions to external types
222222///
223- /// If the destination type is not part of the current crate
224- /// then you can 't implement [`From`] directly.
223+ /// Prior to Rust 1.40, if the destination type was not part of the current crate
224+ /// then you couldn 't implement [`From`] directly.
225225/// For example, take this code:
226226///
227- /// ```compile_fail
227+ /// ```
228228/// struct Wrapper<T>(Vec<T>);
229229/// impl<T> From<Wrapper<T>> for Vec<T> {
230230/// fn from(w: Wrapper<T>) -> Vec<T> {
231231/// w.0
232232/// }
233233/// }
234234/// ```
235- /// This will fail to compile because we cannot implement a trait for a type
236- /// if both the trait and the type are not defined by the current crate.
237- /// This is due to Rust's orphaning rules. To bypass this, you can implement [`Into`] directly:
235+ /// This will fail to compile in older versions of the language because Rust's orphaning rules
236+ /// used to be a little bit more strict. To bypass this, you could implement [`Into`] directly:
238237///
239238/// ```
240239/// struct Wrapper<T>(Vec<T>);
You can’t perform that action at this time.
0 commit comments