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 11
11
#![ feature( negative_impls) ]
12
12
#![ feature( rustdoc_internals) ]
13
13
#![ feature( strict_provenance) ]
14
+ #![ feature( trait_alias) ]
14
15
#![ feature( try_blocks) ]
15
16
#![ warn( unreachable_pub) ]
16
17
// tidy-alphabetical-end
Original file line number Diff line number Diff line change @@ -36,22 +36,11 @@ pub trait BackendTypes {
36
36
type DIVariable : Copy ;
37
37
}
38
38
39
- pub trait Backend < ' tcx > :
40
- Sized
39
+ pub trait Backend < ' tcx > = Sized
41
40
+ BackendTypes
42
41
+ HasTyCtxt < ' tcx >
43
42
+ 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 > > > ;
55
44
56
45
pub trait CodegenBackend {
57
46
/// 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_::{
50
50
} ;
51
51
pub use self :: write:: { ModuleBufferMethods , ThinBufferMethods , WriteBackendMethods } ;
52
52
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 ;
55
54
56
- pub trait CodegenMethods < ' tcx > :
57
- Backend < ' tcx >
55
+ pub trait CodegenMethods < ' tcx > = Backend < ' tcx >
58
56
+ TypeMethods <' tcx >
59
57
+ MiscMethods <' tcx >
60
58
+ ConstMethods <' tcx >
@@ -64,24 +62,7 @@ pub trait CodegenMethods<'tcx>:
64
62
+ PreDefineMethods <' tcx >
65
63
+ HasParamEnv <' tcx >
66
64
+ 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 ;
85
66
86
67
pub trait HasCodegen <' tcx > :
87
68
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> {
172
172
fn arg_memory_ty ( & self , arg_abi : & ArgAbi < ' tcx , Ty < ' tcx > > ) -> Self :: Type ;
173
173
}
174
174
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