Skip to content

Commit 73a6df6

Browse files
varkoryodaldevoid
andcommitted
Update diagnostics to include const parameters
Co-Authored-By: Gabriel Smith <[email protected]>
1 parent f7f60ee commit 73a6df6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/librustc_typeck/diagnostics.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ impl Foo for Bar {
423423

424424
E0049: r##"
425425
This error indicates that an attempted implementation of a trait method
426-
has the wrong number of type parameters.
426+
has the wrong number of type or const parameters.
427427
428428
For example, the trait below has a method `foo` with a type parameter `T`,
429429
but the implementation of `foo` for the type `Bar` is missing this parameter:
@@ -1032,6 +1032,7 @@ enum NightsWatch {}
10321032
```
10331033
"##,
10341034

1035+
// FIXME(const_generics:docs): example of inferring const parameter.
10351036
E0087: r##"
10361037
#### Note: this error code is no longer emitted by the compiler.
10371038
@@ -1152,16 +1153,16 @@ fn main() {
11521153
"##,
11531154

11541155
E0091: r##"
1155-
You gave an unnecessary type parameter in a type alias. Erroneous code
1156-
example:
1156+
You gave an unnecessary type or const parameter in a type alias. Erroneous
1157+
code example:
11571158
11581159
```compile_fail,E0091
11591160
type Foo<T> = u32; // error: type parameter `T` is unused
11601161
// or:
11611162
type Foo<A,B> = Box<A>; // error: type parameter `B` is unused
11621163
```
11631164
1164-
Please check you didn't write too many type parameters. Example:
1165+
Please check you didn't write too many parameters. Example:
11651166
11661167
```
11671168
type Foo = u32; // ok!

0 commit comments

Comments
 (0)