rust/tests/ui/auxiliary/issue-18502.rs
jyn 2ffb0de8cf Move most ui-fulldeps tests to ui
They pass fine. Only tests that required `extern crate rustc_*` or were
marked `ignore-stage1` have been keep in fulldeps.
2023-04-13 22:08:07 -05: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);
}