diff options
| author | bors <bors@rust-lang.org> | 2020-01-04 12:37:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-01-04 12:37:27 +0000 |
| commit | cd8377d37e9bc47f9a5a982c41705a7800cbb51d (patch) | |
| tree | 9702aa90c15372db60181490fbde313f8c6b87ba /src/test | |
| parent | 79cf5e4fe23991ab281413623e3b50ba3deb24b2 (diff) | |
| parent | a86a18907b881e9e144e7420f7e9d568353c0f4f (diff) | |
| download | rust-cd8377d37e9bc47f9a5a982c41705a7800cbb51d.tar.gz rust-cd8377d37e9bc47f9a5a982c41705a7800cbb51d.zip | |
Auto merge of #67866 - GuillaumeGomez:rollup-32vsg5b, r=GuillaumeGomez
Rollup of 4 pull requests Successful merges: - #67822 (Revert `const_err` lint checking of casts) - #67823 (improve some `Drop`-related error messages) - #67837 (Clean up err codes) - #67848 (Remove unused `#[link_name = "m"]` attributes) Failed merges: r? @ghost
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/consts/const-prop-overflowing-casts.rs | 16 | ||||
| -rw-r--r-- | src/test/ui/consts/const-prop-overflowing-casts.stderr | 22 | ||||
| -rw-r--r-- | src/test/ui/dropck/drop-on-non-struct.rs | 7 | ||||
| -rw-r--r-- | src/test/ui/dropck/drop-on-non-struct.stderr | 14 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0117.rs | 3 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0117.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0120.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-17959.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-17959.stderr | 16 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-38868.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-41974.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/reject-specialized-drops-8142.rs | 27 | ||||
| -rw-r--r-- | src/test/ui/reject-specialized-drops-8142.stderr | 96 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-intrinsic-generic-cast.rs | 1 |
14 files changed, 126 insertions, 94 deletions
diff --git a/src/test/ui/consts/const-prop-overflowing-casts.rs b/src/test/ui/consts/const-prop-overflowing-casts.rs index 11a04611487..8cc5b98250b 100644 --- a/src/test/ui/consts/const-prop-overflowing-casts.rs +++ b/src/test/ui/consts/const-prop-overflowing-casts.rs @@ -1,9 +1,15 @@ -// build-fail -// ignore-tidy-linelength +// check-pass + +enum Foo { + Bar = -42, + Baz = 42, +} fn main() { let _ = 0u8 as u32; - let _ = (1u32 << 31) as u16; //~ ERROR truncating cast: the value 2147483648 requires 32 bits but the target type is only 16 bits - let _ = (1u16 << 15) as u8; //~ ERROR truncating cast: the value 32768 requires 16 bits but the target type is only 8 bits - let _ = (!0u16) as u8; //~ ERROR truncating cast: the value 65535 requires 16 bits but the target type is only 8 bits + let _ = (1u32 << 31) as u16; + let _ = (1u16 << 15) as u8; + let _ = (!0u16) as u8; + let _ = (-1i16) as i8; + let _ = (Foo::Bar) as i8; } diff --git a/src/test/ui/consts/const-prop-overflowing-casts.stderr b/src/test/ui/consts/const-prop-overflowing-casts.stderr deleted file mode 100644 index af4e2c7005a..00000000000 --- a/src/test/ui/consts/const-prop-overflowing-casts.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: truncating cast: the value 2147483648 requires 32 bits but the target type is only 16 bits - --> $DIR/const-prop-overflowing-casts.rs:6:13 - | -LL | let _ = (1u32 << 31) as u16; - | ^^^^^^^^^^^^^^^^^^^ - | - = note: `#[deny(const_err)]` on by default - -error: truncating cast: the value 32768 requires 16 bits but the target type is only 8 bits - --> $DIR/const-prop-overflowing-casts.rs:7:13 - | -LL | let _ = (1u16 << 15) as u8; - | ^^^^^^^^^^^^^^^^^^ - -error: truncating cast: the value 65535 requires 16 bits but the target type is only 8 bits - --> $DIR/const-prop-overflowing-casts.rs:8:13 - | -LL | let _ = (!0u16) as u8; - | ^^^^^^^^^^^^^ - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/dropck/drop-on-non-struct.rs b/src/test/ui/dropck/drop-on-non-struct.rs index 259cdf40ae5..ef5e18126dc 100644 --- a/src/test/ui/dropck/drop-on-non-struct.rs +++ b/src/test/ui/dropck/drop-on-non-struct.rs @@ -1,10 +1,15 @@ impl<'a> Drop for &'a mut isize { - //~^ ERROR the Drop trait may only be implemented on structures + //~^ ERROR the `Drop` trait may only be implemented for structs, enums, and unions //~^^ ERROR E0117 fn drop(&mut self) { println!("kaboom"); } } +impl Drop for Nonexistent { + //~^ ERROR cannot find type `Nonexistent` + fn drop(&mut self) { } +} + fn main() { } diff --git a/src/test/ui/dropck/drop-on-non-struct.stderr b/src/test/ui/dropck/drop-on-non-struct.stderr index a374b0d2636..3991c44f2ed 100644 --- a/src/test/ui/dropck/drop-on-non-struct.stderr +++ b/src/test/ui/dropck/drop-on-non-struct.stderr @@ -1,8 +1,14 @@ -error[E0120]: the Drop trait may only be implemented on structures +error[E0412]: cannot find type `Nonexistent` in this scope + --> $DIR/drop-on-non-struct.rs:9:15 + | +LL | impl Drop for Nonexistent { + | ^^^^^^^^^^^ not found in this scope + +error[E0120]: the `Drop` trait may only be implemented for structs, enums, and unions --> $DIR/drop-on-non-struct.rs:1:19 | LL | impl<'a> Drop for &'a mut isize { - | ^^^^^^^^^^^^^ implementing Drop requires a struct + | ^^^^^^^^^^^^^ must be a struct, enum, or union error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/drop-on-non-struct.rs:1:1 @@ -15,7 +21,7 @@ LL | impl<'a> Drop for &'a mut isize { | = note: define and implement a trait or new type instead -error: aborting due to 2 previous errors +error: aborting due to 3 previous errors -Some errors have detailed explanations: E0117, E0120. +Some errors have detailed explanations: E0117, E0120, E0412. For more information about an error, try `rustc --explain E0117`. diff --git a/src/test/ui/error-codes/E0117.rs b/src/test/ui/error-codes/E0117.rs index 18dd809f3ff..dbbac514801 100644 --- a/src/test/ui/error-codes/E0117.rs +++ b/src/test/ui/error-codes/E0117.rs @@ -1,6 +1,5 @@ impl Drop for u32 {} //~ ERROR E0117 -//~| ERROR the Drop trait may only be implemented on structures -//~| implementing Drop requires a struct +//~| ERROR the `Drop` trait may only be implemented for structs, enums, and unions fn main() { } diff --git a/src/test/ui/error-codes/E0117.stderr b/src/test/ui/error-codes/E0117.stderr index f0cfc8a2533..b48a1d8e50d 100644 --- a/src/test/ui/error-codes/E0117.stderr +++ b/src/test/ui/error-codes/E0117.stderr @@ -1,8 +1,8 @@ -error[E0120]: the Drop trait may only be implemented on structures +error[E0120]: the `Drop` trait may only be implemented for structs, enums, and unions --> $DIR/E0117.rs:1:15 | LL | impl Drop for u32 {} - | ^^^ implementing Drop requires a struct + | ^^^ must be a struct, enum, or union error[E0117]: only traits defined in the current crate can be implemented for arbitrary types --> $DIR/E0117.rs:1:1 diff --git a/src/test/ui/error-codes/E0120.stderr b/src/test/ui/error-codes/E0120.stderr index 68ca7d800d5..6c306455e42 100644 --- a/src/test/ui/error-codes/E0120.stderr +++ b/src/test/ui/error-codes/E0120.stderr @@ -1,8 +1,8 @@ -error[E0120]: the Drop trait may only be implemented on structures +error[E0120]: the `Drop` trait may only be implemented for structs, enums, and unions --> $DIR/E0120.rs:3:15 | LL | impl Drop for dyn MyTrait { - | ^^^^^^^^^^^ implementing Drop requires a struct + | ^^^^^^^^^^^ must be a struct, enum, or union error: aborting due to previous error diff --git a/src/test/ui/issues/issue-17959.rs b/src/test/ui/issues/issue-17959.rs index 73865ae2d2e..01416a0d79e 100644 --- a/src/test/ui/issues/issue-17959.rs +++ b/src/test/ui/issues/issue-17959.rs @@ -9,7 +9,7 @@ struct G<T: ?Sized> { } impl<T> Drop for G<T> { -//~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367] +//~^ ERROR `Drop` impl requires `T: std::marker::Sized` fn drop(&mut self) { if !self._ptr.is_null() { } diff --git a/src/test/ui/issues/issue-17959.stderr b/src/test/ui/issues/issue-17959.stderr index de742e48aea..29d32c1f3ce 100644 --- a/src/test/ui/issues/issue-17959.stderr +++ b/src/test/ui/issues/issue-17959.stderr @@ -1,16 +1,10 @@ -error[E0367]: The requirement `T: std::marker::Sized` is added only by the Drop impl. - --> $DIR/issue-17959.rs:11:1 +error[E0367]: `Drop` impl requires `T: std::marker::Sized` but the struct it is implemented for does not + --> $DIR/issue-17959.rs:11:6 | -LL | / impl<T> Drop for G<T> { -LL | | -LL | | fn drop(&mut self) { -LL | | if !self._ptr.is_null() { -LL | | } -LL | | } -LL | | } - | |_^ +LL | impl<T> Drop for G<T> { + | ^ | -note: The same requirement must be part of the struct/enum definition +note: the implementor must specify the same requirement --> $DIR/issue-17959.rs:7:1 | LL | / struct G<T: ?Sized> { diff --git a/src/test/ui/issues/issue-38868.stderr b/src/test/ui/issues/issue-38868.stderr index fe932c744bf..10d1e7c4e66 100644 --- a/src/test/ui/issues/issue-38868.stderr +++ b/src/test/ui/issues/issue-38868.stderr @@ -1,4 +1,4 @@ -error[E0366]: Implementations of Drop cannot be specialized +error[E0366]: `Drop` impls cannot be specialized --> $DIR/issue-38868.rs:5:1 | LL | / impl Drop for List<i32> { @@ -8,7 +8,7 @@ LL | | } LL | | } | |_^ | -note: Use same sequence of generic type and region parameters that is on the struct/enum definition +note: use the same sequence of generic type, lifetime and const parameters as the struct definition --> $DIR/issue-38868.rs:1:1 | LL | / pub struct List<T> { diff --git a/src/test/ui/issues/issue-41974.stderr b/src/test/ui/issues/issue-41974.stderr index 9f164822dea..d082e0a6b5d 100644 --- a/src/test/ui/issues/issue-41974.stderr +++ b/src/test/ui/issues/issue-41974.stderr @@ -9,11 +9,11 @@ LL | impl<T> Drop for T where T: A { where T: ?Sized; = note: downstream crates may implement trait `A` for type `std::boxed::Box<_>` -error[E0120]: the Drop trait may only be implemented on structures +error[E0120]: the `Drop` trait may only be implemented for structs, enums, and unions --> $DIR/issue-41974.rs:7:18 | LL | impl<T> Drop for T where T: A { - | ^ implementing Drop requires a struct + | ^ must be a struct, enum, or union error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> $DIR/issue-41974.rs:7:6 diff --git a/src/test/ui/reject-specialized-drops-8142.rs b/src/test/ui/reject-specialized-drops-8142.rs index 655b42f5f8f..d7fec8802f0 100644 --- a/src/test/ui/reject-specialized-drops-8142.rs +++ b/src/test/ui/reject-specialized-drops-8142.rs @@ -1,5 +1,5 @@ // Issue 8142: Test that Drop impls cannot be specialized beyond the -// predicates attached to the struct/enum definition itself. +// predicates attached to the type definition itself. trait Bound { fn foo(&self) { } } struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } @@ -16,12 +16,16 @@ struct U; struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb } struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } +enum Enum<T> { Variant(T) } +struct TupleStruct<T>(T); +union Union<T: Copy> { f: T } + impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT - //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. + //~^ ERROR `Drop` impl requires `'adds_bnd : 'al` fn drop(&mut self) { } } impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT - //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl. + //~^ ERROR `Drop` impl requires `'adds_bnd : 'al` fn drop(&mut self) { } } impl<'ml> Drop for M<'ml> { fn drop(&mut self) { } } // ACCEPT @@ -34,13 +38,13 @@ impl Drop for N<'static> { fn drop(&mut self) { } } // RE impl<COkNoBound> Drop for O<COkNoBound> { fn drop(&mut self) { } } // ACCEPT impl Drop for P<i8> { fn drop(&mut self) { } } // REJECT -//~^ ERROR Implementations of Drop cannot be specialized +//~^ ERROR `Drop` impls cannot be specialized impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT -//~^ ERROR The requirement `AddsBnd: Bound` is added only by the Drop impl. +//~^ ERROR `Drop` impl requires `AddsBnd: Bound` impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT -//~^ ERROR The requirement `AddsRBnd : 'rbnd` is added only by the Drop impl. +//~^ ERROR `Drop` impl requires `AddsRBnd : 'rbnd` impl<Bs:Bound> Drop for S<Bs> { fn drop(&mut self) { } } // ACCEPT @@ -49,9 +53,18 @@ impl<'t,Bt:'t> Drop for T<'t,Bt> { fn drop(&mut self) { } } // ACCEPT impl Drop for U { fn drop(&mut self) { } } // ACCEPT impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJECT -//~^ ERROR Implementations of Drop cannot be specialized +//~^ ERROR `Drop` impls cannot be specialized impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT //~^ ERROR cannot infer an appropriate lifetime for lifetime parameter `'lw` +impl<AddsBnd:Bound> Drop for Enum<AddsBnd> { fn drop(&mut self) { } } // REJECT +//~^ ERROR `Drop` impl requires `AddsBnd: Bound` + +impl<AddsBnd:Bound> Drop for TupleStruct<AddsBnd> { fn drop(&mut self) { } } // REJECT +//~^ ERROR `Drop` impl requires `AddsBnd: Bound` + +impl<AddsBnd:Copy + Bound> Drop for Union<AddsBnd> { fn drop(&mut self) { } } // REJECT +//~^ ERROR `Drop` impl requires `AddsBnd: Bound` + pub fn main() { } diff --git a/src/test/ui/reject-specialized-drops-8142.stderr b/src/test/ui/reject-specialized-drops-8142.stderr index 527babb0120..14618df90cb 100644 --- a/src/test/ui/reject-specialized-drops-8142.stderr +++ b/src/test/ui/reject-specialized-drops-8142.stderr @@ -1,33 +1,41 @@ -error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. - --> $DIR/reject-specialized-drops-8142.rs:19:1 +error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the union it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:67:21 + | +LL | impl<AddsBnd:Copy + Bound> Drop for Union<AddsBnd> { fn drop(&mut self) { } } // REJECT + | ^^^^^ + | +note: the implementor must specify the same requirement + --> $DIR/reject-specialized-drops-8142.rs:21:1 + | +LL | union Union<T: Copy> { f: T } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0367]: `Drop` impl requires `'adds_bnd : 'al` but the struct it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:23:20 | -LL | / impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT -LL | | -LL | | fn drop(&mut self) { } } - | |____________________________^ +LL | impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT + | ^^^ | -note: The same requirement must be part of the struct/enum definition +note: the implementor must specify the same requirement --> $DIR/reject-specialized-drops-8142.rs:5:1 | LL | struct K<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl. - --> $DIR/reject-specialized-drops-8142.rs:23:1 +error[E0367]: `Drop` impl requires `'adds_bnd : 'al` but the struct it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:27:67 | -LL | / impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT -LL | | -LL | | fn drop(&mut self) { } } - | |____________________________^ +LL | impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT + | ^^^ | -note: The same requirement must be part of the struct/enum definition +note: the implementor must specify the same requirement --> $DIR/reject-specialized-drops-8142.rs:6:1 | LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0308]: mismatched types - --> $DIR/reject-specialized-drops-8142.rs:29:1 + --> $DIR/reject-specialized-drops-8142.rs:33:1 | LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch @@ -41,56 +49,56 @@ LL | struct N<'n> { x: &'n i8 } | ^^ = note: ...does not necessarily outlive the static lifetime -error[E0366]: Implementations of Drop cannot be specialized - --> $DIR/reject-specialized-drops-8142.rs:36:1 +error[E0366]: `Drop` impls cannot be specialized + --> $DIR/reject-specialized-drops-8142.rs:40:1 | LL | impl Drop for P<i8> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: Use same sequence of generic type and region parameters that is on the struct/enum definition +note: use the same sequence of generic type, lifetime and const parameters as the struct definition --> $DIR/reject-specialized-drops-8142.rs:10:1 | LL | struct P<Tp> { x: *const Tp } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0367]: The requirement `AddsBnd: Bound` is added only by the Drop impl. - --> $DIR/reject-specialized-drops-8142.rs:39:1 +error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:43:14 | LL | impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^ | -note: The same requirement must be part of the struct/enum definition +note: the implementor must specify the same requirement --> $DIR/reject-specialized-drops-8142.rs:11:1 | LL | struct Q<Tq> { x: *const Tq } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0367]: The requirement `AddsRBnd : 'rbnd` is added only by the Drop impl. - --> $DIR/reject-specialized-drops-8142.rs:42:1 +error[E0367]: `Drop` impl requires `AddsRBnd : 'rbnd` but the struct it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:46:21 | LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^ | -note: The same requirement must be part of the struct/enum definition +note: the implementor must specify the same requirement --> $DIR/reject-specialized-drops-8142.rs:12:1 | LL | struct R<Tr> { x: *const Tr } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -error[E0366]: Implementations of Drop cannot be specialized - --> $DIR/reject-specialized-drops-8142.rs:51:1 +error[E0366]: `Drop` impls cannot be specialized + --> $DIR/reject-specialized-drops-8142.rs:55:1 | LL | impl<One> Drop for V<One,One> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | -note: Use same sequence of generic type and region parameters that is on the struct/enum definition +note: use the same sequence of generic type, lifetime and const parameters as the struct definition --> $DIR/reject-specialized-drops-8142.rs:16:1 | LL | struct V<Tva, Tvb> { x: *const Tva, y: *const Tvb } | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'lw` due to conflicting requirements - --> $DIR/reject-specialized-drops-8142.rs:54:1 + --> $DIR/reject-specialized-drops-8142.rs:58:1 | LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -106,14 +114,38 @@ note: ...but the lifetime must also be valid for the lifetime `'l2` as defined o LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 } | ^^^ note: ...so that the types are compatible - --> $DIR/reject-specialized-drops-8142.rs:54:1 + --> $DIR/reject-specialized-drops-8142.rs:58:1 | LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: expected `W<'l1, 'l2>` found `W<'_, '_>` -error: aborting due to 8 previous errors +error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the enum it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:61:14 + | +LL | impl<AddsBnd:Bound> Drop for Enum<AddsBnd> { fn drop(&mut self) { } } // REJECT + | ^^^^^ + | +note: the implementor must specify the same requirement + --> $DIR/reject-specialized-drops-8142.rs:19:1 + | +LL | enum Enum<T> { Variant(T) } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0367]: `Drop` impl requires `AddsBnd: Bound` but the struct it is implemented for does not + --> $DIR/reject-specialized-drops-8142.rs:64:14 + | +LL | impl<AddsBnd:Bound> Drop for TupleStruct<AddsBnd> { fn drop(&mut self) { } } // REJECT + | ^^^^^ + | +note: the implementor must specify the same requirement + --> $DIR/reject-specialized-drops-8142.rs:20:1 + | +LL | struct TupleStruct<T>(T); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 11 previous errors Some errors have detailed explanations: E0308, E0366, E0367, E0495. For more information about an error, try `rustc --explain E0308`. diff --git a/src/test/ui/simd/simd-intrinsic-generic-cast.rs b/src/test/ui/simd/simd-intrinsic-generic-cast.rs index b81a76851d3..15f232e2c0f 100644 --- a/src/test/ui/simd/simd-intrinsic-generic-cast.rs +++ b/src/test/ui/simd/simd-intrinsic-generic-cast.rs @@ -4,7 +4,6 @@ #![feature(repr_simd, platform_intrinsics, concat_idents, test)] #![allow(non_camel_case_types)] -#![allow(const_err)] // the test macro casts i32s to i8 and u8 which causes lots of warnings extern crate test; |
