Skip to content

Commit 627ea4a

Browse files
---
yaml --- r: 217943 b: refs/heads/master c: 5460650 h: refs/heads/master i: 217941: 8caa93b 217939: d46b7b1 217935: 53c41ff v: v3
1 parent 14ae8a8 commit 627ea4a

File tree

3 files changed

+15
-44
lines changed

3 files changed

+15
-44
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: d72c3076e1f5099923bdd54f6ab726d796cd8907
2+
refs/heads/master: 5460650eeccb0d8925b36480d0ccd7db31a757d8
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: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -411,42 +411,6 @@ 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-
432-
E0135: r##"
433-
You tried to modify the str type, which isn't allowed. Erroneous code
434-
example:
435-
436-
```
437-
let s = "salut";
438-
let c = &mut (*s)[0..1]; // error: modification of string types is not
439-
// allowed
440-
```
441-
442-
If you want to modify an str, please use the String type. Example:
443-
444-
```
445-
let mut s = "salut";
446-
let mut c = s[0..1].to_owned(); // ok!
447-
```
448-
"##,
449-
450414
E0137: r##"
451415
This error indicates that the compiler found multiple functions with the
452416
`#[main]` attribute. This is an error because there must be a unique entry

trunk/src/librustc_typeck/diagnostics.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,23 +1369,30 @@ struct Foo {
13691369
"##,
13701370

13711371
E0128: r##"
1372-
You declared a type parameter with a default which has the same identifier as
1373-
the type parameter. Erroneous code example:
1372+
Type parameter defaults can only use parameters that occur before them.
1373+
Erroneous code example:
13741374
13751375
```
1376-
pub struct Foo<SomeType=SomeType>;
1376+
pub struct Foo<T=U, U=()> {
1377+
field1: T,
1378+
filed2: U,
1379+
}
13771380
// error: type parameters with a default cannot use forward declared
13781381
// identifiers
13791382
```
13801383
1381-
Please verify that a name clash hasn't been accidentally introduced, and rename
1382-
the type parameter if so. Example:
1384+
Since type parameters are evaluated in-order, you may be able to fix this issue
1385+
by doing:
13831386
13841387
```
1385-
pub struct Foo<T=SomeType> {
1386-
value: T
1388+
pub struct Foo<U=(), T=U> {
1389+
field1: T,
1390+
filed2: U,
13871391
}
13881392
```
1393+
1394+
Please also verify that this wasn't because of a name-clash and rename the type
1395+
parameter if so.
13891396
"##,
13901397

13911398
E0130: r##"

0 commit comments

Comments
 (0)