Skip to content

Commit 031a588

Browse files
author
Nick Hamann
committed
---
yaml --- r: 211343 b: refs/heads/tmp c: cc9d1de h: refs/heads/master i: 211341: 9e71b17 211339: b624dfe 211335: dacde58 211327: 2e10953 v: v3
1 parent 2f664d5 commit 031a588

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 2d00dc3b85aaf81caa3a4e5764c5e185a4dd0a7c
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: 50b802ade0d9aecf3a781c98c8f051b3714db3ea
35+
refs/heads/tmp: cc9d1de69251bae8b46133301fdeb0f13b8c4d51
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: 704c2ee730d2e948d11a2edd77e3f35de8329a6e
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/librustc_typeck/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ fn convert_item(ccx: &CrateCtxt, it: &ast::Item) {
877877
if let ast::TypeImplItem(ref ty) = impl_item.node {
878878
if opt_trait_ref.is_none() {
879879
span_err!(tcx.sess, impl_item.span, E0202,
880-
"associated items are not allowed in inherent impls");
880+
"associated types are not allowed in inherent impls");
881881
}
882882

883883
as_refsociated_type(ccx, ImplContainer(local_def(it.id)),

branches/tmp/src/librustc_typeck/diagnostics.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,14 @@ impl Foo {
573573
```
574574
"##,
575575

576+
E0202: r##"
577+
Inherent associated types were part of [RFC 195] but are not yet implemented.
578+
See [the tracking issue][iss8995] for the status of this implementation.
579+
580+
[RFC 195]: https://github.com/rust-lang/rfcs/pull/195
581+
[iss8995]: https://github.com/rust-lang/rust/issues/8995
582+
"##,
583+
576584
E0204: r##"
577585
An attempt to implement the `Copy` trait for a struct failed because one of the
578586
fields does not implement `Copy`. To fix this, you must implement `Copy` for the
@@ -881,7 +889,6 @@ register_diagnostics! {
881889
E0194,
882890
E0195, // lifetime parameters or bounds on method do not match the trait declaration
883891
E0196, // cannot determine a type for this closure
884-
E0202, // associated items are not allowed in inherent impls
885892
E0203, // type parameter has more than one relaxed default bound,
886893
// and only one is supported
887894
E0207, // type parameter is not constrained by the impl trait, self type, or predicate

branches/tmp/src/test/compile-fail/assoc-inherent.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
struct Foo;
1414

1515
impl Foo {
16-
type Bar = isize; //~ERROR associated items are not allowed in inherent impls
16+
type Bar = isize; //~ERROR associated types are not allowed in inherent impls
1717
}
1818

1919
fn main() {}

0 commit comments

Comments
 (0)