diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2018-03-14 19:10:28 -0700 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2018-03-15 11:59:54 -0700 |
| commit | 4d5cd21a0db601636d88f4c95f50435b04bf71df (patch) | |
| tree | 0bb52e32d0f72ad2851c68a977783eed058958c7 /src/test/ui/error-codes | |
| parent | 883e74645d350b6752cb94d48f46363f6f8789e9 (diff) | |
| download | rust-4d5cd21a0db601636d88f4c95f50435b04bf71df.tar.gz rust-4d5cd21a0db601636d88f4c95f50435b04bf71df.zip | |
Coherence diagnostic tweaks
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0117.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0206.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0328.rs | 20 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0328.stderr | 9 |
4 files changed, 31 insertions, 2 deletions
diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index 240aa4240cc..39702886348 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -8,7 +8,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar --> $DIR/E0117.rs:11:1 | LL | impl Drop for u32 {} //~ ERROR E0117 - | ^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate + | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate = note: define and implement a trait or new type instead diff --git a/src/test/ui/error-codes/E0206.stderr b/src/test/ui/error-codes/E0206.stderr index 0cd22a454e1..6c671967e84 100644 --- a/src/test/ui/error-codes/E0206.stderr +++ b/src/test/ui/error-codes/E0206.stderr @@ -14,7 +14,7 @@ error[E0117]: only traits defined in the current crate can be implemented for ar --> $DIR/E0206.rs:13:1 | LL | impl Copy for Foo { } - | ^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate + | ^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate | = note: the impl does not reference any types defined in this crate = note: define and implement a trait or new type instead diff --git a/src/test/ui/error-codes/E0328.rs b/src/test/ui/error-codes/E0328.rs new file mode 100644 index 00000000000..e08532b0249 --- /dev/null +++ b/src/test/ui/error-codes/E0328.rs @@ -0,0 +1,20 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(unsize)] + +use std::marker::Unsize; + +pub struct MyType; + +impl<T> Unsize<T> for MyType {} +//~^ ERROR explicit impls for the `Unsize` trait are not permitted [E0328] + +fn main() {} diff --git a/src/test/ui/error-codes/E0328.stderr b/src/test/ui/error-codes/E0328.stderr new file mode 100644 index 00000000000..ad3a224279c --- /dev/null +++ b/src/test/ui/error-codes/E0328.stderr @@ -0,0 +1,9 @@ +error[E0328]: explicit impls for the `Unsize` trait are not permitted + --> $DIR/E0328.rs:17:1 + | +LL | impl<T> Unsize<T> for MyType {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl of `Unsize` not allowed + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0328`. |
