about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-08-20 00:03:40 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2018-08-20 00:07:08 +0300
commit7b47fd793fba4e0ce6c7fb4e50652bae0ff95fc0 (patch)
tree8da8a8b5cdcf0ca352fb760c6a3ba93f45becd0b /src/test
parent3ac79c718475fd29b8be34dde667b683390c2aee (diff)
downloadrust-7b47fd793fba4e0ce6c7fb4e50652bae0ff95fc0.tar.gz
rust-7b47fd793fba4e0ce6c7fb4e50652bae0ff95fc0.zip
resolve: Reject some inaccessible candidates sooner during import resolution
This allows import resolution to progress in cases like #53140
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/imports/issue-53140.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/imports/issue-53140.rs b/src/test/ui/imports/issue-53140.rs
new file mode 100644
index 00000000000..dcfa054f251
--- /dev/null
+++ b/src/test/ui/imports/issue-53140.rs
@@ -0,0 +1,21 @@
+// 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.
+
+// compile-pass
+
+mod m {
+    pub struct S(u8);
+
+    use S as Z;
+}
+
+use m::*;
+
+fn main() {}