summaryrefslogtreecommitdiffstats
path: root/src/test/ui/privacy/privacy1-rpass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/privacy/privacy1-rpass.rs')
-rw-r--r--src/test/ui/privacy/privacy1-rpass.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/privacy/privacy1-rpass.rs b/src/test/ui/privacy/privacy1-rpass.rs
new file mode 100644
index 000000000..4e54780da
--- /dev/null
+++ b/src/test/ui/privacy/privacy1-rpass.rs
@@ -0,0 +1,23 @@
+// run-pass
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+pub mod test2 {
+ // This used to generate an ICE (make sure that default functions are
+ // parented to their trait to find the first private thing as the trait).
+
+ struct B;
+ trait A { fn foo(&self) {} }
+ impl A for B {}
+
+ mod tests {
+ use super::A;
+ fn foo() {
+ let a = super::B;
+ a.foo();
+ }
+ }
+}
+
+
+pub fn main() {}