about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorNODA, Kai <nodakai@gmail.com>2014-12-03 06:06:59 +0800
committerNODA, Kai <nodakai@gmail.com>2014-12-04 11:19:55 +0800
commit3980cdecd073789fb5ff7256e2ca40685a289b01 (patch)
tree007c1af0e17e6c4bd21b18034d87d9e24a9c58af /src/test
parent805a06ca6a4f0999e13508e6271e3589f2c4c1b2 (diff)
downloadrust-3980cdecd073789fb5ff7256e2ca40685a289b01.tar.gz
rust-3980cdecd073789fb5ff7256e2ca40685a289b01.zip
libstd: explicitly disallow io::fs::File to open a directory.
On *BSD systems, we can open(2) a directory and directly read(2) from
it due to an old tradition.  We should avoid doing so by explicitly
calling fstat(2) to check the type of the opened file.

Opening a directory as a module file can't always be avoided.
Even when there's no "path" attribute trick involved, there can always
be a *directory* named "my_module.rs".

Fix #12460

Signed-off-by: NODA, Kai <nodakai@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-5806.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/compile-fail/issue-5806.rs b/src/test/compile-fail/issue-5806.rs
index 702f02c721d..597366a1b35 100644
--- a/src/test/compile-fail/issue-5806.rs
+++ b/src/test/compile-fail/issue-5806.rs
@@ -18,9 +18,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-freebsd FIXME #12460
-
 #[path = "../compile-fail"]
-mod foo; //~ ERROR: illegal operation on a directory
+mod foo; //~ ERROR: a directory
 
 fn main() {}