]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_lint/nonstandard_style.rs
handle errors based on parse_sess
[rust.git] / src / librustc_lint / nonstandard_style.rs
index 56d204f15d935897bc36d68324032baf38256f36..40781b0771d89d72a0161bb83ed933f54b21aeb2 100644 (file)
@@ -121,7 +121,7 @@ fn check_item(&mut self, cx: &LateContext, it: &hir::Item) {
         let has_repr_c = it.attrs
             .iter()
             .any(|attr| {
-                attr::find_repr_attrs(cx.tcx.sess.diagnostic(), attr)
+                attr::find_repr_attrs(&cx.tcx.sess.parse_sess, attr)
                     .iter()
                     .any(|r| r == &attr::ReprC)
             });