about summary refs log tree commit diff
path: root/tests/ui/consts/const-block-const-bound.rs
blob: b0d5e19ad55411a7775eeef13a70a43dab001e81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//@ known-bug: #103507

#![allow(unused)]
#![feature(const_trait_impl, inline_const, 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
    }
}