mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
21 lines
328 B
Rust
21 lines
328 B
Rust
//@ known-bug: #103507
|
|
|
|
#![allow(unused)]
|
|
#![feature(const_trait_impl, negative_impls)]
|
|
|
|
use std::marker::Destruct;
|
|
|
|
const fn f<T: ~const Destruct>(x: T) {}
|
|
|
|
struct UnconstDrop;
|
|
|
|
impl Drop for UnconstDrop {
|
|
fn drop(&mut self) {}
|
|
}
|
|
|
|
fn main() {
|
|
const {
|
|
f(UnconstDrop);
|
|
//FIXME ~^ ERROR can't drop
|
|
}
|
|
}
|