Skip to content

Commit

Permalink
Auto merge of rust-lang#133600 - jhpratt:rollup-ysf0ngv, r=jhpratt
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - rust-lang#133466 (Fix typos in pin.rs)
 - rust-lang#133530 (Use consistent wording in docs, use is zero instead of is 0)
 - rust-lang#133565 (chore: fix 404 status URL)
 - rust-lang#133575 (Fix typo in RELEASES.md)
 - rust-lang#133577 (Document s390x machine access via community cloud)
 - rust-lang#133583 (Fix type (exit → exist))
 - rust-lang#133590 (Rename `-Zparse-only`)

Failed merges:

 - rust-lang#133584 (Update more 2024 tests to remove -Zunstable-options)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Nov 29, 2024
2 parents d6f8829 + 84cc0b0 commit 96a53e3
Show file tree
Hide file tree
Showing 28 changed files with 95 additions and 76 deletions.
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Libraries
- [Document that `catch_unwind` can deal with foreign exceptions without UB, although the exact behavior is unspecified.](https://github.com/rust-lang/rust/pull/128321)
- [Implement `Default` for `HashMap`/`HashSet` iterators that don't already have it.](https://github.com/rust-lang/rust/pull/128711)
- [Bump Unicode to version 16.0.0.](https://github.com/rust-lang/rust/pull/130183)
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229).
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229)


<a id="1.83.0-Stabilized-APIs"></a>
Expand Down
4 changes: 3 additions & 1 deletion compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ fn run_compiler(
return early_exit();
}

if sess.opts.unstable_opts.parse_only || sess.opts.unstable_opts.show_span.is_some() {
if sess.opts.unstable_opts.parse_crate_root_only
|| sess.opts.unstable_opts.show_span.is_some()
{
return early_exit();
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_interface/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ fn test_unstable_options_tracking_hash() {
untracked!(no_analysis, true);
untracked!(no_leak_check, true);
untracked!(no_parallel_backend, true);
untracked!(parse_only, true);
untracked!(parse_crate_root_only, true);
// `pre_link_arg` is omitted because it just forwards to `pre_link_args`.
untracked!(pre_link_args, vec![String::from("abc"), String::from("def")]);
untracked!(print_codegen_stats, true);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_session/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ impl Options {

/// Returns `true` if there will be an output file generated.
pub fn will_create_output_file(&self) -> bool {
!self.unstable_opts.parse_only && // The file is just being parsed
!self.unstable_opts.parse_crate_root_only && // The file is just being parsed
self.unstable_opts.ls.is_empty() // The file is just being queried
}

Expand Down Expand Up @@ -1864,7 +1864,7 @@ fn parse_output_types(
matches: &getopts::Matches,
) -> OutputTypes {
let mut output_types = BTreeMap::new();
if !unstable_opts.parse_only {
if !unstable_opts.parse_crate_root_only {
for list in matches.opt_strs("emit") {
for output_type in list.split(',') {
let (shorthand, path) = split_out_file_name(output_type);
Expand Down
7 changes: 4 additions & 3 deletions compiler/rustc_session/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1937,8 +1937,9 @@ options! {
"support compiling tests with panic=abort (default: no)"),
panic_in_drop: PanicStrategy = (PanicStrategy::Unwind, parse_panic_strategy, [TRACKED],
"panic strategy for panics in drops"),
parse_only: bool = (false, parse_bool, [UNTRACKED],
"parse only; do not compile, assemble, or link (default: no)"),
parse_crate_root_only: bool = (false, parse_bool, [UNTRACKED],
"parse the crate root file only; do not parse other files, compile, assemble, or link \
(default: no)"),
patchable_function_entry: PatchableFunctionEntry = (PatchableFunctionEntry::default(), parse_patchable_function_entry, [TRACKED],
"nop padding at function entry"),
plt: Option<bool> = (None, parse_opt_bool, [TRACKED],
Expand Down Expand Up @@ -2036,7 +2037,7 @@ written to standard error output)"),
shell_argfiles: bool = (false, parse_bool, [UNTRACKED],
"allow argument files to be specified with POSIX \"shell-style\" argument quoting"),
show_span: Option<String> = (None, parse_opt_string, [TRACKED],
"show spans for compiler debugging (expr|pat|ty)"),
"show spans in the crate root file, for compiler debugging (expr|pat|ty)"),
simulate_remapped_rust_src_base: Option<PathBuf> = (None, parse_opt_pathbuf, [TRACKED],
"simulate the effect of remap-debuginfo = true at bootstrapping by remapping path \
to rust's source base directory. only meant for testing purposes"),
Expand Down
4 changes: 2 additions & 2 deletions library/alloc/src/collections/binary_heap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
///
/// The binary heap will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
///
/// # Examples
///
Expand Down Expand Up @@ -496,7 +496,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
///
/// The binary heap will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
///
/// # Examples
///
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/vec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl<T> Vec<T> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// It is important to note that although the returned vector has the
/// minimum *capacity* specified, the vector will have a zero *length*. For
Expand Down Expand Up @@ -487,7 +487,7 @@ impl<T> Vec<T> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// # Errors
///
Expand Down Expand Up @@ -745,7 +745,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// It is important to note that although the returned vector has the
/// minimum *capacity* specified, the vector will have a zero *length*. For
Expand Down Expand Up @@ -808,7 +808,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// The vector will be able to hold at least `capacity` elements without
/// reallocating. This method is allowed to allocate for more elements than
/// `capacity`. If `capacity` is 0, the vector will not allocate.
/// `capacity`. If `capacity` is zero, the vector will not allocate.
///
/// # Errors
///
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ pub trait Iterator {
///
/// # Panics
///
/// Panics if `N` is 0. This check will most probably get changed to a
/// Panics if `N` is zero. This check will most probably get changed to a
/// compile time error before this method gets stabilized.
///
/// ```should_panic
Expand Down Expand Up @@ -3454,7 +3454,7 @@ pub trait Iterator {
///
/// # Panics
///
/// Panics if `N` is 0.
/// Panics if `N` is zero.
///
/// # Examples
///
Expand Down
26 changes: 13 additions & 13 deletions library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -1986,7 +1986,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2014,7 +2014,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2042,7 +2042,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand All @@ -2069,7 +2069,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2526,7 +2526,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2557,7 +2557,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2588,7 +2588,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2619,7 +2619,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2887,7 +2887,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down Expand Up @@ -2926,7 +2926,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN` and
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN` and
/// `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down Expand Up @@ -2975,7 +2975,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down Expand Up @@ -3019,7 +3019,7 @@ macro_rules! int_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
///
/// # Examples
Expand Down
22 changes: 11 additions & 11 deletions library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2034,7 +2034,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2063,7 +2063,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2091,7 +2091,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2121,7 +2121,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2545,7 +2545,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2576,7 +2576,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2604,7 +2604,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2635,7 +2635,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2872,7 +2872,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down Expand Up @@ -2900,7 +2900,7 @@ macro_rules! uint_impl {
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
/// This function will panic if `rhs` is zero.
///
/// # Examples
///
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@
//! exactly what we did with our `AddrTracker` example above. Without doing this, you *must not*
//! rely on pinning-related guarantees to apply to your type!
//!
//! If need to truly pin a value of a foreign or built-in type that implements [`Unpin`], you'll
//! need to create your own wrapper type around the [`Unpin`] type you want to pin and then
//! opts-out of [`Unpin`] using [`PhantomPinned`].
//! If you really need to pin a value of a foreign or built-in type that implements [`Unpin`],
//! you'll need to create your own wrapper type around the [`Unpin`] type you want to pin and then
//! opt-out of [`Unpin`] using [`PhantomPinned`].
//!
//! Exposing access to the inner field which you want to remain pinned must then be carefully
//! considered as well! Remember, exposing a method that gives access to a
Expand Down
Loading

0 comments on commit 96a53e3

Please sign in to comment.