about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-12-09 11:28:20 +0000
committerbors <bors@rust-lang.org>2022-12-09 11:28:20 +0000
commit816ec1ba350a1749b61574c81326cb91ed80bb4e (patch)
tree1d17e04addc1bcb9310ef1173871ecb59ba3b2f0 /compiler/rustc_mir_transform/src
parent552b63c1619498f1a17fd482f4bb87815d8fdc48 (diff)
parent20a4c7371710ed6cd219fc80580f9855917f93bf (diff)
downloadrust-816ec1ba350a1749b61574c81326cb91ed80bb4e.tar.gz
rust-816ec1ba350a1749b61574c81326cb91ed80bb4e.zip
Auto merge of #2718 - Pointerbender:o_tmpfile_flag, r=oli-obk
add graceful shim for the custom `O_TMPFILE` file opening flag plus test case

I'm trying if I can get the [`tempfile`](https://crates.io/crates/tempfile) crate to work nicely with miri. Right now miri errors out due to an unsupported flag `O_TMPFILE` (= `0x410000`) passed to [`OpenOptions::custom_flags`](https://github.com/Stebalien/tempfile/blob/92ae3e9d6e82bdcfcf114be459d234d3602be2d4/src/file/imp/unix.rs#L71-L86). Interestingly, `tempfile` has a fallback in case the underlying file system does not support the `O_TMPFILE` flag, in which case `open`/`open64` is expected to return the error code `EOPNOTSUPP` (= `95`). This PR adds support for this scenario and also includes a test case (relevant [zulip](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/miri.20and.20the.20.60tempfile.60.20crate) discussion).
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions