From 54501b55743409a4a1a933dfef2752a85d88da1f Mon Sep 17 00:00:00 2001 From: Georg Semmler Date: Fri, 14 Feb 2025 09:21:13 +0100 Subject: [PATCH] Minor documentation fixes This commit fixes a list of documentation warnings shown while running rustdoc. This mostly fixes broken links --- diesel/src/pg/expression/array.rs | 4 +-- diesel/src/pg/expression/functions.rs | 8 ++--- diesel/src/pg/expression/helper_types.rs | 34 ++++++++++---------- diesel/src/sqlite/connection/sqlite_value.rs | 10 +++--- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/diesel/src/pg/expression/array.rs b/diesel/src/pg/expression/array.rs index e9bea41984d7..419e49e67590 100644 --- a/diesel/src/pg/expression/array.rs +++ b/diesel/src/pg/expression/array.rs @@ -58,7 +58,7 @@ where elements.into_array_expression() } -/// Return type of [`array(tuple_or_subselect)`](super::dsl::array) +/// Return type of [`array(tuple_or_subselect)`](super::dsl::array()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array = >::ArrayExpression; @@ -72,7 +72,7 @@ pub type array = >::ArrayExpression; (`AsExpressionList` is a deprecated trait alias for `IntoArrayExpression`)" )] pub trait IntoArrayExpression { - /// Type of the expression returned by [AsArrayExpression::as_in_expression] + /// Type of the expression returned by [IntoArrayExpression::into_array_expression] type ArrayExpression: Expression>; /// Construct the diesel query dsl representation of diff --git a/diesel/src/pg/expression/functions.rs b/diesel/src/pg/expression/functions.rs index 04a8e431e2b0..5520bad73d20 100644 --- a/diesel/src/pg/expression/functions.rs +++ b/diesel/src/pg/expression/functions.rs @@ -930,7 +930,7 @@ extern "SQL" { /// Converts each array element to its text representation and concatenates those elements /// separated by the delimiter string. `NULL` entries are omitted in this variant. - /// See [array_to_string_with_null_string] for a variant with that argument. + /// See [array_to_string_with_null_string](array_to_string_with_null_string()) for a variant with that argument. /// /// # Example /// @@ -1115,7 +1115,7 @@ extern "SQL" { /// Returns an array initialized with supplied value and dimensions, /// optionally with lower bounds other than 1. This function omits the optional - /// lower bound argument. See [array_fill_with_lower_bound] for that. + /// lower bound argument. See [array_fill_with_lower_bound](array_fill_with_lower_bound()) for that. /// /// # Example /// @@ -1229,7 +1229,7 @@ extern "SQL" { /// Returns the subscript of the first occurrence of the second argument in the array, or NULL if it's not present. /// If the third argument is given, the search begins at that subscript. This function omits the third argument. - /// See [array_position_with_subscript]. + /// See [array_position_with_subscript](array_position_with_subscript()). /// /// The array must be one-dimensional. Comparisons are done using IS NOT DISTINCT FROM semantics, /// so it is possible to search for NULL. @@ -2107,7 +2107,7 @@ extern "SQL" { /// Builds a JSON object out of a text array. The array must have an even number of members, /// in which case they are taken as alternating key/value pairs. This function also has a form that /// that takes keys and values as separate text array arguments. - /// See [jsonb_object_with_keys_and_values] + /// See [jsonb_object_with_keys_and_values](jsonb_object_with_keys_and_values()) /// /// # Example /// diff --git a/diesel/src/pg/expression/helper_types.rs b/diesel/src/pg/expression/helper_types.rs index afdd6b8d9ae8..b8fd3993fdac 100644 --- a/diesel/src/pg/expression/helper_types.rs +++ b/diesel/src/pg/expression/helper_types.rs @@ -130,48 +130,48 @@ pub type IntersectionRange = Intersection; #[cfg(feature = "postgres_backend")] pub type NullsFirst = super::operators::NullsFirst; -/// The return type of [`expr.is_json()`](super::expression_methods::PgExpressionMethods::is_json) +/// The return type of [`expr.is_json()`](super::expression_methods::PgTextExpressionMethods::is_json()) #[cfg(feature = "postgres_backend")] pub type IsJson = super::operators::IsJson; -/// The return type of [`expr.is_not_json()`](super::expression_methods::PgExpressionMethods::is_not_json) +/// The return type of [`expr.is_not_json()`](super::expression_methods::PgTextExpressionMethods::is_not_json()) #[cfg(feature = "postgres_backend")] pub type IsNotJson = super::operators::IsNotJson; -/// The return type of [`expr.is_json_object()`](super::expression_methods::PgExpressionMethods::is_json_object) +/// The return type of [`expr.is_json_object()`](super::expression_methods::PgTextExpressionMethods::is_json_object()) #[cfg(feature = "postgres_backend")] pub type IsJsonObject = super::operators::IsJsonObject; -/// The return type of [`expr.is_not_json_object()`](super::expression_methods::PgExpressionMethods::is_not_json_object) +/// The return type of [`expr.is_not_json_object()`](super::expression_methods::PgTextExpressionMethods::is_not_json_object()) #[cfg(feature = "postgres_backend")] pub type IsNotJsonObject = super::operators::IsNotJsonObject; -/// The return type of [`expr.is_json_array()`](super::expression_methods::PgExpressionMethods::is_json_array) +/// The return type of [`expr.is_json_array()`](super::expression_methods::PgTextExpressionMethods::is_json_array()) #[cfg(feature = "postgres_backend")] pub type IsJsonArray = super::operators::IsJsonArray; -/// The return type of [`expr.is_not_json_array()`](super::expression_methods::PgExpressionMethods::is_not_json_array) +/// The return type of [`expr.is_not_json_array()`](super::expression_methods::PgTextExpressionMethods::is_not_json_array()) #[cfg(feature = "postgres_backend")] pub type IsNotJsonArray = super::operators::IsNotJsonArray; -/// The return type of [`expr.is_json_scalar()`](super::expression_methods::PgExpressionMethods::is_json_scalar) +/// The return type of [`expr.is_json_scalar()`](super::expression_methods::PgTextExpressionMethods::is_json_scalar()) #[cfg(feature = "postgres_backend")] pub type IsJsonScalar = super::operators::IsJsonScalar; -/// The return type of [`expr.is_not_json_scalar()`](super::expression_methods::PgExpressionMethods::is_not_json_scalar) +/// The return type of [`expr.is_not_json_scalar()`](super::expression_methods::PgTextExpressionMethods::is_not_json_scalar()) #[cfg(feature = "postgres_backend")] pub type IsNotJsonScalar = super::operators::IsNotJsonScalar; -/// The return type of [`expr.nulls_last()`](super::expression_methods::PgSortExpressionMethods::nulls_last) +/// The return type of [`expr.nulls_last()`](super::expression_methods::PgSortExpressionMethods::nulls_last()) #[cfg(feature = "postgres_backend")] pub type NullsLast = super::operators::NullsLast; -/// The return type of [`expr.at_time_zone(tz)`](super::expression_methods::PgTimestampExpressionMethods::at_time_zone) +/// The return type of [`expr.at_time_zone(tz)`](super::expression_methods::PgTimestampExpressionMethods::at_time_zone()) #[cfg(feature = "postgres_backend")] pub type AtTimeZone = Grouped>>; -/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgNetExpressionMethods::contains) +/// The return type of [`lhs.contains(rhs)`](super::expression_methods::PgNetExpressionMethods::contains()) /// for network types #[cfg(feature = "postgres_backend")] pub type ContainsNet = Grouped>>; @@ -340,7 +340,7 @@ pub type NotLikeBinary = crate::dsl::NotLike; #[deprecated(note = "Use `dsl::Concat` instead")] pub type ConcatArray = crate::dsl::Concat; -/// Return type of [`array_to_string_with_null_string(arr, delim, null_str)`](super::functions::array_to_string_with_null_string) +/// Return type of [`array_to_string_with_null_string(arr, delim, null_str)`](super::functions::array_to_string_with_null_string()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array_to_string_with_null_string = @@ -351,7 +351,7 @@ pub type array_to_string_with_null_string = N, // The null string >; -/// Return type of [`array_to_string(arr, delim)`](super::functions::array_to_string) +/// Return type of [`array_to_string(arr, delim)`](super::functions::array_to_string()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array_to_string = super::functions::array_to_string< @@ -472,18 +472,18 @@ pub type array_lower = super::functions::array_lower, A, D>; #[cfg(feature = "postgres_backend")] pub type array_upper = super::functions::array_upper, A, D>; -/// Return type of [`array_position(array,element)`](super::functions::array_position) +/// Return type of [`array_position(array, element)`](super::functions::array_position()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array_position = super::functions::array_position, SqlTypeOf, A, E>; -/// Return type of [`array_position_with_subscript(array,element,subscript)`](super::functions::array_position_with_subscript) +/// Return type of [`array_position_with_subscript(array,element, subscript)`](super::functions::array_position_with_subscript()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array_position_with_subscript = super::functions::array_position_with_subscript, SqlTypeOf, A, E, S>; -/// Return type of [`array_positions(array,element)`](super::functions::array_positions) +/// Return type of [`array_positions(array, element)`](super::functions::array_positions()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array_positions = @@ -499,7 +499,7 @@ pub type array_ndims = super::functions::array_ndims, A>; #[cfg(feature = "postgres_backend")] pub type array_shuffle = super::functions::array_shuffle, A>; -/// Return type of [`array_sample(array,n)`](super::function::array_sample()) +/// Return type of [`array_sample(array,n)`](super::functions::array_sample()) #[allow(non_camel_case_types)] #[cfg(feature = "postgres_backend")] pub type array_sample = super::functions::array_sample, A, N>; diff --git a/diesel/src/sqlite/connection/sqlite_value.rs b/diesel/src/sqlite/connection/sqlite_value.rs index ec304797a026..c01a1bf47742 100644 --- a/diesel/src/sqlite/connection/sqlite_value.rs +++ b/diesel/src/sqlite/connection/sqlite_value.rs @@ -112,7 +112,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> { /// If the underlying value is not a string sqlite will convert it /// into a string and return that value instead. /// - /// Use the [`value_type()`] function to determine the actual + /// Use the [`value_type()`](Self::value_type()) function to determine the actual /// type of the value. /// /// See for details @@ -125,7 +125,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> { /// If the underlying value is not a blob sqlite will convert it /// into a blob and return that value instead. /// - /// Use the [`value_type()`] function to determine the actual + /// Use the [`value_type()`](Self::value_type()) function to determine the actual /// type of the value. /// /// See for details @@ -152,7 +152,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> { /// If the underlying value is not an integer sqlite will convert it /// into an integer and return that value instead. /// - /// Use the [`value_type()`] function to determine the actual + /// Use the [`value_type()`](Self::value_type()) function to determine the actual /// type of the value. /// /// See for details @@ -165,7 +165,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> { /// If the underlying value is not a string sqlite will convert it /// into a string and return that value instead. /// - /// Use the [`value_type()`] function to determine the actual + /// Use the [`value_type()`](Self::value_type()) function to determine the actual /// type of the value. /// /// See for details @@ -178,7 +178,7 @@ impl<'row, 'stmt, 'query> SqliteValue<'row, 'stmt, 'query> { /// If the underlying value is not a string sqlite will convert it /// into a string and return that value instead. /// - /// Use the [`value_type()`] function to determine the actual + /// Use the [`value_type()`](Self::value_type()) function to determine the actual /// type of the value. /// /// See for details