2023-07-27 10:51:02 -05:00
|
|
|
//@ known-bug: #103507
|
|
|
|
|
2022-01-14 05:39:29 -06:00
|
|
|
#![allow(unused)]
|
2024-04-19 10:54:41 -05:00
|
|
|
#![feature(const_trait_impl, negative_impls)]
|
2022-01-14 05:39:29 -06:00
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
use std::marker::Destruct;
|
|
|
|
|
|
|
|
const fn f<T: ~const Destruct>(x: T) {}
|
2022-01-14 05:39:29 -06:00
|
|
|
|
|
|
|
struct UnconstDrop;
|
|
|
|
|
|
|
|
impl Drop for UnconstDrop {
|
|
|
|
fn drop(&mut self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
const {
|
|
|
|
f(UnconstDrop);
|
2023-07-27 10:51:02 -05:00
|
|
|
//FIXME ~^ ERROR can't drop
|
2022-01-14 05:39:29 -06:00
|
|
|
}
|
|
|
|
}
|