Allow evaluating trivial drop glue in constants

This commit is contained in:
Oliver Scherer 2019-01-18 13:31:05 +01:00
parent 1dc4e417fa
commit efda6816bd
2 changed files with 29 additions and 13 deletions

View file

@ -0,0 +1,13 @@
// compile-pass
#![allow(dead_code)]
struct A;
impl Drop for A {
fn drop(&mut self) {}
}
const FOO: Option<A> = None;
const BAR: () = (FOO, ()).1;
fn main() {}