Skip to content

Commit 095cb1b

Browse files
authored
Fix rustdoc warnings, check docs in CI (#1018)
Just something that I noticed when contributing to the docs sometime in the past
1 parent 3946d37 commit 095cb1b

File tree

8 files changed

+23
-10
lines changed

8 files changed

+23
-10
lines changed

.github/workflows/rust.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,19 @@ env:
2727
RUSTC_WRAPPER: "sccache"
2828
RUSTFLAGS: "-C debuginfo=0"
2929
CARGO_INCREMENTAL: 0
30+
RUSTDOCFLAGS: --cfg doc_cfg -D warnings
3031

3132
jobs:
33+
rustdoc:
34+
Name: Rustdoc
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: dtolnay/rust-toolchain@nightly
39+
with:
40+
components: rustdoc
41+
- run: cargo +nightly doc --workspace --no-deps --all-features --document-private-items
42+
3243
rustfmt:
3344
name: Rustfmt
3445
runs-on: ubuntu-latest

src/backend/query_builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ pub trait QueryBuilder:
535535
}
536536
}
537537

538-
/// Translate [`IndexHint`] into SQL statement.
538+
/// Translate [`IndexHint`][crate::extension::mysql::IndexHint] into SQL statement.
539539
fn prepare_index_hints(
540540
&self,
541541
_table_ref: &TableRef,
@@ -544,7 +544,7 @@ pub trait QueryBuilder:
544544
) {
545545
}
546546

547-
/// Translate [`TableSample`] into SQL statement.
547+
/// Translate [`TableSample`][crate::extension::postgres::TableSample] into SQL statement.
548548
fn prepare_table_sample(&self, _select: &SelectStatement, _sql: &mut impl SqlWriter) {}
549549

550550
/// Translate [`LockType`] into SQL statement.

src/expr/trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::{Expr, func::*, query::*, types::*, value::*};
33
/// "Operator" methods for building expressions.
44
///
55
/// Before `sea_query` 0.32.0 (`sea_orm` 1.1.1),
6-
/// these methods were awailable only on [`Expr`]/[`SimpleExpr`]
6+
/// these methods were awailable only on [`Expr`]/[`SimpleExpr`][crate::SimpleExpr]
77
/// and you needed to manually construct these types first.
88
///
99
/// Now, you can call them directly on any expression type:

src/query/delete.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ impl DeleteStatement {
259259
clause.query(self)
260260
}
261261

262-
/// Create a Common Table Expression by specifying a [CommonTableExpression] or [WithClause] to execute this query with.
262+
/// Create a Common Table Expression by specifying a [CommonTableExpression][crate::CommonTableExpression]
263+
/// or [WithClause] to execute this query with.
263264
///
264265
/// # Examples
265266
///

src/query/insert.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,6 @@ impl InsertStatement {
454454
/// # Examples
455455
///
456456
/// - [`OnConflict::update_columns`]: Update column value of existing row with inserting value
457-
/// - [`OnConflict::update_values`]: Update column value of existing row with value
458-
/// - [`OnConflict::update_exprs`]: Update column value of existing row with expression
459457
pub fn on_conflict(&mut self, on_conflict: OnConflict) -> &mut Self {
460458
self.on_conflict = Some(on_conflict);
461459
self
@@ -606,7 +604,8 @@ impl InsertStatement {
606604
clause.query(self)
607605
}
608606

609-
/// Create a Common Table Expression by specifying a [CommonTableExpression] or [WithClause] to execute this query with.
607+
/// Create a Common Table Expression by specifying a [CommonTableExpression][crate::CommonTableExpression]
608+
/// or [WithClause] to execute this query with.
610609
///
611610
/// # Examples
612611
///

src/query/select.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2469,7 +2469,8 @@ impl SelectStatement {
24692469
clause.query(self)
24702470
}
24712471

2472-
/// Create a Common Table Expression by specifying a [CommonTableExpression] or [WithClause] to execute this query with.
2472+
/// Create a Common Table Expression by specifying a [CommonTableExpression][crate::CommonTableExpression]
2473+
/// or [WithClause] to execute this query with.
24732474
///
24742475
/// # Examples
24752476
///

src/query/update.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,8 @@ impl UpdateStatement {
397397
clause.query(self)
398398
}
399399

400-
/// Create a Common Table Expression by specifying a [CommonTableExpression] or [WithClause] to execute this query with.
400+
/// Create a Common Table Expression by specifying a [CommonTableExpression][crate::CommonTableExpression]
401+
/// or [WithClause] to execute this query with.
401402
///
402403
/// # Examples
403404
///

src/raw_sql/seaql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl Query {
1919
self
2020
}
2121

22-
/// Matches the signature of [`SqlWriterValues::into_parts`]
22+
/// Matches the signature of [`SqlWriterValues::into_parts`][crate::SqlWriterValues::into_parts]
2323
pub fn into_parts(self) -> (String, Values) {
2424
(self.sql, self.values)
2525
}

0 commit comments

Comments
 (0)