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

Commit 81f3919

Browse files
committed
Auto merge of rust-lang#102850 - JohnTitor:rollup-lze1w03, r=JohnTitor
Rollup of 8 pull requests Successful merges: - rust-lang#101118 (fs::get_mode enable getting the data via fcntl/F_GETFL on major BSD) - rust-lang#102072 (Add `ptr::Alignment` type) - rust-lang#102799 (rustdoc: remove hover gap in file picker) - rust-lang#102820 (Show let-else suggestion on stable.) - rust-lang#102829 (rename `ImplItemKind::TyAlias` to `ImplItemKind::Type`) - rust-lang#102831 (Don't use unnormalized type in `Ty::fn_sig` call in rustdoc `clean_middle_ty`) - rust-lang#102834 (Remove unnecessary `lift`/`lift_to_tcx` calls from rustdoc) - rust-lang#102838 (remove cfg(bootstrap) from Miri) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 1b22541 + f59e8af commit 81f3919

File tree

39 files changed

+212
-124
lines changed

39 files changed

+212
-124
lines changed

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,11 +908,11 @@ impl<'hir> LoweringContext<'_, 'hir> {
908908
|this| match ty {
909909
None => {
910910
let ty = this.arena.alloc(this.ty(i.span, hir::TyKind::Err));
911-
hir::ImplItemKind::TyAlias(ty)
911+
hir::ImplItemKind::Type(ty)
912912
}
913913
Some(ty) => {
914914
let ty = this.lower_ty(ty, &ImplTraitContext::TypeAliasesOpaqueTy);
915-
hir::ImplItemKind::TyAlias(ty)
915+
hir::ImplItemKind::Type(ty)
916916
}
917917
},
918918
)

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,7 @@ pub enum ImplItemKind<'hir> {
23152315
/// An associated function implementation with the given signature and body.
23162316
Fn(FnSig<'hir>, BodyId),
23172317
/// An associated type.
2318-
TyAlias(&'hir Ty<'hir>),
2318+
Type(&'hir Ty<'hir>),
23192319
}
23202320

23212321
// The name of the associated type for `Fn` return types.

compiler/rustc_hir/src/intravisit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,7 @@ pub fn walk_impl_item<'v, V: Visitor<'v>>(visitor: &mut V, impl_item: &'v ImplIt
979979
impl_item.hir_id(),
980980
);
981981
}
982-
ImplItemKind::TyAlias(ref ty) => {
982+
ImplItemKind::Type(ref ty) => {
983983
visitor.visit_id(impl_item.hir_id());
984984
visitor.visit_ty(ty);
985985
}

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ fn check_impl_items_against_trait<'tcx>(
10621062
opt_trait_span,
10631063
);
10641064
}
1065-
hir::ImplItemKind::TyAlias(impl_ty) => {
1065+
hir::ImplItemKind::Type(impl_ty) => {
10661066
let opt_trait_span = tcx.hir().span_if_local(ty_trait_item.def_id);
10671067
compare_ty_impl(
10681068
tcx,

compiler/rustc_hir_analysis/src/check/wfcheck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ fn check_impl_item(tcx: TyCtxt<'_>, impl_item: &hir::ImplItem<'_>) {
837837
let (method_sig, span) = match impl_item.kind {
838838
hir::ImplItemKind::Fn(ref sig, _) => (Some(sig), impl_item.span),
839839
// Constrain binding and overflow error spans to `<Ty>` in `type foo = <Ty>`.
840-
hir::ImplItemKind::TyAlias(ty) if ty.span != DUMMY_SP => (None, ty.span),
840+
hir::ImplItemKind::Type(ty) if ty.span != DUMMY_SP => (None, ty.span),
841841
_ => (None, impl_item.span),
842842
};
843843

compiler/rustc_hir_analysis/src/collect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ fn convert_impl_item(tcx: TyCtxt<'_>, impl_item_id: hir::ImplItemId) {
738738
hir::ImplItemKind::Fn(..) => {
739739
tcx.ensure().fn_sig(def_id);
740740
}
741-
hir::ImplItemKind::TyAlias(_) => {
741+
hir::ImplItemKind::Type(_) => {
742742
// Account for `type T = _;`
743743
let mut visitor = HirPlaceholderCollector::default();
744744
visitor.visit_impl_item(impl_item);

compiler/rustc_hir_analysis/src/collect/generics_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::Generics {
213213
Node::TraitItem(item) if matches!(item.kind, TraitItemKind::Type(..)) => {
214214
(None, Defaults::Deny)
215215
}
216-
Node::ImplItem(item) if matches!(item.kind, ImplItemKind::TyAlias(..)) => {
216+
Node::ImplItem(item) if matches!(item.kind, ImplItemKind::Type(..)) => {
217217
(None, Defaults::Deny)
218218
}
219219

compiler/rustc_hir_analysis/src/collect/type_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
284284
icx.to_ty(ty)
285285
}
286286
}
287-
ImplItemKind::TyAlias(ty) => {
287+
ImplItemKind::Type(ty) => {
288288
if tcx.impl_trait_ref(tcx.hir().get_parent_item(hir_id)).is_none() {
289289
check_feature_inherent_assoc_ty(tcx, item.span);
290290
}

compiler/rustc_hir_analysis/src/hir_wf_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fn diagnostic_hir_wf_check<'tcx>(
117117
let ty = match loc {
118118
WellFormedLoc::Ty(_) => match hir.get(hir_id) {
119119
hir::Node::ImplItem(item) => match item.kind {
120-
hir::ImplItemKind::TyAlias(ty) => Some(ty),
120+
hir::ImplItemKind::Type(ty) => Some(ty),
121121
hir::ImplItemKind::Const(ty, _) => Some(ty),
122122
ref item => bug!("Unexpected ImplItem {:?}", item),
123123
},

compiler/rustc_hir_pretty/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ impl<'a> State<'a> {
887887
self.end(); // need to close a box
888888
self.ann.nested(self, Nested::Body(body));
889889
}
890-
hir::ImplItemKind::TyAlias(ty) => {
890+
hir::ImplItemKind::Type(ty) => {
891891
self.print_associated_type(ii.ident, ii.generics, None, Some(ty));
892892
}
893893
}

0 commit comments

Comments
 (0)