Skip to content

Commit 8caa93b

Browse files
---
yaml --- r: 217941 b: refs/heads/master c: 18848ca h: refs/heads/master i: 217939: d46b7b1 v: v3
1 parent 1fb7bd2 commit 8caa93b

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0d1deb521c79207611f4a9b74811535150f4a031
2+
refs/heads/master: 18848ca7846fb6f72f6614fea4fd4a4565f8102a
33
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/src/librustc/diagnostics.rs

Lines changed: 18 additions & 0 deletions
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+
E0135: 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
E0137: r##"
415433
This error indicates that the compiler found multiple functions with the
416434
`#[main]` attribute. This is an error because there must be a unique entry

0 commit comments

Comments
 (0)