Avoid comments that describe multiple use items. · model-checking/verify-rust-std@4320ba0 (original) (raw)

13 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -24,19 +24,17 @@ mod convert;
24 24 mod decode;
25 25 mod methods;
26 26
27 -// stable re-exports
28 27 #[stable(feature = "try_from", since = "1.34.0")]
29 28 pub use self::convert::CharTryFromError;
30 29 #[stable(feature = "char_from_str", since = "1.20.0")]
31 30 pub use self::convert::ParseCharError;
32 31 #[stable(feature = "decode_utf16", since = "1.9.0")]
33 32 pub use self::decode::{DecodeUtf16, DecodeUtf16Error};
34 33
35 -// perma-unstable re-exports
36 34 #[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
37 -pub use self::methods::encode_utf16_raw;
35 +pub use self::methods::encode_utf16_raw; // perma-unstable
38 36 #[unstable(feature = "char_internals", reason = "exposed only for libstd", issue = "none")]
39 -pub use self::methods::encode_utf8_raw;
37 +pub use self::methods::encode_utf8_raw; // perma-unstable
40 38
41 39 use crate::ascii;
42 40 use crate::error::Error;
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@
2 2 //!
3 3 //! See the [module-level documentation](super) for more.
4 4
5 +// No formatting: this file is nothing but re-exports, and their order is worth preserving.
6 +#![cfg_attr(rustfmt, rustfmt::skip)]
7 +
5 8 // Re-exported core operators
6 9 #[stable(feature = "core_prelude", since = "1.4.0")]
7 10 #[doc(no_inline)]
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@
4 4 //! This module is imported by default when `#![no_std]` is used in the same
5 5 //! manner as the standard library's prelude.
6 6
7 +// No formatting: this file is nothing but re-exports, and their order is worth preserving.
8 +#![cfg_attr(rustfmt, rustfmt::skip)]
9 +
7 10 #![stable(feature = "core_prelude", since = "1.4.0")]
8 11
9 12 mod common;
Original file line number Diff line number Diff line change
@@ -1809,10 +1809,9 @@ pub(crate) const unsafe fn align_offset<T: Sized>(p: *const T, a: usize) -> usiz
1809 1809 // FIXME(#75598): Direct use of these intrinsics improves codegen significantly at opt-level <=
1810 1810 // 1, where the method versions of these operations are not inlined.
1811 1811 use intrinsics::{
1812 - assume, cttz_nonzero, exact_div, mul_with_overflow, unchecked_rem, unchecked_sub,
1813 - wrapping_add, wrapping_mul, wrapping_sub,
1812 + assume, cttz_nonzero, exact_div, mul_with_overflow, unchecked_rem, unchecked_shl,
1813 +unchecked_shr, unchecked_sub, wrapping_add, wrapping_mul, wrapping_sub,
1814 1814 };
1815 -use intrinsics::{unchecked_shl, unchecked_shr};
1816 1815
1817 1816 /// Calculate multiplicative modular inverse of `x` modulo `m`.
1818 1817 ///
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
1 1 #![unstable(feature = "unicode_internals", issue = "none")]
2 2 #![allow(missing_docs)]
3 3
4 +// The `pub use` ones are for use in alloc, and are not re-exported in std.
5 +
6 +pub(crate) use unicode_data::alphabetic::lookup as Alphabetic;
7 +pub use unicode_data::case_ignorable::lookup as Case_Ignorable;
8 +pub use unicode_data::cased::lookup as Cased;
9 +pub(crate) use unicode_data::cc::lookup as Cc;
10 +pub use unicode_data::conversions;
11 +pub(crate) use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
12 +pub(crate) use unicode_data:🔡:lookup as Lowercase;
13 +pub(crate) use unicode_data::n::lookup as N;
14 +pub(crate) use unicode_data:🔠:lookup as Uppercase;
15 +pub(crate) use unicode_data::white_space::lookup as White_Space;
16 +
4 17 pub(crate) mod printable;
5 18 mod unicode_data;
6 19
@@ -16,16 +29,3 @@ mod unicode_data;
16 29 /// [Unicode 11.0 or later, Section 3.1 Versions of the Unicode Standard](https://www.unicode.org/versions/Unicode11.0.0/ch03.pdf#page=4).
17 30 #[stable(feature = "unicode_version", since = "1.45.0")]
18 31 pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;
19 -
20 -// For use in alloc, not re-exported in std.
21 -pub use unicode_data::{
22 - case_ignorable::lookup as Case_Ignorable, cased::lookup as Cased, conversions,
23 -};
24 -
25 -pub(crate) use unicode_data::alphabetic::lookup as Alphabetic;
26 -pub(crate) use unicode_data::cc::lookup as Cc;
27 -pub(crate) use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
28 -pub(crate) use unicode_data:🔡:lookup as Lowercase;
29 -pub(crate) use unicode_data::n::lookup as N;
30 -pub(crate) use unicode_data:🔠:lookup as Uppercase;
31 -pub(crate) use unicode_data::white_space::lookup as White_Space;
Original file line number Diff line number Diff line change
@@ -469,7 +469,6 @@ pub mod rt;
469 469 // The Rust prelude
470 470 pub mod prelude;
471 471
472 -// Public module declarations and re-exports
473 472 #[stable(feature = "rust1", since = "1.0.0")]
474 473 pub use alloc_crate::borrow;
475 474 #[stable(feature = "rust1", since = "1.0.0")]
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ pub mod usercalls {
28 28 pub use crate::sys::abi::usercalls::raw::{do_usercall, Usercalls as UsercallNrs};
29 29 pub use crate::sys::abi::usercalls::raw::{Register, RegisterArgument, ReturnValue};
30 30
31 -// fortanix-sgx-abi re-exports
32 31 pub use crate::sys::abi::usercalls::raw::Error;
33 32 pub use crate::sys::abi::usercalls::raw::{
34 33 ByteBuffer, Cancel, FifoDescriptor, Return, Usercall,
Original file line number Diff line number Diff line change
@@ -2,6 +2,9 @@
2 2 //!
3 3 //! See the [module-level documentation](super) for more.
4 4
5 +// No formatting: this file is nothing but re-exports, and their order is worth preserving.
6 +#![cfg_attr(rustfmt, rustfmt::skip)]
7 +
5 8 // Re-exported core operators
6 9 #[stable(feature = "rust1", since = "1.0.0")]
7 10 #[doc(no_inline)]
Original file line number Diff line number Diff line change
@@ -95,6 +95,9 @@
95 95 //! [book-enums]: ../../book/ch06-01-defining-an-enum.html
96 96 //! [book-iter]: ../../book/ch13-02-iterators.html
97 97
98 +// No formatting: this file is nothing but re-exports, and their order is worth preserving.
99 +#![cfg_attr(rustfmt, rustfmt::skip)]
100 +
98 101 #![stable(feature = "rust1", since = "1.0.0")]
99 102
100 103 mod common;
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
16 16 #![deny(unsafe_op_in_unsafe_fn)]
17 17 #![allow(unused_macros)]
18 18
19 -// Re-export some of our utilities which are expected by other crates.
20 19 pub use crate::panicking::{begin_panic, panic_count};
21 20 pub use core::panicking::{panic_display, panic_fmt};
22 21
Original file line number Diff line number Diff line change
@@ -39,12 +39,15 @@ pub mod time;
39 39 #[deny(unsafe_op_in_unsafe_fn)]
40 40 #[allow(unused)]
41 41 mod common;
42 +
42 43 pub use common::*;
43 44
44 45 mod helpers;
45 -// These exports are listed individually to work around Rust's glob import
46 -// conflict rules. If we glob export `helpers` and `common` together, then
47 -// the compiler complains about conflicts.
46 +
47 +// The following exports are listed individually to work around Rust's glob
48 +// import conflict rules. If we glob export `helpers` and `common` together,
49 +// then the compiler complains about conflicts.
50 +
48 51 pub use helpers::abort_internal;
49 52 pub use helpers::decode_error_kind;
50 53 use helpers::err2io;
Original file line number Diff line number Diff line change
@@ -41,13 +41,16 @@ pub mod time;
41 41 #[deny(unsafe_op_in_unsafe_fn)]
42 42 #[allow(unused)]
43 43 mod common;
44 +
44 45 pub use common::*;
45 46
46 47 #[path = "../wasi/helpers.rs"]
47 48 mod helpers;
48 -// These exports are listed individually to work around Rust's glob import
49 -// conflict rules. If we glob export `helpers` and `common` together, then
50 -// the compiler complains about conflicts.
49 +
50 +// The following exports are listed individually to work around Rust's glob
51 +// import conflict rules. If we glob export `helpers` and `common` together,
52 +// then the compiler complains about conflicts.
53 +
51 54 pub use helpers::abort_internal;
52 55 pub use helpers::decode_error_kind;
53 56 use helpers::err2io;
Original file line number Diff line number Diff line change
@@ -25,7 +25,6 @@
25 25 #![feature(test)]
26 26 #![allow(internal_features)]
27 27
28 -// Public reexports
29 28 pub use self::bench::{black_box, Bencher};
30 29 pub use self::console::run_tests_console;
31 30 pub use self::options::{ColorConfig, Options, OutputFormat, RunIgnored, ShouldPanic};