mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
Add regression test
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#![feature(const_trait_impl)]
|
||||
#![feature(const_destruct)]
|
||||
//@ check-pass
|
||||
|
||||
use std::marker::Destruct;
|
||||
|
||||
struct NotConstDrop;
|
||||
|
||||
impl Drop for NotConstDrop {
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
struct ConstDrop(NotConstDrop);
|
||||
|
||||
impl const Drop for ConstDrop {
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
struct ConstDrop2<T>(T);
|
||||
|
||||
impl<T> const Drop for ConstDrop2<T> {
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
struct ConstDrop3<T>(T);
|
||||
|
||||
impl<T: [const] Destruct> const Drop for ConstDrop3<T> {
|
||||
fn drop(&mut self) {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
Reference in New Issue
Block a user