about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Sproul <micsproul@gmail.com>2015-05-11 23:04:31 +1000
committerMichael Sproul <micsproul@gmail.com>2015-05-11 23:04:31 +1000
commitce7ef32982541727cdbeda1960364cb09e7ca63c (patch)
tree5900dee3c08fb1bd293dea3c5c2dfc419141ca09
parentaf57ec58517caa2c1612cfe28ccb0ef7490c6427 (diff)
Markdown formatting for error explanations.
-rw-r--r--src/librustc/diagnostics.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc/diagnostics.rs b/src/librustc/diagnostics.rs
index aaf615ee404..0f1e55544e1 100644
--- a/src/librustc/diagnostics.rs
+++ b/src/librustc/diagnostics.rs
@@ -745,6 +745,7 @@ variable.
 
 For example:
 
+```
 let x: i32 = "I am not a number!";
 //     ~~~   ~~~~~~~~~~~~~~~~~~~~
 //      |             |
@@ -752,6 +753,7 @@ let x: i32 = "I am not a number!";
 //      |    compiler infers type `&str`
 //      |
 //    type `i32` assigned to variable `x`
+```
 "##,
 
 E0309: r##"
@@ -760,6 +762,7 @@ how long the data stored within them is guaranteed to be live. This lifetime
 must be as long as the data needs to be alive, and missing the constraint that
 denotes this will cause this error.
 
+```
 // This won't compile because T is not constrained, meaning the data
 // stored in it is not guaranteed to last as long as the reference
 struct Foo<'a, T> {
@@ -770,6 +773,7 @@ struct Foo<'a, T> {
 struct Foo<'a, T: 'a> {
     foo: &'a T
 }
+```
 "##,
 
 E0310: r##"
@@ -778,6 +782,7 @@ how long the data stored within them is guaranteed to be live. This lifetime
 must be as long as the data needs to be alive, and missing the constraint that
 denotes this will cause this error.
 
+```
 // This won't compile because T is not constrained to the static lifetime
 // the reference needs
 struct Foo<T> {
@@ -788,6 +793,7 @@ struct Foo<T> {
 struct Foo<T: 'static> {
     foo: &'static T
 }
+```
 "##
 
 }