2024-09-23 15:25:52 +08:00
|
|
|
//@ build-pass
|
|
|
|
|
//@ compile-flags: -Zvirtual-function-elimination=true -Clto=true
|
|
|
|
|
//@ only-x86_64
|
|
|
|
|
//@ no-prefer-dynamic
|
2025-09-26 13:59:06 +02:00
|
|
|
//@ ignore-backends: gcc
|
2024-09-23 15:25:52 +08:00
|
|
|
|
|
|
|
|
// issue #123955
|
|
|
|
|
pub fn test0() {
|
|
|
|
|
_ = Box::new(()) as Box<dyn Send>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// issue #124092
|
|
|
|
|
const X: for<'b> fn(&'b ()) = |&()| ();
|
|
|
|
|
pub fn test1() {
|
|
|
|
|
let _dyn_debug = Box::new(X) as Box<fn(&'static ())> as Box<dyn Send>;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|