Skip to content

Commit 96a53e3

Browse files
committed
Auto merge of rust-lang#133600 - jhpratt:rollup-ysf0ngv, r=jhpratt
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
2 parents d6f8829 + 84cc0b0 commit 96a53e3

File tree

28 files changed

+95
-76
lines changed

28 files changed

+95
-76
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Libraries
4343
- [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)
4444
- [Implement `Default` for `HashMap`/`HashSet` iterators that don't already have it.](https://github.com/rust-lang/rust/pull/128711)
4545
- [Bump Unicode to version 16.0.0.](https://github.com/rust-lang/rust/pull/130183)
46-
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229).
46+
- [Change documentation of `ptr::add`/`sub` to not claim equivalence with `offset`.](https://github.com/rust-lang/rust/pull/130229)
4747

4848

4949
<a id="1.83.0-Stabilized-APIs"></a>

compiler/rustc_driver_impl/src/lib.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ fn run_compiler(
418418
return early_exit();
419419
}
420420

421-
if sess.opts.unstable_opts.parse_only || sess.opts.unstable_opts.show_span.is_some() {
421+
if sess.opts.unstable_opts.parse_crate_root_only
422+
|| sess.opts.unstable_opts.show_span.is_some()
423+
{
422424
return early_exit();
423425
}
424426

compiler/rustc_interface/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ fn test_unstable_options_tracking_hash() {
712712
untracked!(no_analysis, true);
713713
untracked!(no_leak_check, true);
714714
untracked!(no_parallel_backend, true);
715-
untracked!(parse_only, true);
715+
untracked!(parse_crate_root_only, true);
716716
// `pre_link_arg` is omitted because it just forwards to `pre_link_args`.
717717
untracked!(pre_link_args, vec![String::from("abc"), String::from("def")]);
718718
untracked!(print_codegen_stats, true);

compiler/rustc_session/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ impl Options {
12081208

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

@@ -1864,7 +1864,7 @@ fn parse_output_types(
18641864
matches: &getopts::Matches,
18651865
) -> OutputTypes {
18661866
let mut output_types = BTreeMap::new();
1867-
if !unstable_opts.parse_only {
1867+
if !unstable_opts.parse_crate_root_only {
18681868
for list in matches.opt_strs("emit") {
18691869
for output_type in list.split(',') {
18701870
let (shorthand, path) = split_out_file_name(output_type);

compiler/rustc_session/src/options.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1937,8 +1937,9 @@ options! {
19371937
"support compiling tests with panic=abort (default: no)"),
19381938
panic_in_drop: PanicStrategy = (PanicStrategy::Unwind, parse_panic_strategy, [TRACKED],
19391939
"panic strategy for panics in drops"),
1940-
parse_only: bool = (false, parse_bool, [UNTRACKED],
1941-
"parse only; do not compile, assemble, or link (default: no)"),
1940+
parse_crate_root_only: bool = (false, parse_bool, [UNTRACKED],
1941+
"parse the crate root file only; do not parse other files, compile, assemble, or link \
1942+
(default: no)"),
19421943
patchable_function_entry: PatchableFunctionEntry = (PatchableFunctionEntry::default(), parse_patchable_function_entry, [TRACKED],
19431944
"nop padding at function entry"),
19441945
plt: Option<bool> = (None, parse_opt_bool, [TRACKED],
@@ -2036,7 +2037,7 @@ written to standard error output)"),
20362037
shell_argfiles: bool = (false, parse_bool, [UNTRACKED],
20372038
"allow argument files to be specified with POSIX \"shell-style\" argument quoting"),
20382039
show_span: Option<String> = (None, parse_opt_string, [TRACKED],
2039-
"show spans for compiler debugging (expr|pat|ty)"),
2040+
"show spans in the crate root file, for compiler debugging (expr|pat|ty)"),
20402041
simulate_remapped_rust_src_base: Option<PathBuf> = (None, parse_opt_pathbuf, [TRACKED],
20412042
"simulate the effect of remap-debuginfo = true at bootstrapping by remapping path \
20422043
to rust's source base directory. only meant for testing purposes"),

library/alloc/src/collections/binary_heap/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ impl<T: Ord> BinaryHeap<T> {
452452
///
453453
/// The binary heap will be able to hold at least `capacity` elements without
454454
/// reallocating. This method is allowed to allocate for more elements than
455-
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
455+
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
456456
///
457457
/// # Examples
458458
///
@@ -496,7 +496,7 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
496496
///
497497
/// The binary heap will be able to hold at least `capacity` elements without
498498
/// reallocating. This method is allowed to allocate for more elements than
499-
/// `capacity`. If `capacity` is 0, the binary heap will not allocate.
499+
/// `capacity`. If `capacity` is zero, the binary heap will not allocate.
500500
///
501501
/// # Examples
502502
///

library/alloc/src/vec/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ impl<T> Vec<T> {
427427
///
428428
/// The vector will be able to hold at least `capacity` elements without
429429
/// reallocating. This method is allowed to allocate for more elements than
430-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
430+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
431431
///
432432
/// It is important to note that although the returned vector has the
433433
/// minimum *capacity* specified, the vector will have a zero *length*. For
@@ -487,7 +487,7 @@ impl<T> Vec<T> {
487487
///
488488
/// The vector will be able to hold at least `capacity` elements without
489489
/// reallocating. This method is allowed to allocate for more elements than
490-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
490+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
491491
///
492492
/// # Errors
493493
///
@@ -745,7 +745,7 @@ impl<T, A: Allocator> Vec<T, A> {
745745
///
746746
/// The vector will be able to hold at least `capacity` elements without
747747
/// reallocating. This method is allowed to allocate for more elements than
748-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
748+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
749749
///
750750
/// It is important to note that although the returned vector has the
751751
/// minimum *capacity* specified, the vector will have a zero *length*. For
@@ -808,7 +808,7 @@ impl<T, A: Allocator> Vec<T, A> {
808808
///
809809
/// The vector will be able to hold at least `capacity` elements without
810810
/// reallocating. This method is allowed to allocate for more elements than
811-
/// `capacity`. If `capacity` is 0, the vector will not allocate.
811+
/// `capacity`. If `capacity` is zero, the vector will not allocate.
812812
///
813813
/// # Errors
814814
///

library/core/src/iter/traits/iterator.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1553,7 +1553,7 @@ pub trait Iterator {
15531553
///
15541554
/// # Panics
15551555
///
1556-
/// Panics if `N` is 0. This check will most probably get changed to a
1556+
/// Panics if `N` is zero. This check will most probably get changed to a
15571557
/// compile time error before this method gets stabilized.
15581558
///
15591559
/// ```should_panic
@@ -3454,7 +3454,7 @@ pub trait Iterator {
34543454
///
34553455
/// # Panics
34563456
///
3457-
/// Panics if `N` is 0.
3457+
/// Panics if `N` is zero.
34583458
///
34593459
/// # Examples
34603460
///

library/core/src/num/int_macros.rs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ macro_rules! int_impl {
18281828
///
18291829
/// # Panics
18301830
///
1831-
/// This function will panic if `rhs` is 0.
1831+
/// This function will panic if `rhs` is zero.
18321832
///
18331833
/// # Examples
18341834
///
@@ -1986,7 +1986,7 @@ macro_rules! int_impl {
19861986
///
19871987
/// # Panics
19881988
///
1989-
/// This function will panic if `rhs` is 0.
1989+
/// This function will panic if `rhs` is zero.
19901990
///
19911991
/// # Examples
19921992
///
@@ -2014,7 +2014,7 @@ macro_rules! int_impl {
20142014
///
20152015
/// # Panics
20162016
///
2017-
/// This function will panic if `rhs` is 0.
2017+
/// This function will panic if `rhs` is zero.
20182018
///
20192019
/// # Examples
20202020
///
@@ -2042,7 +2042,7 @@ macro_rules! int_impl {
20422042
///
20432043
/// # Panics
20442044
///
2045-
/// This function will panic if `rhs` is 0.
2045+
/// This function will panic if `rhs` is zero.
20462046
///
20472047
/// # Examples
20482048
///
@@ -2069,7 +2069,7 @@ macro_rules! int_impl {
20692069
///
20702070
/// # Panics
20712071
///
2072-
/// This function will panic if `rhs` is 0.
2072+
/// This function will panic if `rhs` is zero.
20732073
///
20742074
/// # Examples
20752075
///
@@ -2526,7 +2526,7 @@ macro_rules! int_impl {
25262526
///
25272527
/// # Panics
25282528
///
2529-
/// This function will panic if `rhs` is 0.
2529+
/// This function will panic if `rhs` is zero.
25302530
///
25312531
/// # Examples
25322532
///
@@ -2557,7 +2557,7 @@ macro_rules! int_impl {
25572557
///
25582558
/// # Panics
25592559
///
2560-
/// This function will panic if `rhs` is 0.
2560+
/// This function will panic if `rhs` is zero.
25612561
///
25622562
/// # Examples
25632563
///
@@ -2588,7 +2588,7 @@ macro_rules! int_impl {
25882588
///
25892589
/// # Panics
25902590
///
2591-
/// This function will panic if `rhs` is 0.
2591+
/// This function will panic if `rhs` is zero.
25922592
///
25932593
/// # Examples
25942594
///
@@ -2619,7 +2619,7 @@ macro_rules! int_impl {
26192619
///
26202620
/// # Panics
26212621
///
2622-
/// This function will panic if `rhs` is 0.
2622+
/// This function will panic if `rhs` is zero.
26232623
///
26242624
/// # Examples
26252625
///
@@ -2887,7 +2887,7 @@ macro_rules! int_impl {
28872887
///
28882888
/// # Panics
28892889
///
2890-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2890+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
28912891
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
28922892
///
28932893
/// # Examples
@@ -2926,7 +2926,7 @@ macro_rules! int_impl {
29262926
///
29272927
/// # Panics
29282928
///
2929-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN` and
2929+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN` and
29302930
/// `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
29312931
///
29322932
/// # Examples
@@ -2975,7 +2975,7 @@ macro_rules! int_impl {
29752975
///
29762976
/// # Panics
29772977
///
2978-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
2978+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
29792979
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
29802980
///
29812981
/// # Examples
@@ -3019,7 +3019,7 @@ macro_rules! int_impl {
30193019
///
30203020
/// # Panics
30213021
///
3022-
/// This function will panic if `rhs` is 0 or if `self` is `Self::MIN`
3022+
/// This function will panic if `rhs` is zero or if `self` is `Self::MIN`
30233023
/// and `rhs` is -1. This behavior is not affected by the `overflow-checks` flag.
30243024
///
30253025
/// # Examples

library/core/src/num/uint_macros.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ macro_rules! uint_impl {
18771877
///
18781878
/// # Panics
18791879
///
1880-
/// This function will panic if `rhs` is 0.
1880+
/// This function will panic if `rhs` is zero.
18811881
///
18821882
/// # Examples
18831883
///
@@ -2034,7 +2034,7 @@ macro_rules! uint_impl {
20342034
///
20352035
/// # Panics
20362036
///
2037-
/// This function will panic if `rhs` is 0.
2037+
/// This function will panic if `rhs` is zero.
20382038
///
20392039
/// # Examples
20402040
///
@@ -2063,7 +2063,7 @@ macro_rules! uint_impl {
20632063
///
20642064
/// # Panics
20652065
///
2066-
/// This function will panic if `rhs` is 0.
2066+
/// This function will panic if `rhs` is zero.
20672067
///
20682068
/// # Examples
20692069
///
@@ -2091,7 +2091,7 @@ macro_rules! uint_impl {
20912091
///
20922092
/// # Panics
20932093
///
2094-
/// This function will panic if `rhs` is 0.
2094+
/// This function will panic if `rhs` is zero.
20952095
///
20962096
/// # Examples
20972097
///
@@ -2121,7 +2121,7 @@ macro_rules! uint_impl {
21212121
///
21222122
/// # Panics
21232123
///
2124-
/// This function will panic if `rhs` is 0.
2124+
/// This function will panic if `rhs` is zero.
21252125
///
21262126
/// # Examples
21272127
///
@@ -2545,7 +2545,7 @@ macro_rules! uint_impl {
25452545
///
25462546
/// # Panics
25472547
///
2548-
/// This function will panic if `rhs` is 0.
2548+
/// This function will panic if `rhs` is zero.
25492549
///
25502550
/// # Examples
25512551
///
@@ -2576,7 +2576,7 @@ macro_rules! uint_impl {
25762576
///
25772577
/// # Panics
25782578
///
2579-
/// This function will panic if `rhs` is 0.
2579+
/// This function will panic if `rhs` is zero.
25802580
///
25812581
/// # Examples
25822582
///
@@ -2604,7 +2604,7 @@ macro_rules! uint_impl {
26042604
///
26052605
/// # Panics
26062606
///
2607-
/// This function will panic if `rhs` is 0.
2607+
/// This function will panic if `rhs` is zero.
26082608
///
26092609
/// # Examples
26102610
///
@@ -2635,7 +2635,7 @@ macro_rules! uint_impl {
26352635
///
26362636
/// # Panics
26372637
///
2638-
/// This function will panic if `rhs` is 0.
2638+
/// This function will panic if `rhs` is zero.
26392639
///
26402640
/// # Examples
26412641
///
@@ -2872,7 +2872,7 @@ macro_rules! uint_impl {
28722872
///
28732873
/// # Panics
28742874
///
2875-
/// This function will panic if `rhs` is 0.
2875+
/// This function will panic if `rhs` is zero.
28762876
///
28772877
/// # Examples
28782878
///
@@ -2900,7 +2900,7 @@ macro_rules! uint_impl {
29002900
///
29012901
/// # Panics
29022902
///
2903-
/// This function will panic if `rhs` is 0.
2903+
/// This function will panic if `rhs` is zero.
29042904
///
29052905
/// # Examples
29062906
///

library/core/src/pin.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@
373373
//! exactly what we did with our `AddrTracker` example above. Without doing this, you *must not*
374374
//! rely on pinning-related guarantees to apply to your type!
375375
//!
376-
//! If need to truly pin a value of a foreign or built-in type that implements [`Unpin`], you'll
377-
//! need to create your own wrapper type around the [`Unpin`] type you want to pin and then
378-
//! opts-out of [`Unpin`] using [`PhantomPinned`].
376+
//! If you really need to pin a value of a foreign or built-in type that implements [`Unpin`],
377+
//! you'll need to create your own wrapper type around the [`Unpin`] type you want to pin and then
378+
//! opt-out of [`Unpin`] using [`PhantomPinned`].
379379
//!
380380
//! Exposing access to the inner field which you want to remain pinned must then be carefully
381381
//! considered as well! Remember, exposing a method that gives access to a

0 commit comments

Comments
 (0)