Skip to content

Commit 2d472bb

Browse files
---
yaml --- r: 234967 b: refs/heads/stable c: 14e3d26 h: refs/heads/master i: 234965: 0bf8322 234963: 64eef49 234959: 05b0485 v: v3
1 parent 83a1570 commit 2d472bb

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
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: d73cc565656c76cb5270934caaafa78760cc565b
32+
refs/heads/stable: 14e3d26b8a19c56c2c2b2b99ee870a9002bb70e0
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

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