Add a test that imports can't circumvent exports
This commit is contained in:
parent
1dd63ff42d
commit
a5ccead3fd
1 changed files with 19 additions and 0 deletions
19
src/test/compile-fail/export-import.rs
Normal file
19
src/test/compile-fail/export-import.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// xfail-boot
|
||||
// error-pattern: unresolved name
|
||||
|
||||
import m.unexported;
|
||||
|
||||
mod m {
|
||||
export exported;
|
||||
|
||||
fn exported() {
|
||||
}
|
||||
|
||||
fn unexported() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fn main() {
|
||||
unexported();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue