@@ -870,11 +870,8 @@ and transl_signature env sg =
870870 let trem, rem, final_env = transl_sig newenv srem in
871871 (mksig (Tsig_include incl) env loc :: trem, sg @ rem, final_env)
872872 | Psig_attribute x ->
873- (* The frontend pre-pass already emitted @@ppwarning and malformed
874- @@warning diagnostics; only thread the warning state here so the
875- remaining signature items see the right settings. *)
876- Builtin_attributes. warning_scope ~ppwarning: false
877- ~report_attribute_errors: false [x] (fun () ->
873+ Builtin_attributes. warning_scope_without_attribute_diagnostics [x]
874+ (fun () ->
878875 let trem, rem, final_env = transl_sig env srem in
879876 (mksig (Tsig_attribute x) env loc :: trem, rem, final_env))
880877 | Psig_extension (ext , _attrs ) ->
@@ -1608,10 +1605,8 @@ and type_structure ?(toplevel = false) funct_body anchor env sstr scope =
16081605 Cmt_format. set_saved_types
16091606 (Cmt_format. Partial_structure_item str :: previous_saved_types);
16101607 let str_rem, sig_rem, final_env =
1611- (* Floating warning-attribute diagnostics are handled in the frontend
1612- pass; this scope only applies their effect to following items. *)
1613- Builtin_attributes. warning_scope ~ppwarning: false
1614- ~report_attribute_errors: false [x] (fun () -> type_struct env srem)
1608+ Builtin_attributes. warning_scope_without_attribute_diagnostics [x]
1609+ (fun () -> type_struct env srem)
16151610 in
16161611 (str :: str_rem, sig_rem, final_env)
16171612 | pstr :: srem ->
0 commit comments