diff options
| author | Simon Sapin <simon.sapin@exyr.org> | 2016-03-07 16:07:18 +0100 |
|---|---|---|
| committer | Simon Sapin <simon.sapin@exyr.org> | 2016-03-07 16:07:18 +0100 |
| commit | e387c8870017a9fb014fb18e249395a844f5d0e6 (patch) | |
| tree | 84db567afa45c9105e4b1d48a785e48a75bc3b7e | |
| parent | e079afa00b58f06de8e2a7596073045cd0983b7b (diff) | |
| download | rust-e387c8870017a9fb014fb18e249395a844f5d0e6.tar.gz rust-e387c8870017a9fb014fb18e249395a844f5d0e6.zip | |
"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.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/cell.rs b/src/libcore/cell.rs index 144adde12e4..8f6557079f1 100644 --- a/src/libcore/cell.rs +++ b/src/libcore/cell.rs @@ -625,7 +625,7 @@ 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 +700,7 @@ 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> |
