diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp
index bc0eda00..c3881cca 100644
--- a/include/nlohmann/json.hpp
+++ b/include/nlohmann/json.hpp
@@ -7784,7 +7784,7 @@ class basic_json
         return from_bson(ptr, ptr + len, strict, allow_exceptions);
     }
 
-    JSON_HEDLEY_DEPRECATED(3.8.0, from_bson(ptr, ptr + len))
+    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len))
     JSON_HEDLEY_WARN_UNUSED_RESULT
     static basic_json from_bson(detail::span_input_adapter&& i,
                                 const bool strict = true,
diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
index 0421302c..85e42878 100644
--- a/single_include/nlohmann/json.hpp
+++ b/single_include/nlohmann/json.hpp
@@ -23547,7 +23547,7 @@ class basic_json
         return from_bson(ptr, ptr + len, strict, allow_exceptions);
     }
 
-    JSON_HEDLEY_DEPRECATED(3.8.0, from_bson(ptr, ptr + len))
+    JSON_HEDLEY_DEPRECATED_FOR(3.8.0, from_bson(ptr, ptr + len))
     JSON_HEDLEY_WARN_UNUSED_RESULT
     static basic_json from_bson(detail::span_input_adapter&& i,
                                 const bool strict = true,