about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorOhad Ravid <ohad.rv@gmail.com>2019-10-26 17:28:02 +0200
committerOhad Ravid <ohad.rv@gmail.com>2019-10-31 17:11:21 +0100
commit026aee62ac04ae79059c902867bbf523afaa3583 (patch)
tree40959a0610ee0178af4c0399517a3e92da67ffef /src/test/ui/error-codes
parent92df638162b7ccea6f97a8e1287ed05c5c0818b4 (diff)
downloadrust-026aee62ac04ae79059c902867bbf523afaa3583.tar.gz
rust-026aee62ac04ae79059c902867bbf523afaa3583.zip
Stabilize the `re_rebalance_coherence` feature
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/e0119/complex-impl.rs2
-rw-r--r--src/test/ui/error-codes/e0119/complex-impl.stderr15
2 files changed, 10 insertions, 7 deletions
diff --git a/src/test/ui/error-codes/e0119/complex-impl.rs b/src/test/ui/error-codes/e0119/complex-impl.rs
index 3cba39ecbf9..7dbf93ada5e 100644
--- a/src/test/ui/error-codes/e0119/complex-impl.rs
+++ b/src/test/ui/error-codes/e0119/complex-impl.rs
@@ -6,7 +6,7 @@ use complex_impl_support::{External, M};
 
 struct Q;
 
-impl<R> External for (Q, R) {} //~ ERROR must be used
+impl<R> External for (Q, R) {} //~ ERROR only traits defined
 //~^ ERROR conflicting implementations of trait
 
 fn main() {}
diff --git a/src/test/ui/error-codes/e0119/complex-impl.stderr b/src/test/ui/error-codes/e0119/complex-impl.stderr
index f7516d20af4..0c18a1fbd1f 100644
--- a/src/test/ui/error-codes/e0119/complex-impl.stderr
+++ b/src/test/ui/error-codes/e0119/complex-impl.stderr
@@ -8,15 +8,18 @@ LL | impl<R> External for (Q, R) {}
            - impl<'a, 'b, 'c, T, U, V, W> complex_impl_support::External for (T, complex_impl_support::M<'a, 'b, 'c, std::boxed::Box<U>, V, W>)
              where <U as std::ops::FnOnce<(T,)>>::Output == V, <V as std::iter::Iterator>::Item == T, 'b : 'a, T : 'a, U: std::ops::FnOnce<(T,)>, U : 'static, V: std::iter::Iterator, V: std::clone::Clone, W: std::ops::Add, <W as std::ops::Add>::Output: std::marker::Copy;
 
-error[E0210]: type parameter `R` must be used as the type parameter for some local type (e.g., `MyStruct<R>`)
-  --> $DIR/complex-impl.rs:9:6
+error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
+  --> $DIR/complex-impl.rs:9:1
    |
 LL | impl<R> External for (Q, R) {}
-   |      ^ type parameter `R` must be used as the type parameter for some local type
+   | ^^^^^^^^^^^^^^^^^^^^^------
+   | |                    |
+   | |                    this is not defined in the current crate because tuples are always foreign
+   | impl doesn't use only types from inside the current crate
    |
-   = note: only traits defined in the current crate can be implemented for a type parameter
+   = note: define and implement a trait or new type instead
 
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0119, E0210.
-For more information about an error, try `rustc --explain E0119`.
+Some errors have detailed explanations: E0117, E0119.
+For more information about an error, try `rustc --explain E0117`.