summaryrefslogtreecommitdiffstats
path: root/tests/ui/auxiliary/issue-18502.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/auxiliary/issue-18502.rs')
-rw-r--r--tests/ui/auxiliary/issue-18502.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/auxiliary/issue-18502.rs b/tests/ui/auxiliary/issue-18502.rs
new file mode 100644
index 000000000..4d4230607
--- /dev/null
+++ b/tests/ui/auxiliary/issue-18502.rs
@@ -0,0 +1,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);
+}