about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-06-25 22:03:31 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-06-25 22:28:03 -0400
commitd279b3c260875fcb7962c4bb7ba2e90b748476e8 (patch)
treed338a81fb224eee6741ad42757f9a3eb884100db
parent9f3c96b869b48ecd0bb556c6ad9cd603b4dacfb9 (diff)
downloadrust-d279b3c260875fcb7962c4bb7ba2e90b748476e8.tar.gz
rust-d279b3c260875fcb7962c4bb7ba2e90b748476e8.zip
Add code block to code in documentation of `List::rebase_onto`
-rw-r--r--src/librustc_middle/ty/subst.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_middle/ty/subst.rs b/src/librustc_middle/ty/subst.rs
index fd31adae499..e9fd67a748c 100644
--- a/src/librustc_middle/ty/subst.rs
+++ b/src/librustc_middle/ty/subst.rs
@@ -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.