@@ -5,14 +5,14 @@ use rustc_span::symbol::sym;
55
66use crate :: utils:: { last_path_segment, paths, snippet_with_applicability, span_lint_and_sugg} ;
77
8- use super :: utils;
8+ use super :: { utils, RC_BUFFER } ;
99
1010pub ( super ) fn check ( cx : & LateContext < ' _ > , hir_ty : & hir:: Ty < ' _ > , qpath : & QPath < ' _ > , def_id : DefId ) -> bool {
1111 if cx. tcx . is_diagnostic_item ( sym:: Rc , def_id) {
1212 if let Some ( alternate) = match_buffer_type ( cx, qpath) {
1313 span_lint_and_sugg (
1414 cx,
15- super :: RC_BUFFER ,
15+ RC_BUFFER ,
1616 hir_ty. span ,
1717 "usage of `Rc<T>` when T is a buffer type" ,
1818 "try" ,
@@ -35,7 +35,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
3535 let mut applicability = Applicability :: MachineApplicable ;
3636 span_lint_and_sugg (
3737 cx,
38- super :: RC_BUFFER ,
38+ RC_BUFFER ,
3939 hir_ty. span ,
4040 "usage of `Rc<T>` when T is a buffer type" ,
4141 "try" ,
@@ -51,7 +51,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
5151 if let Some ( alternate) = match_buffer_type ( cx, qpath) {
5252 span_lint_and_sugg (
5353 cx,
54- super :: RC_BUFFER ,
54+ RC_BUFFER ,
5555 hir_ty. span ,
5656 "usage of `Arc<T>` when T is a buffer type" ,
5757 "try" ,
@@ -73,7 +73,7 @@ pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_
7373 let mut applicability = Applicability :: MachineApplicable ;
7474 span_lint_and_sugg (
7575 cx,
76- super :: RC_BUFFER ,
76+ RC_BUFFER ,
7777 hir_ty. span ,
7878 "usage of `Arc<T>` when T is a buffer type" ,
7979 "try" ,
0 commit comments