diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-17959.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-17959.rs b/src/test/ui/issues/issue-17959.rs new file mode 100644 index 000000000..8bf9e6236 --- /dev/null +++ b/src/test/ui/issues/issue-17959.rs @@ -0,0 +1,21 @@ +extern crate core; + +use core::ops::Drop; + +trait Bar {} + +struct G<T: ?Sized> { + _ptr: *const T +} + +impl<T> Drop for G<T> { +//~^ ERROR `Drop` impl requires `T: Sized` + fn drop(&mut self) { + if !self._ptr.is_null() { + } + } +} + +fn main() { + let x:G<dyn Bar>; +} |