Skip to content

Commit d2552fa

Browse files
committed
rollup merge of #27665: frewsxcv/patch-25
They are currently rendered incorrectly https://doc.rust-lang.org/error-index.html#E0067 https://doc.rust-lang.org/error-index.html#E0070
2 parents 8267ff7 + 3acec57 commit d2552fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ item paths (ie, namespaced variables), dereferences, indexing expressions,
642642
and field references.
643643
644644
Let's start with some bad examples:
645+
645646
```
646647
use std::collections::LinkedList;
647648
@@ -653,8 +654,10 @@ LinkedList::new() += 1;
653654
fn some_func(i: &mut i32) {
654655
i += 12; // Error : '+=' operation cannot be applied on a reference !
655656
}
657+
```
656658
657659
And now some good examples:
660+
658661
```
659662
let mut i : i32 = 0;
660663
@@ -665,7 +668,6 @@ i += 12; // Good !
665668
fn some_func(i: &mut i32) {
666669
*i += 12; // Good !
667670
}
668-
669671
```
670672
"##,
671673

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

0 commit comments

Comments
 (0)