@@ -286,7 +286,9 @@ declare_lint_pass!(NonCopyConst => [DECLARE_INTERIOR_MUTABLE_CONST, BORROW_INTER
286286
287287impl < ' tcx > LateLintPass < ' tcx > for NonCopyConst {
288288 fn check_item ( & mut self , cx : & LateContext < ' tcx > , it : & ' tcx Item < ' _ > ) {
289- if let ItemKind :: Const ( hir_ty, body_id) = it. kind {
289+ if let ItemKind :: Const ( hir_ty, _generics, body_id) = it. kind {
290+ // FIXME(generic_consts): Not sure if we need to handle generics explicitly here like
291+ // replacing params with placeholders or can `is_unfrozen` handle params on its own?
290292 let ty = hir_ty_to_ty ( cx. tcx , hir_ty) ;
291293 if !ignored_macro ( cx, it) && is_unfrozen ( cx, ty) && is_value_unfrozen_poly ( cx, body_id, ty) {
292294 lint ( cx, Source :: Item { item : it. span } ) ;
@@ -295,6 +297,7 @@ impl<'tcx> LateLintPass<'tcx> for NonCopyConst {
295297 }
296298
297299 fn check_trait_item ( & mut self , cx : & LateContext < ' tcx > , trait_item : & ' tcx TraitItem < ' _ > ) {
300+ // FIXME(generic_consts): Not sure if we need to handle generics explicitly here.
298301 if let TraitItemKind :: Const ( hir_ty, body_id_opt) = & trait_item. kind {
299302 let ty = hir_ty_to_ty ( cx. tcx , hir_ty) ;
300303
@@ -322,6 +325,7 @@ impl<'tcx> LateLintPass<'tcx> for NonCopyConst {
322325 }
323326
324327 fn check_impl_item ( & mut self , cx : & LateContext < ' tcx > , impl_item : & ' tcx ImplItem < ' _ > ) {
328+ // FIXME(generic_consts): Not sure if we need to handle generics explicitly here
325329 if let ImplItemKind :: Const ( hir_ty, body_id) = & impl_item. kind {
326330 let item_def_id = cx. tcx . hir ( ) . get_parent_item ( impl_item. hir_id ( ) ) . def_id ;
327331 let item = cx. tcx . hir ( ) . expect_item ( item_def_id) ;
0 commit comments