rust/tests/ui/consts/const-block-const-bound.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
328 B
Rust
Raw Normal View History

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