Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a3d7a5e

Browse files
committed
Auto merge of rust-lang#78528 - jonas-schievink:rollup-e70g9zk, r=jonas-schievink
Rollup of 11 pull requests Successful merges: - rust-lang#75078 (Improve documentation for slice strip_* functions) - rust-lang#76138 (Explain fully qualified syntax for `Rc` and `Arc`) - rust-lang#78244 (Dogfood {exclusive,half-open} ranges in compiler (nfc)) - rust-lang#78422 (Do not ICE on invalid input) - rust-lang#78423 (rustc_span: improve bounds checks in byte_pos_to_line_and_col) - rust-lang#78431 (Prefer new associated numeric consts in float error messages) - rust-lang#78462 (Use unwrapDIPtr because the Scope may be null.) - rust-lang#78493 (Update cargo) - rust-lang#78499 (Prevent String::retain from creating non-utf8 strings when abusing panic) - rust-lang#78505 (Update Clippy - temporary_cstring_as_ptr deprecation) - rust-lang#78527 (Fix some more typos) Failed merges: r? `@ghost`
2 parents 6bdae9e + e656e60 commit a3d7a5e

File tree

110 files changed

+3070
-747
lines changed

Some content is hidden

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

110 files changed

+3070
-747
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ struct LoweringContext<'a, 'hir: 'a> {
148148
is_collecting_in_band_lifetimes: bool,
149149

150150
/// Currently in-scope lifetimes defined in impl headers, fn headers, or HRTB.
151-
/// When `is_collectin_in_band_lifetimes` is true, each lifetime is checked
151+
/// When `is_collecting_in_band_lifetimes` is true, each lifetime is checked
152152
/// against this list to see if it is already in-scope, or if a definition
153153
/// needs to be created for it.
154154
///
@@ -257,7 +257,7 @@ enum ImplTraitPosition {
257257
/// Disallowed in `let` / `const` / `static` bindings.
258258
Binding,
259259

260-
/// All other posiitons.
260+
/// All other positions.
261261
Other,
262262
}
263263

@@ -363,7 +363,7 @@ enum ParenthesizedGenericArgs {
363363
/// elided bounds follow special rules. Note that this only covers
364364
/// cases where *nothing* is written; the `'_` in `Box<dyn Foo +
365365
/// '_>` is a case of "modern" elision.
366-
/// - **Deprecated** -- this coverse cases like `Ref<T>`, where the lifetime
366+
/// - **Deprecated** -- this covers cases like `Ref<T>`, where the lifetime
367367
/// parameter to ref is completely elided. `Ref<'_, T>` would be the modern,
368368
/// non-deprecated equivalent.
369369
///

compiler/rustc_ast_passes/src/ast_validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ impl<'a> AstValidator<'a> {
516516
self.session.source_map().guess_head_span(self.extern_mod.unwrap().span)
517517
}
518518

519-
/// An `fn` in `extern { ... }` cannot have qualfiers, e.g. `async fn`.
519+
/// An `fn` in `extern { ... }` cannot have qualifiers, e.g. `async fn`.
520520
fn check_foreign_fn_headerless(&self, ident: Ident, span: Span, header: FnHeader) {
521521
if header.has_qualifiers() {
522522
self.err_handler()

compiler/rustc_data_structures/src/tagged_ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mod drop;
2424
pub use copy::CopyTaggedPtr;
2525
pub use drop::TaggedPtr;
2626

27-
/// This describes the pointer type encaspulated by TaggedPtr.
27+
/// This describes the pointer type encapsulated by TaggedPtr.
2828
///
2929
/// # Safety
3030
///

compiler/rustc_data_structures/src/transitive_relation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct TransitiveRelation<T: Eq + Hash> {
1818
edges: Vec<Edge>,
1919

2020
// This is a cached transitive closure derived from the edges.
21-
// Currently, we build it lazilly and just throw out any existing
21+
// Currently, we build it lazily and just throw out any existing
2222
// copy whenever a new edge is added. (The Lock is to permit
2323
// the lazy computation.) This is kind of silly, except for the
2424
// fact its size is tied to `self.elements.len()`, so I wanted to
@@ -255,7 +255,7 @@ impl<T: Clone + Debug + Eq + Hash> TransitiveRelation<T> {
255255
// argument is that, after step 2, we know that no element
256256
// can reach its successors (in the vector, not the graph).
257257
// After step 3, we know that no element can reach any of
258-
// its predecesssors (because of step 2) nor successors
258+
// its predecessors (because of step 2) nor successors
259259
// (because we just called `pare_down`)
260260
//
261261
// This same algorithm is used in `parents` below.

compiler/rustc_errors/src/emitter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ impl Emitter for SilentEmitter {
513513
/// Maximum number of lines we will print for a multiline suggestion; arbitrary.
514514
///
515515
/// This should be replaced with a more involved mechanism to output multiline suggestions that
516-
/// more closely mimmics the regular diagnostic output, where irrelevant code lines are elided.
516+
/// more closely mimics the regular diagnostic output, where irrelevant code lines are elided.
517517
pub const MAX_SUGGESTION_HIGHLIGHT_LINES: usize = 6;
518518
/// Maximum number of suggestions to be shown
519519
///
@@ -887,7 +887,7 @@ impl EmitterWriter {
887887
// or the next are vertical line placeholders.
888888
|| (annotation.takes_space() // If either this or the next annotation is
889889
&& next.has_label()) // multiline start/end, move it to a new line
890-
|| (annotation.has_label() // so as not to overlap the orizontal lines.
890+
|| (annotation.has_label() // so as not to overlap the horizontal lines.
891891
&& next.takes_space())
892892
|| (annotation.takes_space() && next.takes_space())
893893
|| (overlaps(next, annotation, l)

compiler/rustc_lint/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#![feature(never_type)]
3636
#![feature(nll)]
3737
#![feature(or_patterns)]
38+
#![feature(half_open_range_patterns)]
39+
#![feature(exclusive_range_pattern)]
3840
#![recursion_limit = "256"]
3941

4042
#[macro_use]

compiler/rustc_lint/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ fn lint_literal<'tcx>(
439439
cx.struct_span_lint(OVERFLOWING_LITERALS, e.span, |lint| {
440440
lint.build(&format!("literal out of range for `{}`", t.name_str()))
441441
.note(&format!(
442-
"the literal `{}` does not fit into the type `{}` and will be converted to `std::{}::INFINITY`",
442+
"the literal `{}` does not fit into the type `{}` and will be converted to `{}::INFINITY`",
443443
cx.sess()
444444
.source_map()
445445
.span_to_snippet(lit.span)

compiler/rustc_lint/src/unused.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults {
250250
has_emitted
251251
}
252252
ty::Array(ty, len) => match len.try_eval_usize(cx.tcx, cx.param_env) {
253+
// If the array is empty we don't lint, to avoid false positives
254+
Some(0) | None => false,
253255
// If the array is definitely non-empty, we can do `#[must_use]` checking.
254-
Some(n) if n != 0 => {
256+
Some(n) => {
255257
let descr_pre = &format!("{}array{} of ", descr_pre, plural_suffix,);
256258
check_must_use_ty(cx, ty, expr, span, descr_pre, descr_post, n as usize + 1)
257259
}
258-
// Otherwise, we don't lint, to avoid false positives.
259-
_ => false,
260260
},
261261
ty::Closure(..) => {
262262
cx.struct_span_lint(UNUSED_MUST_USE, span, |lint| {

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateTypedef(
766766
LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Scope) {
767767
return wrap(Builder->createTypedef(
768768
unwrap<DIType>(Type), StringRef(Name, NameLen), unwrap<DIFile>(File),
769-
LineNo, unwrap<DIScope>(Scope)));
769+
LineNo, unwrapDIPtr<DIScope>(Scope)));
770770
}
771771

772772
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreatePointerType(

compiler/rustc_middle/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
#![feature(associated_type_bounds)]
4848
#![feature(rustc_attrs)]
4949
#![feature(int_error_matching)]
50+
#![feature(half_open_range_patterns)]
51+
#![feature(exclusive_range_pattern)]
5052
#![recursion_limit = "512"]
5153

5254
#[macro_use]

0 commit comments

Comments
 (0)