diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2016-12-08 10:14:35 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2016-12-12 15:15:45 -0800 |
| commit | 1ae2245a4e89d90f8bacef1d1d05fcf7461596fe (patch) | |
| tree | 5194dcb11ab43603d7017b694c0e940c66d644e4 | |
| parent | 6483bdd860fd89fc68846d4cc94c7ae3307a84c1 (diff) | |
| download | rust-1ae2245a4e89d90f8bacef1d1d05fcf7461596fe.tar.gz rust-1ae2245a4e89d90f8bacef1d1d05fcf7461596fe.zip | |
rustdoc: escape the deprecated and unstable reason text
| -rw-r--r-- | src/liballoc/boxed.rs | 8 | ||||
| -rw-r--r-- | src/librustdoc/html/render.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index addb056f534..5409ade2923 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -587,7 +587,7 @@ impl<I: FusedIterator + ?Sized> FusedIterator for Box<I> {} /// ``` #[rustc_paren_sugar] #[unstable(feature = "fnbox", - reason = "will be deprecated if and when Box<FnOnce> becomes usable", issue = "28796")] + reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")] pub trait FnBox<A> { type Output; @@ -595,7 +595,7 @@ pub trait FnBox<A> { } #[unstable(feature = "fnbox", - reason = "will be deprecated if and when Box<FnOnce> becomes usable", issue = "28796")] + reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")] impl<A, F> FnBox<A> for F where F: FnOnce<A> { @@ -607,7 +607,7 @@ impl<A, F> FnBox<A> for F } #[unstable(feature = "fnbox", - reason = "will be deprecated if and when Box<FnOnce> becomes usable", issue = "28796")] + reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")] impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output = R> + 'a> { type Output = R; @@ -617,7 +617,7 @@ impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output = R> + 'a> { } #[unstable(feature = "fnbox", - reason = "will be deprecated if and when Box<FnOnce> becomes usable", issue = "28796")] + reason = "will be deprecated if and when `Box<FnOnce>` becomes usable", issue = "28796")] impl<'a, A, R> FnOnce<A> for Box<FnBox<A, Output = R> + Send + 'a> { type Output = R; diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index e721b66779f..29781888fdb 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1844,7 +1844,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S if let Some(stab) = item.stability.as_ref() { let deprecated_reason = if show_reason && !stab.deprecated_reason.is_empty() { - format!(": {}", stab.deprecated_reason) + format!(": {}", Escape(&stab.deprecated_reason)) } else { String::new() }; @@ -1875,7 +1875,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S String::new() }; let unstable_reason = if show_reason && !stab.unstable_reason.is_empty() { - format!(": {}", stab.unstable_reason) + format!(": {}", Escape(&stab.unstable_reason)) } else { String::new() }; @@ -1884,7 +1884,7 @@ fn short_stability(item: &clean::Item, cx: &Context, show_reason: bool) -> Vec<S }; } else if let Some(depr) = item.deprecation.as_ref() { let note = if show_reason && !depr.note.is_empty() { - format!(": {}", depr.note) + format!(": {}", Escape(&depr.note)) } else { String::new() }; |
