Skip to content

Commit

Permalink
Fix formatting for E0067 and E0070 error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Aug 11, 2015
1 parent 1af31d4 commit 3acec57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc_typeck/diagnostics.rs
Expand Up @@ -642,6 +642,7 @@ item paths (ie, namespaced variables), dereferences, indexing expressions,
and field references.
Let's start with some bad examples:
```
use std::collections::LinkedList;
Expand All @@ -653,8 +654,10 @@ LinkedList::new() += 1;
fn some_func(i: &mut i32) {
i += 12; // Error : '+=' operation cannot be applied on a reference !
}
```
And now some good examples:
```
let mut i : i32 = 0;
Expand All @@ -665,7 +668,6 @@ i += 12; // Good !
fn some_func(i: &mut i32) {
*i += 12; // Good !
}
```
"##,

Expand Down Expand Up @@ -694,6 +696,7 @@ More details can be found here:
https://doc.rust-lang.org/reference.html#lvalues,-rvalues-and-temporaries
Now, we can go further. Here are some bad examples:
```
struct SomeStruct {
x: i32,
Expand Down

0 comments on commit 3acec57

Please sign in to comment.