about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2018-11-08 18:54:34 -0800
committerEsteban Küber <esteban@kuber.com.ar>2018-11-22 14:14:27 -0800
commit48fa974211990ec2dd2b8d8c6949d101fb51bb45 (patch)
tree2d3395ec5e84232d2d1832bf56d968ef1c0ab8d5 /src/test/ui/error-codes
parentb6f4b29c6df3fc78adbda9c915f01f8e354d9ca1 (diff)
downloadrust-48fa974211990ec2dd2b8d8c6949d101fb51bb45.tar.gz
rust-48fa974211990ec2dd2b8d8c6949d101fb51bb45.zip
Suggest correct syntax when writing type arg instead of assoc type
When confusing an associated type with a type argument, suggest the
appropriate syntax.

Given `Iterator<isize>`, suggest `Iterator<Item = isize>`.
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0107-b.rs8
-rw-r--r--src/test/ui/error-codes/E0107-b.stderr27
2 files changed, 0 insertions, 35 deletions
diff --git a/src/test/ui/error-codes/E0107-b.rs b/src/test/ui/error-codes/E0107-b.rs
deleted file mode 100644
index 58e7718ba5b..00000000000
--- a/src/test/ui/error-codes/E0107-b.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-pub trait T<X, Y> {
-    type A;
-    type B;
-    type C;
-}
- pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> }
-
- fn main() {}
diff --git a/src/test/ui/error-codes/E0107-b.stderr b/src/test/ui/error-codes/E0107-b.stderr
deleted file mode 100644
index 1e8c683aff6..00000000000
--- a/src/test/ui/error-codes/E0107-b.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0107]: wrong number of type arguments: expected 2, found 4
-  --> $DIR/E0107-b.rs:6:42
-   |
-LL |  pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> }
-   |                                          ^^^^^  ^^^^^ unexpected type argument
-   |                                          |
-   |                                          unexpected type argument
-
-error[E0191]: the value of the associated types `A` (from the trait `T`), `C` (from the trait `T`) must be specified
-  --> $DIR/E0107-b.rs:6:26
-   |
-LL |     type A;
-   |     ------- `A` defined here
-LL |     type B;
-LL |     type C;
-   |     ------- `C` defined here
-LL | }
-LL |  pub struct Foo { i: Box<T<usize, usize, usize, usize, B=usize>> }
-   |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |                          |
-   |                          missing associated type `A` value
-   |                          missing associated type `C` value
-
-error: aborting due to 2 previous errors
-
-Some errors occurred: E0107, E0191.
-For more information about an error, try `rustc --explain E0107`.