diff options
| author | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-01-18 13:31:05 +0100 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2019-01-18 13:31:05 +0100 |
| commit | efda6816bd29beea2702c7c3f76a252a405e60ae (patch) | |
| tree | c00141747fd2000905b27e2aa2da3793232e6152 /src/test/ui/consts | |
| parent | 1dc4e417fa2a73d5ffa24428df6b7d4dbbf41f4a (diff) | |
| download | rust-efda6816bd29beea2702c7c3f76a252a405e60ae.tar.gz rust-efda6816bd29beea2702c7c3f76a252a405e60ae.zip | |
Allow evaluating trivial drop glue in constants
Diffstat (limited to 'src/test/ui/consts')
| -rw-r--r-- | src/test/ui/consts/drop_none.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/consts/drop_none.rs b/src/test/ui/consts/drop_none.rs new file mode 100644 index 00000000000..86a197ffb99 --- /dev/null +++ b/src/test/ui/consts/drop_none.rs @@ -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() {} |
