Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 0 additions & 41 deletions library/std/src/os/fortanix_sgx/ffi.rs

This file was deleted.

1 change: 1 addition & 0 deletions library/std/src/os/fortanix_sgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pub mod mem {
}

pub mod arch;
#[path = "../../sys/ffi/bytes.rs"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needn't be a blocker but I'm personally not a fan of using #[path] except as a last resort. Is there no way to use the normal import system for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the platforms could use it than pub use it. It might need a docs collapse or whatever. I’m not convinced it’ll turn out better, only more verbose. It’s used frequently in std::sys, but, yeah, this case is public. Is this for tooling reasons?
I’ll try that in a week when I’m not at the LLVM meeting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s a significant downside: all cfg_select!s would be active for all platforms, not just the platforms intended for a given module, so they’d need fallthrough cases, which would break the static checking

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that is a significant downside, yeah. In that case I don't hate it enough to insist but I am sad that it's necessary.

pub mod ffi;
pub mod io;

Expand Down
41 changes: 0 additions & 41 deletions library/std/src/os/hermit/ffi.rs

This file was deleted.

1 change: 1 addition & 0 deletions library/std/src/os/hermit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#[stable(feature = "rust1", since = "1.0.0")]
pub extern crate hermit_abi;

#[path = "../../sys/ffi/bytes.rs"]
pub mod ffi;
pub mod io;

Expand Down
1 change: 1 addition & 0 deletions library/std/src/os/motor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![unstable(feature = "motor_ext", issue = "147456")]

#[path = "../../sys/ffi/utf8.rs"]
pub mod ffi;
pub mod process;
41 changes: 0 additions & 41 deletions library/std/src/os/solid/ffi.rs

This file was deleted.

1 change: 1 addition & 0 deletions library/std/src/os/solid/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![stable(feature = "rust1", since = "1.0.0")]
#![forbid(unsafe_op_in_unsafe_fn)]

#[path = "../../sys/ffi/bytes.rs"]
pub mod ffi;
pub mod io;

Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/uefi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
#![forbid(unsafe_op_in_unsafe_fn)]

pub mod env;
#[path = "../windows/ffi.rs"]
#[path = "../../sys/ffi/windows.rs"]
pub mod ffi;
42 changes: 0 additions & 42 deletions library/std/src/os/unix/ffi/mod.rs

This file was deleted.

70 changes: 0 additions & 70 deletions library/std/src/os/unix/ffi/os_str.rs

This file was deleted.

1 change: 1 addition & 0 deletions library/std/src/os/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ mod platform {
pub use crate::os::vxworks::*;
}

#[path = "../../sys/ffi/bytes.rs"]
pub mod ffi;
pub mod fs;
pub mod io;
Expand Down
11 changes: 0 additions & 11 deletions library/std/src/os/wasi/ffi.rs

This file was deleted.

1 change: 1 addition & 0 deletions library/std/src/os/wasi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#![forbid(unsafe_op_in_unsafe_fn)]
#![doc(cfg(target_os = "wasi"))]

#[path = "../../sys/ffi/bytes.rs"]
pub mod ffi;
pub mod fs;
pub mod io;
Expand Down
1 change: 1 addition & 0 deletions library/std/src/os/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#![doc(cfg(windows))]
#![deny(unsafe_op_in_unsafe_fn)]

#[path = "../../sys/ffi/windows.rs"]
pub mod ffi;
pub mod fs;
pub mod io;
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/xous/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#![allow(unused_variables)]
#![stable(feature = "rust1", since = "1.0.0")]

#[path = "../unix/ffi/os_str.rs"]
#[path = "../../sys/ffi/bytes.rs"]
mod os_str;

#[stable(feature = "rust1", since = "1.0.0")]
Expand Down
Loading
Loading