Skip to content

Commit c9518fa

Browse files
---
yaml --- r: 223646 b: refs/heads/beta c: 18848ca h: refs/heads/master v: v3
1 parent a916f1c commit c9518fa

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 0d1deb521c79207611f4a9b74811535150f4a031
26+
refs/heads/beta: 18848ca7846fb6f72f6614fea4fd4a4565f8102a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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)