From b7d5cac937b283eec7821e286ee5ab15b9de7e7d Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 14 Jun 2024 13:39:17 +0100 Subject: [PATCH] Fix compiler warning with OCaml 5.2 OCaml 5.2 complains: Error (warning 53 [misplaced-attribute]): the "deprecated" attribute cannot appear in this context --- cohttp/src/s.ml | 4 ++-- http/src/http.mli | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cohttp/src/s.ml b/cohttp/src/s.ml index dbf59ebdad..1331f8018b 100644 --- a/cohttp/src/s.ml +++ b/cohttp/src/s.ml @@ -144,8 +144,8 @@ module type Response = sig val version : t -> Code.version val status : t -> Code.status_code - val flush : - (t -> bool[@deprecated "this field will be removed in the future"]) + val flush : (t -> bool) + [@@deprecated "this field will be removed in the future"] val compare : t -> t -> int diff --git a/http/src/http.mli b/http/src/http.mli index 82f5d1ef9f..3beb0027d7 100644 --- a/http/src/http.mli +++ b/http/src/http.mli @@ -465,10 +465,10 @@ module Response : sig val status : t -> Status.t val flush : - (t -> bool - [@deprecated - "this field will be removed in the future. Provide flush in the \ - [respond_*] function instead."]) + (t -> bool) + [@@deprecated + "this field will be removed in the future. Provide flush in the \ + [respond_*] function instead."] val compare : t -> t -> int