3 impl Drop for WithDtor {
7 static PROMOTION_FAIL_S: Option<&'static WithDtor> = Some(&WithDtor);
8 //~^ ERROR destructor of
9 //~| ERROR temporary value dropped while borrowed
11 const PROMOTION_FAIL_C: Option<&'static WithDtor> = Some(&WithDtor);
12 //~^ ERROR destructor of
13 //~| ERROR temporary value dropped while borrowed
15 static EARLY_DROP_S: i32 = (WithDtor, 0).1;
16 //~^ ERROR destructor of
18 const EARLY_DROP_C: i32 = (WithDtor, 0).1;
19 //~^ ERROR destructor of
21 const fn const_drop<T>(_: T) {}
22 //~^ ERROR destructor of
24 const fn const_drop2<T>(x: T) {
26 //~^ ERROR destructor of
29 const EARLY_DROP_C_OPTION: i32 = (Some(WithDtor), 0).1;
30 //~^ ERROR destructor of
32 const HELPER: Option<WithDtor> = Some(WithDtor);
34 const EARLY_DROP_C_OPTION_CONSTANT: i32 = (HELPER, 0).1;
35 //~^ ERROR destructor of