about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-01-21 12:26:01 +0100
committerPietro Albini <pietro@pietroalbini.org>2018-01-21 12:26:01 +0100
commite9d0141fa9d55cfafbcdfe81acec94b974c7d487 (patch)
tree67683200ed239aa313a8a53add05ba8f2eb9b4f3 /src/test
parent8d3e93beae9562f8b32b7f82c3824389f6ac5bad (diff)
downloadrust-e9d0141fa9d55cfafbcdfe81acec94b974c7d487.tar.gz
rust-e9d0141fa9d55cfafbcdfe81acec94b974c7d487.zip
Fix ICE with `use self;`
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/issue-47623.rs13
-rw-r--r--src/test/ui/issue-47623.stderr8
2 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/issue-47623.rs b/src/test/ui/issue-47623.rs
new file mode 100644
index 00000000000..0c886fdb52f
--- /dev/null
+++ b/src/test/ui/issue-47623.rs
@@ -0,0 +1,13 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+use self; //~ERROR `self` imports are only allowed within a { } list
+
+fn main() {}
diff --git a/src/test/ui/issue-47623.stderr b/src/test/ui/issue-47623.stderr
new file mode 100644
index 00000000000..c5a42d4d846
--- /dev/null
+++ b/src/test/ui/issue-47623.stderr
@@ -0,0 +1,8 @@
+error[E0429]: `self` imports are only allowed within a { } list
+  --> $DIR/issue-47623.rs:11:5
+   |
+11 | use self; //~ERROR `self` imports are only allowed within a { } list
+   |     ^^^^
+
+error: aborting due to previous error
+