diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs
index 1805ccd25ee042891e891b5dc15728aded503b5e..24c40ccdfdf262886865b09edf31c4f6d84626fe 100644
--- a/compiler/basicTypes/MkId.lhs
+++ b/compiler/basicTypes/MkId.lhs
@@ -751,9 +751,14 @@ mkPrimOpId prim_op
     id   = mkGlobalId (PrimOpId prim_op) name ty info
                 
     info = noCafIdInfo
-           `setSpecInfo`          mkSpecInfo (maybeToList $ primOpRules name prim_op)
-           `setArityInfo`         arity
+           `setSpecInfo`       mkSpecInfo (maybeToList $ primOpRules name prim_op)
+           `setArityInfo`      arity
            `setStrictnessInfo` Just strict_sig
+           `setInlinePragInfo` neverInlinePragma
+               -- We give PrimOps a NOINLINE pragma so that we don't
+               -- get silly warnings from Desugar.dsRule (the inline_shadows_rule 
+               -- test) about a RULE conflicting with a possible inlining
+               -- cf Trac #7287
 
 -- For each ccall we manufacture a separate CCallOpId, giving it
 -- a fresh unique, a type that is correct for this particular ccall,