about summary refs log tree commit diff
path: root/tests/ui/pub/pub-ident-fn-with-lifetime-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pub/pub-ident-fn-with-lifetime-2.rs')
-rw-r--r--tests/ui/pub/pub-ident-fn-with-lifetime-2.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/pub/pub-ident-fn-with-lifetime-2.rs b/tests/ui/pub/pub-ident-fn-with-lifetime-2.rs
new file mode 100644
index 00000000000..1ee8c84f13b
--- /dev/null
+++ b/tests/ui/pub/pub-ident-fn-with-lifetime-2.rs
@@ -0,0 +1,6 @@
+pub   bar<'a>(&self, _s: &'a usize) -> bool { true }
+//~^ ERROR missing `fn` for method definition
+
+fn main() {
+    bar(2);
+}