Skip to content

Commit 6b604a9

Browse files
committed
Auto merge of #66824 - tmandry:rollup-kk56bte, r=tmandry
Rollup of 17 pull requests Successful merges: - #64325 (Stabilize nested self receivers in 1.41.0) - #66222 (Use `eq_opaque_type_and_type` when type-checking closure signatures) - #66305 (Add by-value arrays to `improper_ctypes` lint) - #66399 (rustc_metadata: simplify the interactions between Lazy and Table.) - #66534 (Allow global references via ForeignItem and Item for the same symbol name during LLVM codegen) - #66700 (Fix pointing at arg for fulfillment errors in function calls) - #66704 (Intra doc enum variant field) - #66718 (Refactor `parse_enum_item` to use `parse_delim_comma_seq`) - #66722 (Handle non_exhaustive in borrow checking) - #66744 (Fix shrink_to panic documentation) - #66761 (Use LLVMDisposePassManager instead of raw delete in rustllvm) - #66769 (Add core::{f32,f64}::consts::TAU.) - #66774 (Clean up error codes) - #66777 (Put back tidy check on error codes) - #66797 (Fixes small typo in array docs r? @steveklabnik) - #66798 (Fix spelling typos) - #66800 (Combine similar tests for const match) Failed merges: r? @ghost
2 parents e87a205 + a40494b commit 6b604a9

File tree

144 files changed

+930
-739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+930
-739
lines changed

src/bootstrap/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Step for Std {
113113
}
114114
}
115115

116-
/// Copies third pary objects needed by various targets.
116+
/// Copies third party objects needed by various targets.
117117
fn copy_third_party_objects(builder: &Builder<'_>, compiler: &Compiler, target: Interned<String>)
118118
-> Vec<PathBuf>
119119
{

src/liballoc/collections/btree/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Immut<'a>, K, V, Type> {
596596
// (We might be one-past-the-end, but that is allowed by LLVM.)
597597
// Getting the pointer is tricky though. `NodeHeader` does not have a `keys`
598598
// field because we want its size to not depend on the alignment of `K`
599-
// (needed becuase `as_header` should be safe). We cannot call `as_leaf`
599+
// (needed because `as_header` should be safe). We cannot call `as_leaf`
600600
// because we might be the shared root.
601601
// For this reason, `NodeHeader` has this `K2` parameter (that's usually `()`
602602
// and hence just adds a size-0-align-1 field, not affecting layout).

src/liballoc/tests/vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ fn drain_filter_consumed_panic() {
985985
};
986986
let drain = data.drain_filter(filter);
987987

988-
// NOTE: The DrainFilter is explictly consumed
988+
// NOTE: The DrainFilter is explicitly consumed
989989
drain.for_each(drop);
990990
});
991991

src/liballoc/vec.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ impl<T> Vec<T> {
629629
/// The capacity will remain at least as large as both the length
630630
/// and the supplied value.
631631
///
632+
/// # Panics
633+
///
632634
/// Panics if the current capacity is smaller than the supplied
633635
/// minimum capacity.
634636
///
@@ -2837,7 +2839,7 @@ pub struct DrainFilter<'a, T, F>
28372839
old_len: usize,
28382840
/// The filter test predicate.
28392841
pred: F,
2840-
/// A flag that indicates a panic has occured in the filter test prodicate.
2842+
/// A flag that indicates a panic has occurred in the filter test prodicate.
28412843
/// This is used as a hint in the drop implmentation to prevent consumption
28422844
/// of the remainder of the `DrainFilter`. Any unprocessed items will be
28432845
/// backshifted in the `vec`, but no further items will be dropped or

src/libcore/array/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Implementations of things like `Eq` for fixed-length arrays
2-
//! up to a certain length. Eventually we should able to generalize
2+
//! up to a certain length. Eventually, we should be able to generalize
33
//! to all lengths.
44
//!
55
//! *[See also the array primitive type](../../std/primitive.array.html).*

src/libcore/hint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub fn spin_loop() {
113113
pub fn black_box<T>(dummy: T) -> T {
114114
// We need to "use" the argument in some way LLVM can't introspect, and on
115115
// targets that support it we can typically leverage inline assembly to do
116-
// this. LLVM's intepretation of inline assembly is that it's, well, a black
116+
// this. LLVM's interpretation of inline assembly is that it's, well, a black
117117
// box. This isn't the greatest implementation since it probably deoptimizes
118118
// more than we want, but it's so far good enough.
119119
unsafe {

src/libcore/intrinsics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@ extern "rust-intrinsic" {
12791279
/// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
12801280
pub fn unchecked_add<T>(x: T, y: T) -> T;
12811281

1282-
/// Returns the result of an unchecked substraction, resulting in
1282+
/// Returns the result of an unchecked subtraction, resulting in
12831283
/// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
12841284
pub fn unchecked_sub<T>(x: T, y: T) -> T;
12851285

src/libcore/num/f32.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ pub mod consts {
7575
#[stable(feature = "rust1", since = "1.0.0")]
7676
pub const PI: f32 = 3.14159265358979323846264338327950288_f32;
7777

78+
/// The full circle constant (τ)
79+
///
80+
/// Equal to 2π.
81+
#[unstable(feature = "tau_constant", issue = "66770")]
82+
pub const TAU: f32 = 6.28318530717958647692528676655900577_f32;
83+
7884
/// π/2
7985
#[stable(feature = "rust1", since = "1.0.0")]
8086
pub const FRAC_PI_2: f32 = 1.57079632679489661923132169163975144_f32;

src/libcore/num/f64.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ pub mod consts {
7575
#[stable(feature = "rust1", since = "1.0.0")]
7676
pub const PI: f64 = 3.14159265358979323846264338327950288_f64;
7777

78+
/// The full circle constant (τ)
79+
///
80+
/// Equal to 2π.
81+
#[unstable(feature = "tau_constant", issue = "66770")]
82+
pub const TAU: f64 = 6.28318530717958647692528676655900577_f64;
83+
7884
/// π/2
7985
#[stable(feature = "rust1", since = "1.0.0")]
8086
pub const FRAC_PI_2: f64 = 1.57079632679489661923132169163975144_f64;

src/libpanic_unwind/dwarf/eh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>, foreign_e
130130
fn interpret_cs_action(cs_action: u64, lpad: usize, foreign_exception: bool) -> EHAction {
131131
if cs_action == 0 {
132132
// If cs_action is 0 then this is a cleanup (Drop::drop). We run these
133-
// for both Rust panics and foriegn exceptions.
133+
// for both Rust panics and foreign exceptions.
134134
EHAction::Cleanup(lpad)
135135
} else if foreign_exception {
136136
// catch_unwind should not catch foreign exceptions, only Rust panics.

0 commit comments

Comments
 (0)