rust/tests/ui/auxiliary/issue-18502.rs

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);
}