Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9775ffe

Browse files
committedDec 30, 2020
Auto merge of rust-lang#80530 - m-ou-se:rollup-zit69ko, r=m-ou-se
Rollup of 9 pull requests Successful merges: - rust-lang#78934 (refactor: removing library/alloc/src/vec/mod.rs ignore-tidy-filelength) - rust-lang#79479 (Add `Iterator::intersperse`) - rust-lang#80128 (Edit rustc_ast::ast::FieldPat docs) - rust-lang#80424 (Don't give an error when creating a file for the first time) - rust-lang#80458 (Some Promotion Refactoring) - rust-lang#80488 (Do not create dangling &T in Weak<T>::drop) - rust-lang#80491 (Miri: make size/align_of_val work for dangling raw ptrs) - rust-lang#80495 (Rename kw::Invalid -> kw::Empty) - rust-lang#80513 (Add regression test for rust-lang#80062) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents e226704 + 8998e31 commit 9775ffe

File tree

65 files changed

+1777
-1434
lines changed

Some content is hidden

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

65 files changed

+1777
-1434
lines changed
 

‎compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -630,16 +630,16 @@ impl Pat {
630630
}
631631
}
632632

633-
/// A single field in a struct pattern
633+
/// A single field in a struct pattern.
634634
///
635-
/// Patterns like the fields of Foo `{ x, ref y, ref mut z }`
636-
/// are treated the same as` x: x, y: ref y, z: ref mut z`,
637-
/// except is_shorthand is true
635+
/// Patterns like the fields of `Foo { x, ref y, ref mut z }`
636+
/// are treated the same as `x: x, y: ref y, z: ref mut z`,
637+
/// except when `is_shorthand` is true.
638638
#[derive(Clone, Encodable, Decodable, Debug)]
639639
pub struct FieldPat {
640-
/// The identifier for the field
640+
/// The identifier for the field.
641641
pub ident: Ident,
642-
/// The pattern the field is destructured to
642+
/// The pattern the field is destructured to.
643643
pub pat: P<Pat>,
644644
pub is_shorthand: bool,
645645
pub attrs: AttrVec,

‎compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
17671767
}
17681768
self.arena.alloc_from_iter(inputs.iter().map(|param| match param.pat.kind {
17691769
PatKind::Ident(_, ident, _) => ident,
1770-
_ => Ident::new(kw::Invalid, param.pat.span),
1770+
_ => Ident::new(kw::Empty, param.pat.span),
17711771
}))
17721772
}
17731773

0 commit comments

Comments
 (0)
This repository has been archived.