about summary refs log tree commit diff
path: root/src/test/compile-fail/const-pattern-irrefutable.rs
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-07-29 15:19:29 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-08-01 19:09:58 +0000
commit6372a6d7c271c58bc56dd35a2f58599d5429b39a (patch)
tree51444b9d7fc6639f540f26da192d4b87362566fc /src/test/compile-fail/const-pattern-irrefutable.rs
parent07c706b57c863506e9ecee8e9006dbde84f9155c (diff)
downloadrust-6372a6d7c271c58bc56dd35a2f58599d5429b39a.tar.gz
rust-6372a6d7c271c58bc56dd35a2f58599d5429b39a.zip
Improve diagnostics for pattern bindings that illegally shadow items.
Improve unused import detection.
Diffstat (limited to 'src/test/compile-fail/const-pattern-irrefutable.rs')
-rw-r--r--src/test/compile-fail/const-pattern-irrefutable.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/compile-fail/const-pattern-irrefutable.rs b/src/test/compile-fail/const-pattern-irrefutable.rs
index 75b6397f4eb..11003067070 100644
--- a/src/test/compile-fail/const-pattern-irrefutable.rs
+++ b/src/test/compile-fail/const-pattern-irrefutable.rs
@@ -25,4 +25,5 @@ fn main() {
                //~^ NOTE cannot be named the same as a constant
     let d = 4; //~ ERROR let bindings cannot shadow constants
                //~^ NOTE cannot be named the same as a constant
+    fn f() {} // Check that the `NOTE`s still work with an item here (c.f. issue #35115).
 }