//@ compile-flags: -Zvalidate-mir -Zinline-mir=yes #![feature(unboxed_closures)] use std::sync::Arc; pub struct WeakOnce(); //~^ ERROR type parameter `T` is never used impl WeakOnce { extern "rust-call" fn try_get(&self) -> Option> {} //~^ ERROR functions with the "rust-call" ABI must take a single non-self tuple argument //~| ERROR mismatched types pub fn get(&self) -> Arc { self.try_get() .unwrap_or_else(|| panic!("Singleton {} not available", std::any::type_name::())) } } fn main() {}