]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_codegen_ssa/traits/type_.rs
Various minor/cosmetic improvements to code
[rust.git] / src / librustc_codegen_ssa / traits / type_.rs
index 15976ac516dc62c4882464bbefafc878cbcec710..ed53c8fffa7aa1ad41c4650ab8d5e72a8823c8eb 100644 (file)
@@ -20,6 +20,8 @@
 use std::cell::RefCell;
 use syntax::ast;
 
+// This depends on `Backend` and not `BackendTypes`, because consumers will probably want to use
+// `LayoutOf` or `HasTyCtxt`. This way, they don't have to add a constraint on it themselves.
 pub trait BaseTypeMethods<'tcx>: Backend<'tcx> {
     fn type_void(&self) -> Self::Type;
     fn type_metadata(&self) -> Self::Type;
@@ -30,7 +32,7 @@ pub trait BaseTypeMethods<'tcx>: Backend<'tcx> {
     fn type_i64(&self) -> Self::Type;
     fn type_i128(&self) -> Self::Type;
 
-    // Creates an integer type with the given number of bits, e.g. i24
+    // Creates an integer type with the given number of bits, e.g., i24
     fn type_ix(&self, num_bits: u64) -> Self::Type;
     fn type_isize(&self) -> Self::Type;
 
@@ -41,11 +43,9 @@ pub trait BaseTypeMethods<'tcx>: Backend<'tcx> {
     fn type_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type;
     fn type_variadic_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type;
     fn type_struct(&self, els: &[Self::Type], packed: bool) -> Self::Type;
-    fn type_named_struct(&self, name: &str) -> Self::Type;
     fn type_array(&self, ty: Self::Type, len: u64) -> Self::Type;
     fn type_vector(&self, ty: Self::Type, len: u64) -> Self::Type;
     fn type_kind(&self, ty: Self::Type) -> TypeKind;
-    fn set_struct_body(&self, ty: Self::Type, els: &[Self::Type], packed: bool);
     fn type_ptr_to(&self, ty: Self::Type) -> Self::Type;
     fn element_type(&self, ty: Self::Type) -> Self::Type;