@@ -172,7 +172,7 @@ impl LintStore {
172
172
from_plugin : bool ,
173
173
register_only : bool ,
174
174
pass : EarlyLintPassObject ) {
175
- self . push_pass ( from_plugin, & pass) ;
175
+ self . push_lints ( from_plugin, & pass. get_lints ( ) ) ;
176
176
if !register_only {
177
177
self . early_passes . as_mut ( ) . unwrap ( ) . push ( pass) ;
178
178
}
@@ -184,7 +184,7 @@ impl LintStore {
184
184
register_only : bool ,
185
185
pass : EarlyLintPassObject ,
186
186
) {
187
- self . push_pass ( from_plugin, & pass) ;
187
+ self . push_lints ( from_plugin, & pass. get_lints ( ) ) ;
188
188
if !register_only {
189
189
self . pre_expansion_passes . as_mut ( ) . unwrap ( ) . push ( pass) ;
190
190
}
@@ -195,7 +195,7 @@ impl LintStore {
195
195
register_only : bool ,
196
196
per_module : bool ,
197
197
pass : LateLintPassObject ) {
198
- self . push_pass ( from_plugin, & pass) ;
198
+ self . push_lints ( from_plugin, & pass. get_lints ( ) ) ;
199
199
if !register_only {
200
200
if per_module {
201
201
self . late_module_passes . push ( pass) ;
@@ -206,10 +206,8 @@ impl LintStore {
206
206
}
207
207
208
208
// Helper method for register_early/late_pass
209
- fn push_pass < P : LintPass + ?Sized + ' static > ( & mut self ,
210
- from_plugin : bool ,
211
- pass : & Box < P > ) {
212
- for lint in pass. get_lints ( ) {
209
+ fn push_lints ( & mut self , from_plugin : bool , lints : & [ & ' static Lint ] ) {
210
+ for lint in lints {
213
211
self . lints . push ( ( lint, from_plugin) ) ;
214
212
215
213
let id = LintId :: of ( lint) ;
0 commit comments