Skip to content

Commit

Permalink
Convert html links to intra-doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 20, 2025
1 parent abe7194 commit 85cb0c4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions serde/src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
//! - SocketAddrV6
//!
//! [Implementing `Deserialize`]: https://serde.rs/impl-deserialize.html
//! [`Deserialize`]: ../trait.Deserialize.html
//! [`Deserializer`]: ../trait.Deserializer.html
//! [`Deserialize`]: crate::Deserialize
//! [`Deserializer`]: crate::Deserializer
//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
//! [`postcard`]: https://github.com/jamesmunns/postcard
//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
Expand Down
6 changes: 3 additions & 3 deletions serde/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
/// # }
/// ```
///
/// [`Deserializer`]: trait.Deserializer.html
/// [`Visitor`]: de/trait.Visitor.html
/// [`Deserializer::deserialize_any`]: trait.Deserializer.html#tymethod.deserialize_any
/// [`Deserializer`]: crate::Deserializer
/// [`Visitor`]: crate::de::Visitor
/// [`Deserializer::deserialize_any`]: crate::Deserializer::deserialize_any
#[macro_export(local_inner_macros)]
macro_rules! forward_to_deserialize_any {
(<$visitor:ident: Visitor<$lifetime:tt>> $($func:ident)*) => {
Expand Down
16 changes: 8 additions & 8 deletions serde/src/ser/impossible.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ use crate::ser::{
/// }
/// ```
///
/// [`Serializer`]: trait.Serializer.html
/// [`SerializeSeq`]: trait.SerializeSeq.html
/// [`SerializeTuple`]: trait.SerializeTuple.html
/// [`SerializeTupleStruct`]: trait.SerializeTupleStruct.html
/// [`SerializeTupleVariant`]: trait.SerializeTupleVariant.html
/// [`SerializeMap`]: trait.SerializeMap.html
/// [`SerializeStruct`]: trait.SerializeStruct.html
/// [`SerializeStructVariant`]: trait.SerializeStructVariant.html
/// [`Serializer`]: crate::Serializer
/// [`SerializeSeq`]: crate::ser::SerializeSeq
/// [`SerializeTuple`]: crate::ser::SerializeTuple
/// [`SerializeTupleStruct`]: crate::ser::SerializeTupleStruct
/// [`SerializeTupleVariant`]: crate::ser::SerializeTupleVariant
/// [`SerializeMap`]: crate::ser::SerializeMap
/// [`SerializeStruct`]: crate::ser::SerializeStruct
/// [`SerializeStructVariant`]: crate::ser::SerializeStructVariant
pub struct Impossible<Ok, Error> {
void: Void,
ok: PhantomData<Ok>,
Expand Down
23 changes: 11 additions & 12 deletions serde/src/ser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
//!
//! [Implementing `Serialize`]: https://serde.rs/impl-serialize.html
//! [`LinkedHashMap<K, V>`]: https://docs.rs/linked-hash-map/*/linked_hash_map/struct.LinkedHashMap.html
//! [`Serialize`]: ../trait.Serialize.html
//! [`Serializer`]: ../trait.Serializer.html
//! [`Serialize`]: crate::Serialize
//! [`Serializer`]: crate::Serializer
//! [`postcard`]: https://github.com/jamesmunns/postcard
//! [`linked-hash-map`]: https://crates.io/crates/linked-hash-map
//! [`serde_derive`]: https://crates.io/crates/serde_derive
Expand Down Expand Up @@ -173,8 +173,8 @@ macro_rules! declare_error_trait {
/// }
/// ```
///
/// [`Path`]: https://doc.rust-lang.org/std/path/struct.Path.html
/// [`Serialize`]: ../trait.Serialize.html
/// [`Path`]: std::path::Path
/// [`Serialize`]: crate::Serialize
fn custom<T>(msg: T) -> Self
where
T: Display;
Expand Down Expand Up @@ -345,7 +345,7 @@ pub trait Serializer: Sized {
/// in-memory data structures may be simplified by using `Ok` to propagate
/// the data structure around.
///
/// [`io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
/// [`io::Write`]: std::io::Write
type Ok;

/// The error type when some error occurs during serialization.
Expand Down Expand Up @@ -769,7 +769,7 @@ pub trait Serializer: Sized {
/// # fn main() {}
/// ```
///
/// [`None`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.None
/// [`None`]: core::option::Option::None
fn serialize_none(self) -> Result<Self::Ok, Self::Error>;

/// Serialize a [`Some(T)`] value.
Expand Down Expand Up @@ -802,7 +802,7 @@ pub trait Serializer: Sized {
/// # fn main() {}
/// ```
///
/// [`Some(T)`]: https://doc.rust-lang.org/std/option/enum.Option.html#variant.Some
/// [`Some(T)`]: core::option::Option::Some
fn serialize_some<T>(self, value: &T) -> Result<Self::Ok, Self::Error>
where
T: ?Sized + Serialize;
Expand Down Expand Up @@ -1353,8 +1353,7 @@ pub trait Serializer: Sized {
/// }
/// ```
///
/// [`String`]: https://doc.rust-lang.org/std/string/struct.String.html
/// [`serialize_str`]: #tymethod.serialize_str
/// [`serialize_str`]: Self::serialize_str
#[cfg(any(feature = "std", feature = "alloc"))]
fn collect_str<T>(self, value: &T) -> Result<Self::Ok, Self::Error>
where
Expand Down Expand Up @@ -1805,9 +1804,9 @@ pub trait SerializeMap {
/// care about performance or are not able to optimize `serialize_entry` any
/// better than this.
///
/// [`Serialize`]: ../trait.Serialize.html
/// [`serialize_key`]: #tymethod.serialize_key
/// [`serialize_value`]: #tymethod.serialize_value
/// [`Serialize`]: crate::Serialize
/// [`serialize_key`]: Self::serialize_key
/// [`serialize_value`]: Self::serialize_value
fn serialize_entry<K, V>(&mut self, key: &K, value: &V) -> Result<(), Self::Error>
where
K: ?Sized + Serialize,
Expand Down

0 comments on commit 85cb0c4

Please sign in to comment.