summaryrefslogtreecommitdiffstats
path: root/tests/ui/auxiliary/issue-18502.rs
blob: 4d4230607aad78a8b34fa1da110f47ad61355b88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#![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);
}