Skip to content

Commit 45dab63

Browse files
---
yaml --- r: 228159 b: refs/heads/try c: d72c307 h: refs/heads/master i: 228157: f456325 228155: d328f55 228151: 8adcc10 228143: 1e15a8f 228127: 90d803c 228095: a5e819b v: v3
1 parent bf14b30 commit 45dab63

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 18848ca7846fb6f72f6614fea4fd4a4565f8102a
4+
refs/heads/try: d72c3076e1f5099923bdd54f6ab726d796cd8907
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/src/librustc/diagnostics.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,24 @@ fn main() {
411411
See also https://doc.rust-lang.org/book/unsafe.html
412412
"##,
413413

414+
E0134: r##"
415+
You tried to modify the str type, which isn't allowed. Erroneous code
416+
example:
417+
418+
```
419+
let s = "salut";
420+
let c = &mut s[0..1]; // error: modification of string types is not
421+
// allowed
422+
```
423+
424+
I you want to modify an str, please use the String type. Example:
425+
426+
```
427+
let mut s = "salut";
428+
let mut c = s[0..1].to_owned(); // ok!
429+
```
430+
"##,
431+
414432
E0135: r##"
415433
You tried to modify the str type, which isn't allowed. Erroneous code
416434
example:
@@ -421,7 +439,7 @@ let c = &mut (*s)[0..1]; // error: modification of string types is not
421439
// allowed
422440
```
423441
424-
I you want to modify an str, please use the String type. Example:
442+
If you want to modify an str, please use the String type. Example:
425443
426444
```
427445
let mut s = "salut";

0 commit comments

Comments
 (0)