summary refs log tree commit diff
path: root/src/test/ui/issues/issue-17959.rs
blob: d56f346ecd45a4899148bb15e55dcaf2683db2e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
extern crate core;

use core::ops::Drop;

trait Bar {}

struct G<T: ?Sized> {
    _ptr: *const T
}

impl<T> Drop for G<T> {
//~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367]
    fn drop(&mut self) {
        if !self._ptr.is_null() {
        }
    }
}

fn main() {
    let x:G<Bar>;
}