Skip to content

Commit 9d1cef1

Browse files
---
yaml --- r: 217514 b: refs/heads/tmp c: 14e3d26 h: refs/heads/master v: v3
1 parent 65f9fbd commit 9d1cef1

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: 2ad26e850ed5dfedda8c96d7315aee50145ceedd
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: d73cc565656c76cb5270934caaafa78760cc565b
28+
refs/heads/tmp: 14e3d26b8a19c56c2c2b2b99ee870a9002bb70e0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/src/librustc/diagnostics.rs

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,13 +361,31 @@ http://doc.rust-lang.org/reference.html#ffi-attributes
361361
"##,
362362

363363
E0109: r##"
364-
You tried to give type parameter to a type which doesn't need it. Erroneous
364+
You tried to give type parameter to a type which doesn't need it. Erroneous
365365
code example:
366366
367367
```
368368
type X = u32<i32>; // error: type parameters are not allowed on this type
369369
```
370370
371+
Please check that you used the correct type and recheck its definition. Perhaps
372+
it doesn't need the type parameter.
373+
Example:
374+
375+
```
376+
type X = u32; // ok!
377+
```
378+
"##,
379+
380+
E0110: r##"
381+
You tried to give a lifetime parameter to a type which doesn't need it.
382+
Erroneous code example:
383+
384+
```
385+
type X = u32<'static>; // error: lifetime parameters are not allowed on
386+
// this type
387+
```
388+
371389
Please check you actually used the good type or check again its definition.
372390
Example:
373391
@@ -1071,7 +1089,6 @@ register_diagnostics! {
10711089
E0017,
10721090
E0022,
10731091
E0038,
1074-
E0110,
10751092
E0134,
10761093
E0135,
10771094
E0136,

branches/tmp/src/librustc_typeck/diagnostics.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,12 +1010,15 @@ example:
10101010
10111011
```
10121012
type Foo<T> = u32; // error: type parameter `T` is unused
1013+
// or:
1014+
type Foo<A,B> = Box<A>; // error: type parameter `B` is unused
10131015
```
10141016
10151017
Please check you didn't write too many type parameters. Example:
10161018
10171019
```
10181020
type Foo = u32; // ok!
1021+
type Foo<A> = Box<A>; // ok!
10191022
```
10201023
"##,
10211024

0 commit comments

Comments
 (0)