about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/drop-manually-drop.rs
blob: 62e8a815f1002ef05eeab1e5b68f6af371c1bd5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//@[new] compile-flags: -Znext-solver
//@ revisions: old new
//@ check-pass

#![feature(const_destruct)]
#![feature(const_trait_impl)]

use std::mem::ManuallyDrop;

struct Moose;

impl Drop for Moose {
    fn drop(&mut self) {}
}

struct ConstDropper<T>(ManuallyDrop<T>);

impl<T> const Drop for ConstDropper<T> {
    fn drop(&mut self) {}
}

const fn foo(_var: ConstDropper<Moose>) {}

fn main() {}