diff --git a/CHANGELOG.md b/CHANGELOG.md
index eec143420d..d43b9627c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -86,6 +86,8 @@
- Load a compiled module's interface into its first dependent without decoding it again, and keep the syntax tree nodes the built-in frontend pass leaves unchanged instead of copying them. https://github.com/jfrolich/rescript-rust/pull/89 https://github.com/jfrolich/rescript-rust/pull/85
+- Print the path of a value or type for a deprecation warning only when the item is deprecated, instead of on every use. https://github.com/jfrolich/rescript-rust/pull/98
+
- Compute the item digests and item references of a compiled module's interface once, when it is published, instead of decoding the stored interface again for each. https://github.com/jfrolich/rescript-rust/pull/87
- Type-check faster: lower argument levels directly, settle the checks before binding a type variable in one walk, and skip the inclusion check of a unit against its own inferred signature. https://github.com/jfrolich/rescript-rust/pull/84
diff --git a/compiler-rust/src/types/typecore.rs b/compiler-rust/src/types/typecore.rs
index a183e2ccdd..c8a4d71eae 100644
--- a/compiler-rust/src/types/typecore.rs
+++ b/compiler-rust/src/types/typecore.rs
@@ -7667,6 +7667,20 @@ fn deprecated_warning_from_attrs(
.map(|(reason, can_be_automigrated)| deprecated_warning(name, reason, can_be_automigrated)))
}
+/// `deprecated_warning_from_attrs` for an item named by its path. The name is
+/// printed only for a deprecated item: this runs on every use of a value or
+/// type, and almost none of them is deprecated.
+fn deprecated_warning_for_path(
+ path: &Path,
+ attrs: &[crate::types::decl::Attribute],
+) -> Result