Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #73850

Closed
wants to merge 13 commits into from
Closed
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
2 changes: 1 addition & 1 deletion src/libcore/macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ macro_rules! assert_ne {
/// An unchecked assertion allows a program in an inconsistent state to keep
/// running, which might have unexpected consequences but does not introduce
/// unsafety as long as this only happens in safe code. The performance cost
/// of assertions, is however, not measurable in general. Replacing [`assert!`]
/// of assertions, however, is not measurable in general. Replacing [`assert!`]
/// with `debug_assert!` is thus only encouraged after thorough profiling, and
/// more importantly, only in safe code!
///
Expand Down
24 changes: 12 additions & 12 deletions src/libcore/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,13 @@ $EndFeature, "
Basic usage:

```
", $Feature, "#![feature(leading_trailing_ones)]
let n = -1", stringify!($SelfT), ";
", $Feature, "let n = -1", stringify!($SelfT), ";

assert_eq!(n.leading_ones(), ", stringify!($BITS), ");",
$EndFeature, "
```"),
#[unstable(feature = "leading_trailing_ones", issue = "57969")]
#[stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[rustc_const_stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[inline]
pub const fn leading_ones(self) -> u32 {
(self as $UnsignedT).leading_ones()
Expand All @@ -478,13 +478,13 @@ $EndFeature, "
Basic usage:

```
", $Feature, "#![feature(leading_trailing_ones)]
let n = 3", stringify!($SelfT), ";
", $Feature, "let n = 3", stringify!($SelfT), ";

assert_eq!(n.trailing_ones(), 2);",
$EndFeature, "
```"),
#[unstable(feature = "leading_trailing_ones", issue = "57969")]
#[stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[rustc_const_stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[inline]
pub const fn trailing_ones(self) -> u32 {
(self as $UnsignedT).trailing_ones()
Expand Down Expand Up @@ -2695,12 +2695,12 @@ assert_eq!(n.trailing_zeros(), 3);", $EndFeature, "
Basic usage:

```
", $Feature, "#![feature(leading_trailing_ones)]
let n = !(", stringify!($SelfT), "::MAX >> 2);
", $Feature, "let n = !(", stringify!($SelfT), "::MAX >> 2);

assert_eq!(n.leading_ones(), 2);", $EndFeature, "
```"),
#[unstable(feature = "leading_trailing_ones", issue = "57969")]
#[stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[rustc_const_stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[inline]
pub const fn leading_ones(self) -> u32 {
(!self).leading_zeros()
Expand All @@ -2716,12 +2716,12 @@ of `self`.
Basic usage:

```
", $Feature, "#![feature(leading_trailing_ones)]
let n = 0b1010111", stringify!($SelfT), ";
", $Feature, "let n = 0b1010111", stringify!($SelfT), ";

assert_eq!(n.trailing_ones(), 3);", $EndFeature, "
```"),
#[unstable(feature = "leading_trailing_ones", issue = "57969")]
#[stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[rustc_const_stable(feature = "leading_trailing_ones", since = "1.46.0")]
#[inline]
pub const fn trailing_ones(self) -> u32 {
(!self).trailing_zeros()
Expand Down
1 change: 0 additions & 1 deletion src/libcore/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
#![feature(const_raw_ptr_deref)]
#![feature(never_type)]
#![feature(unwrap_infallible)]
#![feature(leading_trailing_ones)]
#![feature(const_forget)]
#![feature(option_unwrap_none)]
#![feature(peekable_next_if)]
Expand Down
1 change: 0 additions & 1 deletion src/librustc_interface/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ fn test_debugging_options_tracking_hash() {
untracked!(print_link_args, true);
untracked!(print_llvm_passes, true);
untracked!(print_mono_items, Some(String::from("abc")));
untracked!(print_region_graph, true);
untracked!(print_type_sizes, true);
untracked!(query_dep_graph, true);
untracked!(query_stats, true);
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_lexer/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ impl<'a> Cursor<'a> {
}
}

/// For debug assertions only
/// Returns the last eaten symbol (or '\0' in release builds).
/// Returns the last eaten symbol (or `'\0'` in release builds).
/// (For debug assertions only.)
pub(crate) fn prev(&self) -> char {
#[cfg(debug_assertions)]
{
Expand Down
5 changes: 3 additions & 2 deletions src/librustc_lexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ pub enum TokenKind {
// Multi-char tokens:
/// "// comment"
LineComment,
/// "/* block comment */"
/// Block comments can be recursive, so the sequence like "/* /* */"
/// `/* block comment */`
///
/// Block comments can be recursive, so the sequence like `/* /* */`
/// will not be considered terminated and will result in a parsing error.
BlockComment { terminated: bool },
/// Any whitespace characters sequence.
Expand Down
3 changes: 0 additions & 3 deletions src/librustc_session/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,9 +958,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
"print the LLVM optimization passes being run (default: no)"),
print_mono_items: Option<String> = (None, parse_opt_string, [UNTRACKED],
"print the result of the monomorphization collection pass"),
print_region_graph: bool = (false, parse_bool, [UNTRACKED],
"prints region inference graph. \
Use with RUST_REGION_GRAPH=help for more info (default: no)"),
print_type_sizes: bool = (false, parse_bool, [UNTRACKED],
"print layout information for each type encountered (default: no)"),
profile: bool = (false, parse_bool, [TRACKED],
Expand Down
1 change: 1 addition & 0 deletions src/libstd/sys/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
c::ERROR_FILE_NOT_FOUND => return ErrorKind::NotFound,
c::ERROR_PATH_NOT_FOUND => return ErrorKind::NotFound,
c::ERROR_NO_DATA => return ErrorKind::BrokenPipe,
c::ERROR_INVALID_PARAMETER => return ErrorKind::InvalidInput,
c::ERROR_SEM_TIMEOUT
| c::WAIT_TIMEOUT
| c::ERROR_DRIVER_CANCEL_TIMEOUT
Expand Down