File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -393,6 +393,15 @@ impl<'tcx> LateLintPass<'tcx> for AtomicContext<'tcx> {
393393 _: rustc_span:: Span ,
394394 def_id : LocalDefId ,
395395 ) {
396+ // Skip checks for proc-macro crates.
397+ if self
398+ . cx
399+ . crate_types ( )
400+ . contains ( & rustc_session:: config:: CrateType :: ProcMacro )
401+ {
402+ return ;
403+ }
404+
396405 // Building MIR for `fn`s with unsatisfiable preds results in ICE.
397406 if crate :: util:: fn_has_unsatisfiable_preds ( cx, def_id. to_def_id ( ) ) {
398407 return ;
@@ -409,6 +418,15 @@ impl<'tcx> LateLintPass<'tcx> for AtomicContext<'tcx> {
409418 }
410419
411420 fn check_crate_post ( & mut self , cx : & LateContext < ' tcx > ) {
421+ // Skip checks for proc-macro crates.
422+ if self
423+ . cx
424+ . crate_types ( )
425+ . contains ( & rustc_session:: config:: CrateType :: ProcMacro )
426+ {
427+ return ;
428+ }
429+
412430 let mono_items = super :: monomorphize_collector:: collect_crate_mono_items (
413431 cx. tcx ,
414432 crate :: monomorphize_collector:: MonoItemCollectionMode :: Eager ,
You can’t perform that action at this time.
0 commit comments