summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/unused-warning-point-at-identifier.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/span/unused-warning-point-at-identifier.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/ui/span/unused-warning-point-at-identifier.rs b/src/test/ui/span/unused-warning-point-at-identifier.rs
new file mode 100644
index 000000000..af4834503
--- /dev/null
+++ b/src/test/ui/span/unused-warning-point-at-identifier.rs
@@ -0,0 +1,30 @@
+// run-pass
+
+#![warn(unused)]
+
+enum Enum { //~ WARN enum `Enum` is never used
+ A,
+ B,
+ C,
+ D,
+}
+
+struct Struct { //~ WARN struct `Struct` is never constructed
+ a: usize,
+ b: usize,
+ c: usize,
+ d: usize,
+}
+
+fn func() -> usize { //~ WARN function `func` is never used
+ 3
+}
+
+fn
+func_complete_span() //~ WARN function `func_complete_span` is never used
+-> usize
+{
+ 3
+}
+
+fn main() {}