2015-05-02 05:34:19 -05:00
|
|
|
extern crate core;
|
|
|
|
|
|
|
|
use core::ops::Drop;
|
|
|
|
|
|
|
|
trait Bar {}
|
|
|
|
|
|
|
|
struct G<T: ?Sized> {
|
|
|
|
_ptr: *const T
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Drop for G<T> {
|
2020-09-02 02:40:56 -05:00
|
|
|
//~^ ERROR `Drop` impl requires `T: Sized`
|
2015-05-02 05:34:19 -05:00
|
|
|
fn drop(&mut self) {
|
|
|
|
if !self._ptr.is_null() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2019-05-28 13:46:13 -05:00
|
|
|
let x:G<dyn Bar>;
|
2015-05-02 05:34:19 -05:00
|
|
|
}
|