diff options
| author | Artyom Pavlov <newpavlov@gmail.com> | 2018-07-12 19:49:55 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-12 19:49:55 +0300 |
| commit | 808bcfbe53cec7aa6d728148fc2fcb3a4c951009 (patch) | |
| tree | 80364f778ebe5089945519451f1c52a7312dd7e2 /src/libcore/str | |
| parent | f1cc8b2854d5c4342efc295dd7eddeed9343b556 (diff) | |
| download | rust-808bcfbe53cec7aa6d728148fc2fcb3a4c951009.tar.gz rust-808bcfbe53cec7aa6d728148fc2fcb3a4c951009.zip | |
deprecation message improvement
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index e7bebc891d9..d642f3d696f 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -2453,7 +2453,7 @@ impl str { /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_deprecated(since = "1.29.0", reason = "duplicates `get_unchecked`")] + #[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked(begin..end)` instead")] #[inline] pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str { (begin..end).get_unchecked(self) @@ -2484,7 +2484,7 @@ impl str { /// * `begin` and `end` must be byte positions within the string slice. /// * `begin` and `end` must lie on UTF-8 sequence boundaries. #[stable(feature = "str_slice_mut", since = "1.5.0")] - #[rustc_deprecated(since = "1.29.0", reason = "duplicates `get_unchecked_mut`")] + #[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked_mut(begin..end)` instead")] #[inline] pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str { (begin..end).get_unchecked_mut(self) |
