Skip to content

Commit 808bcfb

Browse files
authored
deprecation message improvement
1 parent f1cc8b2 commit 808bcfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/str/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@ impl str {
24532453
/// }
24542454
/// ```
24552455
#[stable(feature = "rust1", since = "1.0.0")]
2456-
#[rustc_deprecated(since = "1.29.0", reason = "duplicates `get_unchecked`")]
2456+
#[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked(begin..end)` instead")]
24572457
#[inline]
24582458
pub unsafe fn slice_unchecked(&self, begin: usize, end: usize) -> &str {
24592459
(begin..end).get_unchecked(self)
@@ -2484,7 +2484,7 @@ impl str {
24842484
/// * `begin` and `end` must be byte positions within the string slice.
24852485
/// * `begin` and `end` must lie on UTF-8 sequence boundaries.
24862486
#[stable(feature = "str_slice_mut", since = "1.5.0")]
2487-
#[rustc_deprecated(since = "1.29.0", reason = "duplicates `get_unchecked_mut`")]
2487+
#[rustc_deprecated(since = "1.29.0", reason = "use `get_unchecked_mut(begin..end)` instead")]
24882488
#[inline]
24892489
pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str {
24902490
(begin..end).get_unchecked_mut(self)

0 commit comments

Comments
 (0)