This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-44
lines changed
compiler/rustc_codegen_ssa/src Expand file tree Collapse file tree 4 files changed +8
-44
lines changed Original file line number Diff line number Diff line change 1111#![ feature( negative_impls) ]
1212#![ feature( rustdoc_internals) ]
1313#![ feature( strict_provenance) ]
14+ #![ feature( trait_alias) ]
1415#![ feature( try_blocks) ]
1516#![ warn( unreachable_pub) ]
1617// tidy-alphabetical-end
Original file line number Diff line number Diff line change @@ -36,22 +36,11 @@ pub trait BackendTypes {
3636 type DIVariable : Copy ;
3737}
3838
39- pub trait Backend < ' tcx > :
40- Sized
39+ pub trait Backend < ' tcx > = Sized
4140 + BackendTypes
4241 + HasTyCtxt < ' tcx >
4342 + LayoutOf <' tcx , LayoutOfResult = TyAndLayout < ' tcx > >
44- + FnAbiOf < ' tcx , FnAbiOfResult = & ' tcx FnAbi < ' tcx , Ty < ' tcx > > >
45- {
46- }
47-
48- impl < ' tcx , T > Backend < ' tcx > for T where
49- Self : BackendTypes
50- + HasTyCtxt < ' tcx >
51- + LayoutOf < ' tcx , LayoutOfResult = TyAndLayout < ' tcx > >
52- + FnAbiOf < ' tcx , FnAbiOfResult = & ' tcx FnAbi < ' tcx , Ty < ' tcx > > >
53- {
54- }
43+ + FnAbiOf < ' tcx , FnAbiOfResult = & ' tcx FnAbi < ' tcx , Ty < ' tcx > > > ;
5544
5645pub trait CodegenBackend {
5746 /// Locale resources for diagnostic messages - a string the content of the Fluent resource.
Original file line number Diff line number Diff line change @@ -50,11 +50,9 @@ pub use self::type_::{
5050} ;
5151pub use self :: write:: { ModuleBufferMethods , ThinBufferMethods , WriteBackendMethods } ;
5252
53- pub trait CodegenObject : Copy + PartialEq + fmt:: Debug { }
54- impl < T : Copy + PartialEq + fmt:: Debug > CodegenObject for T { }
53+ pub trait CodegenObject = Copy + PartialEq + fmt: : Debug ;
5554
56- pub trait CodegenMethods < ' tcx > :
57- Backend < ' tcx >
55+ pub trait CodegenMethods < ' tcx > = Backend < ' tcx >
5856 + TypeMethods <' tcx >
5957 + MiscMethods <' tcx >
6058 + ConstMethods <' tcx >
@@ -64,24 +62,7 @@ pub trait CodegenMethods<'tcx>:
6462 + PreDefineMethods <' tcx >
6563 + HasParamEnv <' tcx >
6664 + HasTyCtxt <' tcx >
67- + HasTargetSpec
68- {
69- }
70-
71- impl < ' tcx , T > CodegenMethods < ' tcx > for T where
72- Self : Backend < ' tcx >
73- + TypeMethods < ' tcx >
74- + MiscMethods < ' tcx >
75- + ConstMethods < ' tcx >
76- + StaticMethods
77- + DebugInfoMethods < ' tcx >
78- + AsmMethods < ' tcx >
79- + PreDefineMethods < ' tcx >
80- + HasParamEnv < ' tcx >
81- + HasTyCtxt < ' tcx >
82- + HasTargetSpec
83- {
84- }
65+ + HasTargetSpec ;
8566
8667pub trait HasCodegen <' tcx > :
8768 Backend < ' tcx > + std:: ops:: Deref < Target = <Self as HasCodegen < ' tcx > >:: CodegenCx >
Original file line number Diff line number Diff line change @@ -172,12 +172,5 @@ pub trait ArgAbiMethods<'tcx>: HasCodegen<'tcx> {
172172 fn arg_memory_ty ( & self , arg_abi : & ArgAbi < ' tcx , Ty < ' tcx > > ) -> Self :: Type ;
173173}
174174
175- pub trait TypeMethods < ' tcx > :
176- DerivedTypeMethods < ' tcx > + LayoutTypeMethods < ' tcx > + TypeMembershipMethods < ' tcx >
177- {
178- }
179-
180- impl < ' tcx , T > TypeMethods < ' tcx > for T where
181- Self : DerivedTypeMethods < ' tcx > + LayoutTypeMethods < ' tcx > + TypeMembershipMethods < ' tcx >
182- {
183- }
175+ pub trait TypeMethods < ' tcx > =
176+ DerivedTypeMethods < ' tcx > + LayoutTypeMethods <' tcx > + TypeMembershipMethods <' tcx > ;
You can’t perform that action at this time.
0 commit comments