Skip to content

Commit 81e754c

Browse files
committed
Auto merge of #75070 - Manishearth:rollup-2kgcaw5, r=Manishearth
Rollup of 5 pull requests Successful merges: - #74980 (pprust: adjust mixed comment printing and add regression test for #74745) - #75009 (Document the discrepancy in the mask type for _mm_shuffle_ps) - #75031 (Do not trigger `unused_{braces,parens}` lints with `yield`) - #75059 (fix typos) - #75064 (compiletest: Support ignoring tests requiring missing LLVM components) Failed merges: r? @ghost
2 parents f042d74 + 0bf2dcf commit 81e754c

File tree

45 files changed

+191
-56
lines changed

Some content is hidden

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

45 files changed

+191
-56
lines changed

library/alloc/src/rc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ impl<T: ?Sized> Unpin for Rc<T> {}
21012101
///
21022102
/// - This function is safe for any argument if `T` is sized, and
21032103
/// - if `T` is unsized, the pointer must have appropriate pointer metadata
2104-
/// aquired from the real instance that you are getting this offset for.
2104+
/// acquired from the real instance that you are getting this offset for.
21052105
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
21062106
// Align the unsized value to the end of the `RcBox`.
21072107
// Because it is ?Sized, it will always be the last field in memory.

library/alloc/src/sync.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ impl<T: ?Sized> Unpin for Arc<T> {}
22552255
///
22562256
/// - This function is safe for any argument if `T` is sized, and
22572257
/// - if `T` is unsized, the pointer must have appropriate pointer metadata
2258-
/// aquired from the real instance that you are getting this offset for.
2258+
/// acquired from the real instance that you are getting this offset for.
22592259
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
22602260
// Align the unsized value to the end of the `ArcInner`.
22612261
// Because it is `?Sized`, it will always be the last field in memory.

library/alloc/tests/boxed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn box_clone_and_clone_from_equivalence() {
3737
/// This test might give a false positive in case the box realocates, but the alocator keeps the
3838
/// original pointer.
3939
///
40-
/// On the other hand it won't give a false negative, if it fails than the memory was definitly not
40+
/// On the other hand it won't give a false negative, if it fails than the memory was definitely not
4141
/// reused
4242
#[test]
4343
fn box_clone_from_ptr_stability() {

library/std/src/alloc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ unsafe impl AllocRef for System {
189189
ReallocPlacement::MayMove if layout.size() == 0 => {
190190
let new_layout =
191191
// SAFETY: The new size and layout alignement guarantees
192-
// are transfered to the caller (they come from parameters).
192+
// are transferred to the caller (they come from parameters).
193193
//
194194
// See the preconditions for `Layout::from_size_align` to
195195
// see what must be checked.
@@ -254,7 +254,7 @@ unsafe impl AllocRef for System {
254254
//
255255
// See `GlobalAlloc::realloc` for more informations about the
256256
// guarantees expected by this method. `ptr`, `layout` and
257-
// `new_size` are parameters and the responsability for their
257+
// `new_size` are parameters and the responsibility for their
258258
// correctness is left to the caller.
259259
//
260260
// `realloc` probably checks for `new_size < size` or something

library/std/src/keyword_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ mod self_upper_keyword {}
13631363
///
13641364
/// let r1 = &FOO as *const _;
13651365
/// let r2 = &FOO as *const _;
1366-
/// // With a strictly read-only static, references will have the same adress
1366+
/// // With a strictly read-only static, references will have the same address
13671367
/// assert_eq!(r1, r2);
13681368
/// // A static item can be used just like a variable in many cases
13691369
/// println!("{:?}", FOO);

library/std/src/sync/once.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
// see the changes to drop the `Waiter` struct correctly.
8282
// * There is one place where the two atomics `Once.state_and_queue` and
8383
// `Waiter.signaled` come together, and might be reordered by the compiler or
84-
// processor. Because both use Aquire ordering such a reordering is not
84+
// processor. Because both use Acquire ordering such a reordering is not
8585
// allowed, so no need for SeqCst.
8686

8787
use crate::cell::Cell;

library/stdarch

src/bootstrap/test.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,13 +1158,19 @@ impl Step for Compiletest {
11581158
cmd.arg("--quiet");
11591159
}
11601160

1161+
let mut llvm_components_passed = false;
1162+
let mut copts_passed = false;
11611163
if builder.config.llvm_enabled() {
11621164
let llvm_config = builder.ensure(native::Llvm { target: builder.config.build });
11631165
if !builder.config.dry_run {
11641166
let llvm_version = output(Command::new(&llvm_config).arg("--version"));
1167+
let llvm_components = output(Command::new(&llvm_config).arg("--components"));
11651168
// Remove trailing newline from llvm-config output.
1166-
let llvm_version = llvm_version.trim_end();
1167-
cmd.arg("--llvm-version").arg(llvm_version);
1169+
cmd.arg("--llvm-version")
1170+
.arg(llvm_version.trim())
1171+
.arg("--llvm-components")
1172+
.arg(llvm_components.trim());
1173+
llvm_components_passed = true;
11681174
}
11691175
if !builder.is_rust_llvm(target) {
11701176
cmd.arg("--system-llvm");
@@ -1182,15 +1188,13 @@ impl Step for Compiletest {
11821188
// Only pass correct values for these flags for the `run-make` suite as it
11831189
// requires that a C++ compiler was configured which isn't always the case.
11841190
if !builder.config.dry_run && suite == "run-make-fulldeps" {
1185-
let llvm_components = output(Command::new(&llvm_config).arg("--components"));
11861191
cmd.arg("--cc")
11871192
.arg(builder.cc(target))
11881193
.arg("--cxx")
11891194
.arg(builder.cxx(target).unwrap())
11901195
.arg("--cflags")
1191-
.arg(builder.cflags(target, GitRepo::Rustc).join(" "))
1192-
.arg("--llvm-components")
1193-
.arg(llvm_components.trim());
1196+
.arg(builder.cflags(target, GitRepo::Rustc).join(" "));
1197+
copts_passed = true;
11941198
if let Some(ar) = builder.ar(target) {
11951199
cmd.arg("--ar").arg(ar);
11961200
}
@@ -1220,15 +1224,11 @@ impl Step for Compiletest {
12201224
}
12211225
}
12221226

1223-
if suite != "run-make-fulldeps" {
1224-
cmd.arg("--cc")
1225-
.arg("")
1226-
.arg("--cxx")
1227-
.arg("")
1228-
.arg("--cflags")
1229-
.arg("")
1230-
.arg("--llvm-components")
1231-
.arg("");
1227+
if !llvm_components_passed {
1228+
cmd.arg("--llvm-components").arg("");
1229+
}
1230+
if !copts_passed {
1231+
cmd.arg("--cc").arg("").arg("--cxx").arg("").arg("--cflags").arg("");
12321232
}
12331233

12341234
if builder.remote_tested(target) {

src/librustc_ast_pretty/pprust.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,9 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
450450
fn print_comment(&mut self, cmnt: &comments::Comment) {
451451
match cmnt.style {
452452
comments::Mixed => {
453-
self.zerobreak();
453+
if !self.is_beginning_of_line() {
454+
self.zerobreak();
455+
}
454456
if let Some((last, lines)) = cmnt.lines.split_last() {
455457
self.ibox(0);
456458

src/librustc_infer/infer/combine.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ impl<'infcx, 'tcx> InferCtxt<'infcx, 'tcx> {
166166
return self.unify_const_variable(!a_is_expected, vid, a);
167167
}
168168
(ty::ConstKind::Unevaluated(..), _) if self.tcx.lazy_normalization() => {
169-
// FIXME(#59490): Need to remove the leak check to accomodate
169+
// FIXME(#59490): Need to remove the leak check to accommodate
170170
// escaping bound variables here.
171171
if !a.has_escaping_bound_vars() && !b.has_escaping_bound_vars() {
172172
relation.const_equate_obligation(a, b);
173173
}
174174
return Ok(b);
175175
}
176176
(_, ty::ConstKind::Unevaluated(..)) if self.tcx.lazy_normalization() => {
177-
// FIXME(#59490): Need to remove the leak check to accomodate
177+
// FIXME(#59490): Need to remove the leak check to accommodate
178178
// escaping bound variables here.
179179
if !a.has_escaping_bound_vars() && !b.has_escaping_bound_vars() {
180180
relation.const_equate_obligation(a, b);

0 commit comments

Comments
 (0)