about summary refs log tree commit diff
path: root/tests/ui/proc-macro
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/proc-macro')
-rw-r--r--tests/ui/proc-macro/quote/not-repeatable.rs4
-rw-r--r--tests/ui/proc-macro/quote/not-repeatable.stderr11
2 files changed, 12 insertions, 3 deletions
diff --git a/tests/ui/proc-macro/quote/not-repeatable.rs b/tests/ui/proc-macro/quote/not-repeatable.rs
index 0291e4ddf88..373f0e74dbd 100644
--- a/tests/ui/proc-macro/quote/not-repeatable.rs
+++ b/tests/ui/proc-macro/quote/not-repeatable.rs
@@ -8,5 +8,7 @@ struct Ipv4Addr;
 
 fn main() {
     let ip = Ipv4Addr;
-    let _ = quote! { $($ip)* }; //~ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
+    let _ = quote! { $($ip)* };
+    //~^ ERROR the method `quote_into_iter` exists for struct `Ipv4Addr`, but its trait bounds were not satisfied
+    //~| ERROR type annotations needed
 }
diff --git a/tests/ui/proc-macro/quote/not-repeatable.stderr b/tests/ui/proc-macro/quote/not-repeatable.stderr
index aeda08d7de6..ff31799abb0 100644
--- a/tests/ui/proc-macro/quote/not-repeatable.stderr
+++ b/tests/ui/proc-macro/quote/not-repeatable.stderr
@@ -20,6 +20,13 @@ note: the traits `Iterator` and `ToTokens` must be implemented
   --> $SRC_DIR/proc_macro/src/to_tokens.rs:LL:COL
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
 
-error: aborting due to 1 previous error
+error[E0282]: type annotations needed
+  --> $DIR/not-repeatable.rs:11:13
+   |
+LL |     let _ = quote! { $($ip)* };
+   |             ^^^^^^^^^^^^^^^^^^ cannot infer type
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0599`.
+Some errors have detailed explanations: E0282, E0599.
+For more information about an error, try `rustc --explain E0282`.