about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-03-10 02:45:14 -0800
committerbors <bors@rust-lang.org>2016-03-10 02:45:14 -0800
commit25a23271f424107965c0a44db2993c263b79b9fa (patch)
tree8e4e34bdc7c4ccc9b095285ce63788379bf1b444
parent3ac4076ac0e4276dce59cd254dfa2c5cf848dca8 (diff)
parent57b3cfde0dd43e5e4d4eea2cd6bce16f7b6622d5 (diff)
downloadrust-25a23271f424107965c0a44db2993c263b79b9fa.tar.gz
rust-25a23271f424107965c0a44db2993c263b79b9fa.zip
Auto merge of #32100 - SimonSapin:patch-6, r=alexcrichton
"can be built on Ref::map"… how?

Now that `std::cell::Ref::filter_map` and `RefMut::filter_map` are deprecated, using them gives a warning like:
```
script/dom/element.rs:754:9: 754:24 warning: use of deprecated item: can be built on Ref::map, #[warn(deprecated)] on by default
```

But it’s not at all obvious *how* the functionality can be built on `Ref::map`. This PR adds to the warning message a crates.io URL for a crate that does.
-rw-r--r--src/libcore/cell.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs
index 144adde12e4..fdd2e3a1784 100644
--- a/src/libcore/cell.rs
+++ b/src/libcore/cell.rs
@@ -625,7 +625,8 @@ impl<'b, T: ?Sized> Ref<'b, T> {
     /// ```
     #[unstable(feature = "cell_extras", reason = "recently added",
                issue = "27746")]
-    #[rustc_deprecated(since = "1.8.0", reason = "can be built on Ref::map")]
+    #[rustc_deprecated(since = "1.8.0", reason = "can be built on `Ref::map`: \
+        https://crates.io/crates/ref_filter_map")]
     #[inline]
     pub fn filter_map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Option<Ref<'b, U>>
         where F: FnOnce(&T) -> Option<&U>
@@ -700,7 +701,8 @@ impl<'b, T: ?Sized> RefMut<'b, T> {
     /// ```
     #[unstable(feature = "cell_extras", reason = "recently added",
                issue = "27746")]
-    #[rustc_deprecated(since = "1.8.0", reason = "can be built on RefMut::map")]
+    #[rustc_deprecated(since = "1.8.0", reason = "can be built on `RefMut::map`: \
+        https://crates.io/crates/ref_filter_map")]
     #[inline]
     pub fn filter_map<U: ?Sized, F>(orig: RefMut<'b, T>, f: F) -> Option<RefMut<'b, U>>
         where F: FnOnce(&mut T) -> Option<&mut U>