Add code block to code in documentation of List::rebase_onto

This commit is contained in:
Joshua Nelson 2020-06-25 22:03:31 -04:00
parent 9f3c96b869
commit d279b3c260

View file

@ -336,8 +336,10 @@ impl<'a, 'tcx> InternalSubsts<'tcx> {
///
/// For example given:
///
/// ```no_run
/// trait X<S> { fn f<T>(); }
/// impl<U> X<U> for U { fn f<V>() {} }
/// ```
///
/// * If `self` is `[Self, S, T]`: the identity substs of `f` in the trait.
/// * If `source_ancestor` is the def_id of the trait.