1#![warn(
2 explicit_outlives_requirements,
3 invalid_html_tags,
4 macro_use_extern_crate,
5 missing_copy_implementations,
6 missing_crate_level_docs,
7 missing_debug_implementations,
8 missing_doc_code_examples,
9 missing_docs,
10 pointer_structural_match,
11 private_doc_tests,
12 single_use_lifetimes,
13 trivial_casts,
14 trivial_numeric_casts,
15 unreachable_pub,
16 unused_crate_dependencies,
18 unused_extern_crates,
19 unused_import_braces,
20 unused_lifetimes,
21 unused_qualifications,
22 unused_results,
23 variant_size_differences,
24 clippy::pedantic,
25 clippy::nursery,
26 clippy::cargo,
27 clippy::clone_on_ref_ptr,
28 clippy::exhaustive_enums,
29 clippy::exhaustive_structs,
30 clippy::filetype_is_file,
31 clippy::float_cmp_const,
32 clippy::if_then_some_else_none,
33 clippy::lossy_float_literal,
34 clippy::rc_buffer,
35)]
36#![allow(
37 clippy::missing_errors_doc,
39 clippy::multiple_crate_versions,
40 clippy::must_use_candidate,
41)]
42#![doc(test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
45
46#[cfg(doctest)]
78#[macro_use]
79extern crate doc_comment;
80#[cfg(doctest)]
81doctest!("../README.md");
82
83#[cfg(doctest)]
85use doc_comment as _;
86
87#[cfg(not(any(
88 target_os = "linux",
89 target_os = "emscripten",
90 target_os = "fuchsia",
91 target_os = "l4re",
92 target_os = "netbsd",
93 target_os = "openbsd",
94 target_os = "android",
95 target_os = "redox",
96 target_env = "newlib",
97 any(target_os = "solaris", target_os = "illumos"),
98 any(target_os = "macos", target_os = "ios", target_os = "freebsd"),
99 target_os = "haiku",
100 target_os = "wasi",
101)))]
102compile_error!("Unsupported `target_os`.");
103
104#[cfg_attr(target_family = "unix", path = "unix.rs")]
105#[cfg_attr(target_os = "wasi", path = "wasi.rs")]
106mod os;
107
108pub use self::os::{clear_errno, describe_errno, get_errno, set_errno};