rust/tests/ui-fulldeps/auxiliary/issue-18502.rs
2023-01-11 09:32:08 +00:00

22 lines
311 B
Rust

#![crate_type="lib"]
struct Foo;
// This is the ICE trigger
struct Formatter;
trait Show {
fn fmt(&self);
}
impl Show for Foo {
fn fmt(&self) {}
}
fn bar<T>(f: extern "Rust" fn(&T), t: &T) { }
// ICE requirement: this has to be marked as inline
#[inline]
pub fn baz() {
bar(Show::fmt, &Foo);
}