Skip to content

Commit 7ba448d

Browse files
author
Nick Hamann
committed
---
yaml --- r: 209307 b: refs/heads/auto c: cc9d1de h: refs/heads/master i: 209305: ef171eb 209303: 3e3adb6 v: v3
1 parent db476e7 commit 7ba448d

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
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: 50b802ade0d9aecf3a781c98c8f051b3714db3ea
13+
refs/heads/auto: cc9d1de69251bae8b46133301fdeb0f13b8c4d51
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

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