From 0e241d0059b0d2c2b1dc66883c1e1ebc8b474111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esteban=20K=C3=BCber?= Date: Sat, 25 Nov 2017 06:26:46 -0800 Subject: [PATCH] Add inline `compile-fail` markers to tests --- src/test/ui/suggestions/pub-ident-fn-2.rs | 1 + src/test/ui/suggestions/pub-ident-fn-or-struct-2.rs | 1 + src/test/ui/suggestions/pub-ident-fn-or-struct.rs | 1 + src/test/ui/suggestions/pub-ident-fn.rs | 1 + src/test/ui/suggestions/pub-ident-struct.rs | 1 + 5 files changed, 5 insertions(+) diff --git a/src/test/ui/suggestions/pub-ident-fn-2.rs b/src/test/ui/suggestions/pub-ident-fn-2.rs index 40c50a4b8dd9..44884bfcdfdc 100644 --- a/src/test/ui/suggestions/pub-ident-fn-2.rs +++ b/src/test/ui/suggestions/pub-ident-fn-2.rs @@ -9,6 +9,7 @@ // except according to those terms. pub foo(s: usize) { bar() } +//~^ ERROR missing `fn` for method definition fn main() { foo(2); diff --git a/src/test/ui/suggestions/pub-ident-fn-or-struct-2.rs b/src/test/ui/suggestions/pub-ident-fn-or-struct-2.rs index 6b5ae19e6ff9..1ccadc8a40b7 100644 --- a/src/test/ui/suggestions/pub-ident-fn-or-struct-2.rs +++ b/src/test/ui/suggestions/pub-ident-fn-or-struct-2.rs @@ -9,5 +9,6 @@ // except according to those terms. pub S(); +//~^ ERROR missing `fn` or `struct` for method or struct definition fn main() {} diff --git a/src/test/ui/suggestions/pub-ident-fn-or-struct.rs b/src/test/ui/suggestions/pub-ident-fn-or-struct.rs index 8bb1c6afcbb1..0664918945b4 100644 --- a/src/test/ui/suggestions/pub-ident-fn-or-struct.rs +++ b/src/test/ui/suggestions/pub-ident-fn-or-struct.rs @@ -9,5 +9,6 @@ // except according to those terms. pub S (foo) bar +//~^ ERROR missing `fn` or `struct` for method or struct definition fn main() {} diff --git a/src/test/ui/suggestions/pub-ident-fn.rs b/src/test/ui/suggestions/pub-ident-fn.rs index 043cf9328c92..1d6419964209 100644 --- a/src/test/ui/suggestions/pub-ident-fn.rs +++ b/src/test/ui/suggestions/pub-ident-fn.rs @@ -9,6 +9,7 @@ // except according to those terms. pub foo(s: usize) -> bool { true } +//~^ ERROR missing `fn` for method definition fn main() { foo(2); diff --git a/src/test/ui/suggestions/pub-ident-struct.rs b/src/test/ui/suggestions/pub-ident-struct.rs index 3e14a36dbab6..d08d498f87a0 100644 --- a/src/test/ui/suggestions/pub-ident-struct.rs +++ b/src/test/ui/suggestions/pub-ident-struct.rs @@ -9,5 +9,6 @@ // except according to those terms. pub S { +//~^ ERROR missing `struct` for struct definition } fn main() {}