File tree Expand file tree Collapse file tree 2 files changed +43
-3
lines changed
branches/stable/src/librustc_typeck Expand file tree Collapse file tree 2 files changed +43
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: 35d979d8f8bb63b6063e30954c7c71ddf863b380
32
+ refs/heads/stable: 50b802ade0d9aecf3a781c98c8f051b3714db3ea
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
Original file line number Diff line number Diff line change @@ -443,6 +443,48 @@ it has been disabled for now.
443
443
[iss20126]: https://github.com/rust-lang/rust/issues/20126
444
444
"## ,
445
445
446
+ E0185 : r##"
447
+ An associated function for a trait was defined to be static, but an
448
+ implementation of the trait declared the same function to be a method (i.e. to
449
+ take a `self` parameter).
450
+
451
+ Here's an example of this error:
452
+
453
+ ```
454
+ trait Foo {
455
+ fn foo();
456
+ }
457
+
458
+ struct Bar;
459
+
460
+ impl Foo for Bar {
461
+ // error, method `foo` has a `&self` declaration in the impl, but not in
462
+ // the trait
463
+ fn foo(&self) {}
464
+ }
465
+ "## ,
466
+
467
+ E0186 : r##"
468
+ An associated function for a trait was defined to be a method (i.e. to take a
469
+ `self` parameter), but an implementation of the trait declared the same function
470
+ to be static.
471
+
472
+ Here's an example of this error:
473
+
474
+ ```
475
+ trait Foo {
476
+ fn foo(&self);
477
+ }
478
+
479
+ struct Bar;
480
+
481
+ impl Foo for Bar {
482
+ // error, method `foo` has a `&self` declaration in the trait, but not in
483
+ // the impl
484
+ fn foo() {}
485
+ }
486
+ "## ,
487
+
446
488
E0197 : r##"
447
489
Inherent implementations (one that do not implement a trait but provide
448
490
methods associated with a type) are always safe because they are not
@@ -828,8 +870,6 @@ register_diagnostics! {
828
870
E0174 , // explicit use of unboxed closure methods are experimental
829
871
E0182 ,
830
872
E0183 ,
831
- E0185 ,
832
- E0186 ,
833
873
E0187 , // can't infer the kind of the closure
834
874
E0188 , // types differ in mutability
835
875
E0189 , // can only cast a boxed pointer to a boxed object
You can’t perform that action at this time.
0 commit comments