]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17959.stderr
Auto merge of #53289 - ljedrz:improve_lexer, r=michaelwoerister
[rust.git] / src / test / ui / issues / issue-17959.stderr
1 error[E0367]: The requirement `T: std::marker::Sized` is added only by the Drop impl.
2   --> $DIR/issue-17959.rs:21:1
3    |
4 LL | / impl<T> Drop for G<T> {
5 LL | | //~^ ERROR: The requirement `T: std::marker::Sized` is added only by the Drop impl. [E0367]
6 LL | |     fn drop(&mut self) {
7 LL | |         if !self._ptr.is_null() {
8 LL | |         }
9 LL | |     }
10 LL | | }
11    | |_^
12    |
13 note: The same requirement must be part of the struct/enum definition
14   --> $DIR/issue-17959.rs:17:1
15    |
16 LL | / struct G<T: ?Sized> {
17 LL | |     _ptr: *const T
18 LL | | }
19    | |_^
20
21 error: aborting due to previous error
22
23 For more information about this error, try `rustc --explain E0367`.