rust/src/test/ui/reject-specialized-drops-8142.stderr

116 lines
4.8 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0367]: The requirement `'adds_bnd : 'al` is added only by the Drop impl.
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:19:1
2018-08-08 07:28:26 -05:00
|
LL | / impl<'al,'adds_bnd:'al> Drop for K<'al,'adds_bnd> { // REJECT
LL | | //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl.
LL | | fn drop(&mut self) { } }
| |____________________________^
|
note: The same requirement must be part of the struct/enum definition
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:5:1
2018-08-08 07:28:26 -05:00
|
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.
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:23:1
2018-08-08 07:28:26 -05:00
|
LL | / impl<'al,'adds_bnd> Drop for L<'al,'adds_bnd> where 'adds_bnd:'al { // REJECT
LL | | //~^ ERROR The requirement `'adds_bnd : 'al` is added only by the Drop impl.
LL | | fn drop(&mut self) { } }
| |____________________________^
|
note: The same requirement must be part of the struct/enum definition
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:6:1
2018-08-08 07:28:26 -05:00
|
LL | struct L<'l1,'l2> { x: &'l1 i8, y: &'l2 u8 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0308]: mismatched types
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:29:1
2018-08-08 07:28:26 -05:00
|
LL | impl Drop for N<'static> { fn drop(&mut self) { } } // REJECT
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
= note: expected type `N<'n>`
found type `N<'static>`
2018-12-25 09:56:47 -06:00
note: the lifetime 'n as defined on the struct at 8:10...
--> $DIR/reject-specialized-drops-8142.rs:8:10
2018-08-08 07:28:26 -05:00
|
LL | struct N<'n> { x: &'n i8 }
| ^^
= note: ...does not necessarily outlive the static lifetime
error[E0366]: Implementations of Drop cannot be specialized
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:36:1
2018-08-08 07:28:26 -05:00
|
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
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:10:1
2018-08-08 07:28:26 -05:00
|
LL | struct P<Tp> { x: *const Tp }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0367]: The requirement `AddsBnd: Bound` is added only by the Drop impl.
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:39:1
2018-08-08 07:28:26 -05:00
|
LL | impl<AddsBnd:Bound> Drop for Q<AddsBnd> { fn drop(&mut self) { } } // REJECT
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
|
note: The same requirement must be part of the struct/enum definition
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:11:1
2018-08-08 07:28:26 -05:00
|
LL | struct Q<Tq> { x: *const Tq }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0367]: The requirement `AddsRBnd : 'rbnd` is added only by the Drop impl.
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:42:1
2018-08-08 07:28:26 -05:00
|
LL | impl<'rbnd,AddsRBnd:'rbnd> Drop for R<AddsRBnd> { fn drop(&mut self) { } } // REJECT
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2018-08-08 07:28:26 -05:00
|
note: The same requirement must be part of the struct/enum definition
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:12:1
2018-08-08 07:28:26 -05:00
|
LL | struct R<Tr> { x: *const Tr }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0366]: Implementations of Drop cannot be specialized
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:51:1
2018-08-08 07:28:26 -05:00
|
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
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:16:1
2018-08-08 07:28:26 -05:00
|
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
2018-12-25 09:56:47 -06:00
--> $DIR/reject-specialized-drops-8142.rs:54:1
2018-08-08 07:28:26 -05:00
|
LL | impl<'lw> Drop for W<'lw,'lw> { fn drop(&mut self) { } } // REJECT
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-12-25 09:56:47 -06:00
note: first, the lifetime cannot outlive the lifetime 'l1 as defined on the struct at 17:10...
--> $DIR/reject-specialized-drops-8142.rs:17:10
2018-08-08 07:28:26 -05:00
|
LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
| ^^^
2018-12-25 09:56:47 -06:00
note: ...but the lifetime must also be valid for the lifetime 'l2 as defined on the struct at 17:15...
--> $DIR/reject-specialized-drops-8142.rs:17:15
2018-08-08 07:28:26 -05:00
|
LL | struct W<'l1, 'l2> { x: &'l1 i8, y: &'l2 u8 }
| ^^^
= note: ...so that the types are compatible:
expected W<'l1, 'l2>
found W<'_, '_>
error: aborting due to 8 previous errors
Some errors occurred: E0308, E0366, E0367, E0495.
For more information about an error, try `rustc --explain E0308`.