summaryrefslogtreecommitdiffstats
path: root/src/test/ui/macros/issue-100199.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/macros/issue-100199.rs')
-rw-r--r--src/test/ui/macros/issue-100199.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/macros/issue-100199.rs b/src/test/ui/macros/issue-100199.rs
new file mode 100644
index 000000000..6e50afa07
--- /dev/null
+++ b/src/test/ui/macros/issue-100199.rs
@@ -0,0 +1,16 @@
+#[issue_100199::struct_with_bound] //~ ERROR cannot find trait `MyTrait` in the crate root
+struct Foo {}
+// The above must be on the first line so that it's span points to pos 0.
+// This used to trigger an ICE because the diagnostic emitter would get
+// an unexpected dummy span (lo == 0 == hi) while attempting to print a
+// suggestion.
+
+// aux-build: issue-100199.rs
+
+extern crate issue_100199;
+
+mod traits {
+ pub trait MyTrait {}
+}
+
+fn main() {}