Repository: diesel-rs/diesel
File: diesel/src/pg/expression/helper_types.rs (Rust)

Code before:
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Concat` instead")]
pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;

/// 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<A, E, N> =
    super::functions::array_to_string_with_null_string<
        SqlTypeOf<A>, // The SQL type of the array
        SqlTypeOf<E>, // The SQL type of the delimiter
        SqlTypeOf<N>, // The SQL type of the null_string
        A,
        E,
        N,
    >;

/// 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<A, E> = super::functions::array_to_string<
    SqlTypeOf<A>, // The SQL type of the array
    SqlTypeOf<E>, // The SQL type of the elements within the array
    A,
    E,
>;

/// Return type of [`lower(range)`](super::functions::lower())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower<R> = super::functions::lower<SqlTypeOf<R>, R>;

/// Return type of [`upper(range)`](super::functions::upper())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper<R> = super::functions::upper<SqlTypeOf<R>, R>;

/// Return type of [`isempty(range)`](super::functions::isempty())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type isempty<R> = super::functions::isempty<SqlTypeOf<R>, R>;

/// Return type of [`lower_inc(range)`](super::functions::lower_inc())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower_inc<R> = super::functions::lower_inc<SqlTypeOf<R>, R>;

/// Return type of [`upper_inc(range)`](super::functions::upper_inc())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper_inc<R> = super::functions::upper_inc<SqlTypeOf<R>, R>;

Review comment (suggestion):
```suggestion
pub type array_to_string<A, D> = super::functions::array_to_string<
    SqlTypeOf<A>, // The SQL type of the array
    A,
    D,
>;
```

We don't need to have the `SqlTypeOf<D>` here as we don't need to be generic over that argument type. The `SqlTypeOf` part is only required for arguments that are generic.

(That also applies to the `array_to_string_with_null_string` type above)

Code after:
#[doc(hidden)]
#[deprecated(note = "Use `dsl::Concat` instead")]
pub type ConcatArray<Lhs, Rhs> = crate::dsl::Concat<Lhs, Rhs>;

/// 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<A, D, N> =
    super::functions::array_to_string_with_null_string<
        SqlTypeOf<A>, // The SQL type of the array
        A,            // The array itself
        D,            // The delimiter
        N,            // The null 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<A, D> = super::functions::array_to_string<
    SqlTypeOf<A>, // The SQL type of the array
    A,            // The array itself
    D,            // The delimiter
>;

/// Return type of [`lower(range)`](super::functions::lower())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower<R> = super::functions::lower<SqlTypeOf<R>, R>;

/// Return type of [`upper(range)`](super::functions::upper())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper<R> = super::functions::upper<SqlTypeOf<R>, R>;

/// Return type of [`isempty(range)`](super::functions::isempty())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type isempty<R> = super::functions::isempty<SqlTypeOf<R>, R>;

/// Return type of [`lower_inc(range)`](super::functions::lower_inc())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type lower_inc<R> = super::functions::lower_inc<SqlTypeOf<R>, R>;

/// Return type of [`upper_inc(range)`](super::functions::upper_inc())
#[allow(non_camel_case_types)]
#[cfg(feature = "postgres_backend")]
pub type upper_inc<R> = super::functions::upper_inc<SqlTypeOf<R>, R>;

/// Return type of [`lower_inf(range)`](super::functions::lower_inf())
#[allow(non_camel_case_types)]