2015-05-02 12:34:19 +02:00
|
|
|
extern crate core;
|
|
|
|
|
|
|
|
use core::ops::Drop;
|
|
|
|
|
|
|
|
trait Bar {}
|
|
|
|
|
|
|
|
struct G<T: ?Sized> {
|
|
|
|
_ptr: *const T
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Drop for G<T> {
|
2017-12-19 15:04:02 +01:00
|
|
|
//~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367]
|
2015-05-02 12:34:19 +02:00
|
|
|
fn drop(&mut self) {
|
|
|
|
if !self._ptr.is_null() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x:G<Bar>;
|
|
|
|
}
|