rust/tests/compile-fail
Samrat Man Singh 563fb8e43d Implement dup and close for stdin/stdout/stderr
Support F_DUPFD on stdin/stdout/stderr

Enable `close`-ing stdin/stdout/stderr

For `dup`, check if FD is `File` first

If not, clone the appropriate standard IO stream

Merge POSIX `close` and `dup` tests into same module

Also, add assertion that `write` on a closed FD returns an error.

Add `dup` as FileDescriptor trait fn

Also:
- Fix `close` so it drops `self` instead of reference to it
- Remove FD clamping in insert_fd_with_min_fd, since FDs 0-2 can be
closed

Fix fs_libc tests

Make error message when closing stdin/out/err more specific

Return io::Result from `FileDescriptor::dup`

Change error message when closing stdin/out/err

Refactor `FileDescriptor::dup` impl for `FileHandle`

Remove empty line
2020-09-09 23:26:33 +05:30
..
alloc
concurrency test unwinding past topmost frame of a stack 2020-08-01 14:20:05 +02:00
dangling_pointers make sure '&raw *' on a dangling raw ptr is UB 2020-06-20 14:28:55 +02:00
fs Implement dup and close for stdin/stdout/stderr 2020-09-09 23:26:33 +05:30
function_pointers rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
intrinsics bump Rust 2020-06-26 20:36:08 +02:00
panic with this, we support panics on Windows 2020-06-27 14:43:37 +02:00
stacked_borrows rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
sync Small fixes. 2020-05-25 00:02:54 +02:00
unaligned_pointers another optimization work-around 2020-09-07 11:23:09 +02:00
validity adjust error messages 2020-07-07 22:48:51 +02:00
abort-terminator.rs with this, we support panics on Windows 2020-06-27 14:43:37 +02:00
check_arg_count_too_few_args.rs Correct the test. 2020-05-04 23:22:00 -04:00
check_arg_count_too_many_args.rs Correct the test. 2020-05-04 23:22:00 -04:00
environ-gets-deallocated.rs fix some ignore-windows comments 2020-06-28 20:40:20 +02:00
erroneous_const.rs add test for unused ill-formed constant 2020-08-13 08:33:36 +02:00
extern_static.rs test referencing unsupported extern static 2020-07-27 23:32:15 +02:00
generator-pinned-moved.rs
invalid_bool.rs use standard black_box function 2020-09-07 11:29:47 +02:00
invalid_char.rs rustup for fixed error messages 2020-05-02 02:13:48 +02:00
invalid_enum_tag.rs bump Rust 2020-06-20 11:48:42 +02:00
invalid_int.rs
issue-miri-1112.rs rustup; fix error messages 2020-05-07 08:38:59 +02:00
memleak_rc.rs enable leak check tests on Windows 2020-07-23 15:56:38 +02:00
memleak.rs enable leak check tests on Windows 2020-07-23 15:56:38 +02:00
modifying_constants.rs
never_say_never.rs
never_transmute_humans.rs
never_transmute_void.rs
no_main.rs Move no_main test to compile-fail 2020-07-09 17:21:09 +02:00
null_pointer_deref_zst.rs rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
null_pointer_deref.rs rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
null_pointer_write_zst.rs rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
null_pointer_write.rs rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
overwriting_part_of_relocation_makes_the_rest_uninit.rs rename tests: undefined -> uninit 2020-04-27 12:32:03 +02:00
pointer_byte_read.rs
rc_as_ptr.rs rustup (and account for stabilization) 2020-05-30 09:23:25 +02:00
reading_half_a_pointer.rs
rustc-error.rs
shim_arg_size.rs
slice-too-big.rs
static_memory_modification1.rs
static_memory_modification2.rs
static_memory_modification3.rs
storage_dead_dangling.rs
transmute_fat1.rs
transmute-pair-uninit.rs rename tests: undefined -> uninit 2020-04-27 12:32:03 +02:00
uninit_buffer.rs Update to match rustc changes 2020-05-22 17:03:25 +02:00
uninit_byte_read.rs rename tests: undefined -> uninit 2020-04-27 12:32:03 +02:00
unreachable.rs
zst1.rs
zst2.rs
zst3.rs