about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-01-25 16:59:27 +0100
committerGitHub <noreply@github.com>2019-01-25 16:59:27 +0100
commit141fa859b87534846b7793d026342ffaf5ad4639 (patch)
tree440eb006a6b4743ef1df6262b1b068a4142ec515 /src/libsyntax/parse
parent7779bb9907c0a9f237bb99e5384c73ede9d0ba6e (diff)
parent506393eaaf912ece2d216de4b6e2fd7ca04a945d (diff)
downloadrust-141fa859b87534846b7793d026342ffaf5ad4639.tar.gz
rust-141fa859b87534846b7793d026342ffaf5ad4639.zip
Rollup merge of #57734 - oli-obk:fixes_and_cleanups, r=pnkfelix
Fix evaluating trivial drop glue in constants

```rust
struct A;
impl Drop for A {
    fn drop(&mut self) {}
}

const FOO: Option<A> = None;

const BAR: () = (FOO, ()).1;
```

was erroring with

```
error: any use of this value will cause an error
 --> src/lib.rs:9:1
  |
9 | const BAR: () = (FOO, ()).1;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^-^
  |                           |
  |                           calling non-const function `std::ptr::real_drop_in_place::<(std::option::Option<A>, ())> - shim(Some((std::option::Option<A>, ())))`
  |
  = note: #[deny(const_err)] on by default

error: aborting due to previous error
```

before this PR. According to godbolt this last compiled successfully in 1.27
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions