summaryrefslogtreecommitdiffstats
path: root/src/test/ui/annotate-snippet
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/annotate-snippet')
-rw-r--r--src/test/ui/annotate-snippet/auxiliary/multispan.rs37
-rw-r--r--src/test/ui/annotate-snippet/missing-type.rs5
-rw-r--r--src/test/ui/annotate-snippet/missing-type.stderr6
-rw-r--r--src/test/ui/annotate-snippet/multispan.rs28
-rw-r--r--src/test/ui/annotate-snippet/multispan.stderr42
5 files changed, 0 insertions, 118 deletions
diff --git a/src/test/ui/annotate-snippet/auxiliary/multispan.rs b/src/test/ui/annotate-snippet/auxiliary/multispan.rs
deleted file mode 100644
index c05d15643..000000000
--- a/src/test/ui/annotate-snippet/auxiliary/multispan.rs
+++ /dev/null
@@ -1,37 +0,0 @@
-// force-host
-// no-prefer-dynamic
-
-#![crate_type = "proc-macro"]
-#![feature(proc_macro_diagnostic, proc_macro_span, proc_macro_def_site)]
-
-extern crate proc_macro;
-
-use proc_macro::{TokenStream, TokenTree, Span, Diagnostic};
-
-fn parse(input: TokenStream) -> Result<(), Diagnostic> {
- let mut hi_spans = vec![];
- for tree in input {
- if let TokenTree::Ident(ref ident) = tree {
- if ident.to_string() == "hi" {
- hi_spans.push(ident.span());
- }
- }
- }
-
- if !hi_spans.is_empty() {
- return Err(Span::def_site()
- .error("hello to you, too!")
- .span_note(hi_spans, "found these 'hi's"));
- }
-
- Ok(())
-}
-
-#[proc_macro]
-pub fn hello(input: TokenStream) -> TokenStream {
- if let Err(diag) = parse(input) {
- diag.emit();
- }
-
- TokenStream::new()
-}
diff --git a/src/test/ui/annotate-snippet/missing-type.rs b/src/test/ui/annotate-snippet/missing-type.rs
deleted file mode 100644
index b0d8b5fba..000000000
--- a/src/test/ui/annotate-snippet/missing-type.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// compile-flags: --error-format human-annotate-rs -Z unstable-options
-
-pub fn main() {
- let x: Iter; //~ ERROR cannot find type `Iter` in this scope
-}
diff --git a/src/test/ui/annotate-snippet/missing-type.stderr b/src/test/ui/annotate-snippet/missing-type.stderr
deleted file mode 100644
index c16f022a7..000000000
--- a/src/test/ui/annotate-snippet/missing-type.stderr
+++ /dev/null
@@ -1,6 +0,0 @@
-error[E0412]: cannot find type `Iter` in this scope
- --> $DIR/missing-type.rs:4:12
- |
-LL | let x: Iter;
- | ^^^^ not found in this scope
- |
diff --git a/src/test/ui/annotate-snippet/multispan.rs b/src/test/ui/annotate-snippet/multispan.rs
deleted file mode 100644
index 69d7e1a9d..000000000
--- a/src/test/ui/annotate-snippet/multispan.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// aux-build:multispan.rs
-// compile-flags: --error-format human-annotate-rs -Z unstable-options
-
-#![feature(proc_macro_hygiene)]
-
-extern crate multispan;
-
-use multispan::hello;
-
-fn main() {
- // This one emits no error.
- hello!();
-
- // Exactly one 'hi'.
- hello!(hi); //~ ERROR hello to you, too!
-
- // Now two, back to back.
- hello!(hi hi); //~ ERROR hello to you, too!
-
- // Now three, back to back.
- hello!(hi hi hi); //~ ERROR hello to you, too!
-
- // Now several, with spacing.
- hello!(hi hey hi yo hi beep beep hi hi); //~ ERROR hello to you, too!
- hello!(hi there, hi how are you? hi... hi.); //~ ERROR hello to you, too!
- hello!(whoah. hi di hi di ho); //~ ERROR hello to you, too!
- hello!(hi good hi and good bye); //~ ERROR hello to you, too!
-}
diff --git a/src/test/ui/annotate-snippet/multispan.stderr b/src/test/ui/annotate-snippet/multispan.stderr
deleted file mode 100644
index baed54c59..000000000
--- a/src/test/ui/annotate-snippet/multispan.stderr
+++ /dev/null
@@ -1,42 +0,0 @@
-error: hello to you, too!
- --> $DIR/multispan.rs:15:5
- |
-LL | hello!(hi);
- | ^^^^^^^^^^
- |
-error: hello to you, too!
- --> $DIR/multispan.rs:18:5
- |
-LL | hello!(hi hi);
- | ^^^^^^^^^^^^^
- |
-error: hello to you, too!
- --> $DIR/multispan.rs:21:5
- |
-LL | hello!(hi hi hi);
- | ^^^^^^^^^^^^^^^^
- |
-error: hello to you, too!
- --> $DIR/multispan.rs:24:5
- |
-LL | hello!(hi hey hi yo hi beep beep hi hi);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-error: hello to you, too!
- --> $DIR/multispan.rs:25:5
- |
-LL | hello!(hi there, hi how are you? hi... hi.);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-error: hello to you, too!
- --> $DIR/multispan.rs:26:5
- |
-LL | hello!(whoah. hi di hi di ho);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |
-error: hello to you, too!
- --> $DIR/multispan.rs:27:5
- |
-LL | hello!(hi good hi and good bye);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- |