File tree Expand file tree Collapse file tree 2 files changed +42
-3
lines changed
branches/try/src/librustc_typeck Expand file tree Collapse file tree 2 files changed +42
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
3
3
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4
- refs/heads/try: 6715ec8da01816f1b3d0a0e47c88ff47d1559b4f
4
+ refs/heads/try: 1ac7633c8af439828f16a5bb09162f5475d5a6de
5
5
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
6
6
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
7
7
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -2423,7 +2423,7 @@ E0323: r##"
2423
2423
An associated const was implemented when another trait item was expected.
2424
2424
Erroneous code example:
2425
2425
2426
- ```Rust
2426
+ ```
2427
2427
trait Foo {
2428
2428
type N;
2429
2429
}
@@ -2440,7 +2440,7 @@ impl Foo for Bar {
2440
2440
To fix this error, please check you didn't misspell the associated const
2441
2441
name or you did implement the good trait item. Example:
2442
2442
2443
- ```Rust
2443
+ ```
2444
2444
struct Bar;
2445
2445
2446
2446
trait Foo {
@@ -2462,6 +2462,45 @@ impl Foo for Bar {
2462
2462
```
2463
2463
"## ,
2464
2464
2465
+ E0324 : r##"
2466
+ A method was implemented when another trait item was expected. Erroneous
2467
+ code example:
2468
+
2469
+ ```
2470
+ struct Bar;
2471
+
2472
+ trait Foo {
2473
+ const N : u32;
2474
+
2475
+ fn M();
2476
+ }
2477
+
2478
+ impl Foo for Bar {
2479
+ fn N() {}
2480
+ // error: item `N` is an associated method, which doesn't match its
2481
+ // trait `<Bar as Foo>`
2482
+ }
2483
+ ```
2484
+
2485
+ To fix this error, please check you didn't misspell the method name. Example:
2486
+
2487
+ ```
2488
+ struct Bar;
2489
+
2490
+ trait Foo {
2491
+ const N : u32;
2492
+
2493
+ fn M();
2494
+ }
2495
+
2496
+ impl Foo for Bar {
2497
+ const N : u32 = 0;
2498
+
2499
+ fn M() {} // ok!
2500
+ }
2501
+ ```
2502
+ "## ,
2503
+
2465
2504
E0326 : r##"
2466
2505
The types of any associated constants in a trait implementation must match the
2467
2506
types in the trait definition. This error indicates that there was a mismatch.
You can’t perform that action at this time.
0 commit comments