about summary refs log tree commit diff
path: root/src/test/ui/parser
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-21 19:07:31 +0100
committerGitHub <noreply@github.com>2019-12-21 19:07:31 +0100
commitb50c3b7ddfd4e6f6b3aa2f99522637138320dab0 (patch)
treec2c3bdef13a161086509448d3fb2934dbc10ba64 /src/test/ui/parser
parent0a440b159436ad3c75d25b24ce5d43086b567872 (diff)
parente7b8bfe5b9f09a6c587ebe170abdf84a7bce26fa (diff)
downloadrust-b50c3b7ddfd4e6f6b3aa2f99522637138320dab0.tar.gz
rust-b50c3b7ddfd4e6f6b3aa2f99522637138320dab0.zip
Rollup merge of #67160 - matthewjasper:gat-generics, r=nikomatsakis
Make GATs less ICE-prone.

After this PR simple lifetime-generic associated types can now be used in a compiling program. There are two big limitations:

* #30472 has not been addressed in any way (see src/test/ui/generic-associated-types/iterable.rs)
* Using type- and const-generic associated types errors because bound types and constants aren't handled by trait solving.
    * The errors are technically non-fatal, but they happen in a [part of the compiler](https://github.com/rust-lang/rust/blob/4abb0ad2731e9ac6fd5d64d4cf15b7c82e4b5a81/src/librustc_typeck/lib.rs#L298) that fairly aggressively stops compiling on errors.

closes #47206
closes #49362
closes #62521
closes #63300
closes #64755
closes #67089
Diffstat (limited to 'src/test/ui/parser')
-rw-r--r--src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs1
-rw-r--r--src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr8
2 files changed, 8 insertions, 1 deletions
diff --git a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs
index 71c7d4ba21d..9c321c4bd0d 100644
--- a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs
+++ b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.rs
@@ -19,4 +19,5 @@ impl X {
     //~| ERROR associated types are not yet supported in inherent impls
     type W where Self: Eq;
     //~^ ERROR associated type in `impl` without body
+    //~| ERROR associated types are not yet supported in inherent impls
 }
diff --git a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr
index 6f1439c8f0b..65e1981e3ac 100644
--- a/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr
+++ b/src/test/ui/parser/impl-item-type-no-body-semantic-fail.stderr
@@ -68,6 +68,12 @@ error[E0202]: associated types are not yet supported in inherent impls (see #899
 LL |     type W: Ord where Self: Eq;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 9 previous errors
+error[E0202]: associated types are not yet supported in inherent impls (see #8995)
+  --> $DIR/impl-item-type-no-body-semantic-fail.rs:20:5
+   |
+LL |     type W where Self: Eq;
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 10 previous errors
 
 For more information about this error, try `rustc --explain E0202`.