about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-03-02 21:23:15 +0900
committerGitHub <noreply@github.com>2021-03-02 21:23:15 +0900
commit5e68c60406741c41d7dff65e74d05f641ee6022f (patch)
treeb9520af8789e24ebeb6aedeab006b9586840adcc /compiler/rustc_error_codes/src
parentae5e024194a99bf265c874d64999e6beae916cde (diff)
parent4f4e15d5eb9750c4ac8c140207612122562d6c51 (diff)
downloadrust-5e68c60406741c41d7dff65e74d05f641ee6022f.tar.gz
rust-5e68c60406741c41d7dff65e74d05f641ee6022f.zip
Rollup merge of #82516 - PoignardAzur:inherent-impl-ty, r=oli-obk
Add incomplete feature gate for inherent associate types.

Mentored by ``````@oli-obk``````

So far the only change is that instead of giving an automatic error, the following code compiles:

```rust
struct Foo;

impl Foo {
    type Bar = isize;
}
```

The backend work to make it actually usable isn't there yet. In particular, this:

```rust
let x : Foo::Bar;
```

will give you:

```sh
error[E0223]: ambiguous associated type
  --> /$RUSTC_DIR/src/test/ui/assoc-inherent.rs:15:13
   |
LL |     let x : Foo::Bar;
   |             ^^^^^^^^ help: use fully-qualified syntax: `<Foo as Trait>::Bar`
```
Diffstat (limited to 'compiler/rustc_error_codes/src')
-rw-r--r--compiler/rustc_error_codes/src/error_codes.rs1
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0202.md15
2 files changed, 0 insertions, 16 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes.rs b/compiler/rustc_error_codes/src/error_codes.rs
index c4330694504..4b529734328 100644
--- a/compiler/rustc_error_codes/src/error_codes.rs
+++ b/compiler/rustc_error_codes/src/error_codes.rs
@@ -103,7 +103,6 @@ E0198: include_str!("./error_codes/E0198.md"),
 E0199: include_str!("./error_codes/E0199.md"),
 E0200: include_str!("./error_codes/E0200.md"),
 E0201: include_str!("./error_codes/E0201.md"),
-E0202: include_str!("./error_codes/E0202.md"),
 E0203: include_str!("./error_codes/E0203.md"),
 E0204: include_str!("./error_codes/E0204.md"),
 E0205: include_str!("./error_codes/E0205.md"),
diff --git a/compiler/rustc_error_codes/src/error_codes/E0202.md b/compiler/rustc_error_codes/src/error_codes/E0202.md
deleted file mode 100644
index afc61ec2e48..00000000000
--- a/compiler/rustc_error_codes/src/error_codes/E0202.md
+++ /dev/null
@@ -1,15 +0,0 @@
-Inherent associated types were part of [RFC 195] but are not yet implemented.
-See [the tracking issue][iss8995] for the status of this implementation.
-
-Erroneous code example:
-
-```compile_fail,E0202
-struct Foo;
-
-impl Foo {
-    type Bar = isize; // error!
-}
-```
-
-[RFC 195]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
-[iss8995]: https://github.com/rust-lang/rust/issues/8995