/dports/lang/rust/rustc-1.58.1-src/src/doc/rustc-dev-guide/src/ |
H A D | generics.md | 36 - There would be an `AdtDef` (and corresponding `DefId`) for `MyStruct`. 41 - This is one `TyKind::Adt` containing the `AdtDef` of `MyStruct` with the `SubstsRef` above.
|
H A D | ty.md | 237 Adt(&'tcx AdtDef, SubstsRef<'tcx>) 247 - The [`AdtDef`][adtdef] references the struct/enum/union but without the values for its type 255 [adtdef]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.AdtDef.html 258 **`AdtDef` and `DefId`** 266 `AdtDef` is more or less a wrapper around `DefId` with lots of useful helper methods. There is 267 essentially a one-to-one relationship between `AdtDef` and `DefId`. You can get the `AdtDef` for a 268 `DefId` with the [`tcx.adt_def(def_id)` query][adtdefq]. `AdtDef`s are all interned, as shown 311 ## Question: Why not substitute “inside” the `AdtDef`? 313 Recall that we represent a generic struct with `(AdtDef, substs)`. So why bother with this scheme? 317 less of a hassle. However, the `(AdtDef, substs)` scheme has some advantages over this. [all …]
|
H A D | memory.md | 48 defined and discussed in depth in the `AdtDef and DefId` section.
|
/dports/lang/rust/rustc-1.58.1-src/src/tools/clippy/clippy_lints/src/ |
H A D | case_sensitive_file_extension_comparisons.rs | 57 ty::Adt(&ty::AdtDef { did, .. }, _) => { in check_case_sensitive_file_extension_comparison()
|
/dports/lang/rust/rustc-1.58.1-src/src/tools/clippy/clippy_utils/src/ |
H A D | ty.rs | 13 use rustc_middle::ty::{self, AdtDef, IntTy, Ty, TyCtxt, TypeFoldable, UintTy}; 48 pub fn contains_adt_constructor<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, adt: &'tcx AdtDef) -> bool { in contains_adt_constructor()
|
/dports/lang/rust/rustc-1.58.1-src/src/librustdoc/passes/ |
H A D | collect_intra_doc_links.rs | 556 ty::Adt(&ty::AdtDef { did, .. }, _) | ty::Foreign(did) => { in def_id_to_res()
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_privacy/src/ |
H A D | lib.rs | 190 ty::Adt(&ty::AdtDef { did: def_id, .. }, ..) in visit_ty() 1039 def: &'tcx ty::AdtDef, // definition of the struct or enum in check_field() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_typeck/src/check/ |
H A D | expr.rs | 2092 def: &'tcx ty::AdtDef, in suggest_fields_on_recordish() argument
|
H A D | mod.rs | 799 fn bad_variant_count<'tcx>(tcx: TyCtxt<'tcx>, adt: &'tcx ty::AdtDef, sp: Span, did: DefId) { in bad_variant_count() argument 821 adt: &'tcx ty::AdtDef, in bad_non_zero_sized_fields() argument
|
H A D | place_op.rs | 128 ty::Adt(ty::AdtDef { did, .. }, _) in try_index_step()
|
H A D | check.rs | 1187 pub(super) fn check_packed(tcx: TyCtxt<'_>, sp: Span, def: &ty::AdtDef) { in check_packed() argument 1287 pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, adt: &'tcx ty::AdtDef) { in check_transparent() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_passes/src/ |
H A D | dead.rs | 315 fn mark_as_used_if_union(&mut self, adt: &ty::AdtDef, fields: &[hir::ExprField<'_>]) { in mark_as_used_if_union() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_ty_utils/src/ |
H A D | needs_drop.rs | 19 |adt_def: &ty::AdtDef| adt_def.destructor(tcx).map(|_| DtorType::Significant); in needs_drop_raw() 81 F: Fn(&ty::AdtDef, SubstsRef<'tcx>) -> NeedsDropResult<I>, 194 adt_has_dtor: impl Fn(&ty::AdtDef) -> Option<DtorType>, in drop_tys_helper() 219 let adt_components = move |adt_def: &ty::AdtDef, substs: SubstsRef<'tcx>| { in drop_tys_helper() 263 ) -> impl Fn(&ty::AdtDef) -> Option<DtorType> + 'tcx { in adt_consider_insignificant_dtor() 264 move |adt_def: &ty::AdtDef| { in adt_consider_insignificant_dtor() 288 |adt_def: &ty::AdtDef| adt_def.destructor(tcx).map(|_| DtorType::Significant); in adt_drop_tys()
|
H A D | representability.rs | 36 let mut shadow_seen: Vec<&'tcx ty::AdtDef> = Vec::new(); in ty_is_representable() 66 shadow_seen: &mut Vec<&'tcx ty::AdtDef>, in are_inner_types_recursive() argument 244 fn same_adt<'tcx>(ty: Ty<'tcx>, def: &'tcx ty::AdtDef) -> bool { in same_adt() 257 shadow_seen: &mut Vec<&'tcx ty::AdtDef>, in is_type_structurally_recursive() argument 289 shadow_seen: &mut Vec<&'tcx ty::AdtDef>, in is_type_structurally_recursive_inner() argument
|
H A D | ty.rs | 13 adtdef: &ty::AdtDef, in sized_constraint_for_ty() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_typeck/src/ |
H A D | collect.rs | 1008 fn adt_def(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::AdtDef { in adt_def() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_symbol_mangling/src/ |
H A D | v0.rs | 457 ty::Adt(&ty::AdtDef { did: def_id, .. }, substs) in print_type()
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_trait_selection/src/traits/ |
H A D | structural_match.rs | 9 use rustc_middle::ty::{self, AdtDef, Ty, TyCtxt, TypeFoldable, TypeVisitor}; 15 Adt(&'tcx AdtDef),
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_codegen_ssa/src/debuginfo/ |
H A D | type_names.rs | 21 use rustc_middle::ty::{self, AdtDef, ExistentialProjection, Ty, TyCtxt}; 382 def: &AdtDef, in push_debuginfo_type_name() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_lint/src/ |
H A D | builtin.rs | 2529 fn is_multi_variant(adt: &ty::AdtDef) -> bool { in check_expr()
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_middle/src/mir/ |
H A D | mod.rs | 14 use crate::ty::{AdtDef, InstanceDef, Region, ScalarInt, UserTypeAnnotationIndex}; 2231 Adt(&'tcx AdtDef, VariantIdx, SubstsRef<'tcx>, Option<UserTypeAnnotationIndex>, Option<usize>), 2696 pub fn variant(self, adt_def: &'tcx AdtDef, variant_index: VariantIdx, field: Field) -> Self { in variant() argument 2747 adt_def: &AdtDef, in variant() argument
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_middle/src/ty/ |
H A D | adt.rs | 67 pub struct AdtDef { struct 78 impl PartialOrd for AdtDef { argument 86 impl Ord for AdtDef { implementation 87 fn cmp(&self, other: &AdtDef) -> Ordering { in cmp() 92 impl PartialEq for AdtDef { implementation 100 impl Eq for AdtDef {} implementation 102 impl Hash for AdtDef { implementation 105 (self as *const AdtDef).hash(s) in hash() 109 impl<S: Encoder> Encodable<S> for AdtDef { implementation 157 impl<'tcx> AdtDef { impl [all …]
|
H A D | context.rs | 19 self, AdtDef, AdtKind, Binder, BindingMode, BoundVar, CanonicalPolyFnSig, 1081 ) -> &'tcx ty::AdtDef { in alloc_adt_def() argument 1082 self.arena.alloc(ty::AdtDef::new(self, did, kind, variants, repr)) in alloc_adt_def() 2248 pub fn mk_adt(self, def: &'tcx AdtDef, substs: SubstsRef<'tcx>) -> Ty<'tcx> { in mk_adt() argument 2474 adt_def: &'tcx AdtDef, in mk_place_downcast() argument
|
H A D | util.rs | 346 pub fn destructor_constraints(self, def: &'tcx ty::AdtDef) -> Vec<ty::subst::GenericArg<'tcx>> { in destructor_constraints()
|
/dports/lang/rust/rustc-1.58.1-src/compiler/rustc_mir_build/src/build/matches/ |
H A D | test.rs | 747 adt_def: &'tcx ty::AdtDef, in candidate_after_variant_switch() argument
|