about summary refs log tree commit diff
path: root/tests/ui/codegen/mono-impossible-drop.rs
blob: dec013cfe54b3b8c562ad2264bae44f6f3d30962 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ compile-flags: -Clink-dead-code=on --crate-type=lib
//@ build-pass

#![feature(trivial_bounds)]
#![allow(trivial_bounds)]

// Make sure we don't monomorphize the drop impl for `Baz`, since it has predicates
// that don't hold under a reveal-all param env.

trait Foo {
    type Assoc;
}

struct Bar;

struct Baz(<Bar as Foo>::Assoc)
where
    Bar: Foo;