From d280b8ca14edea616af39f0f0642f1aeb6714243 Mon Sep 17 00:00:00 2001
From: Miguel Ojeda <ojeda@kernel.org>
Date: Mon, 29 Jul 2024 00:51:33 +0200
Subject: [PATCH 1/2] CI: rfl: build the generated doctests

We were already generating the doctests, which should already catch most
issues with our hack around `--test-builder` and `--no-run`.

However, we were not building the result of that transformation, thus
build it for completeness and to ensure the hack may not have produced
something completely broken.

In the worst case, we can revert it.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 src/ci/docker/scripts/rfl-build.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh
index 3acc09e0b9b1a..4e3079b35cac6 100755
--- a/src/ci/docker/scripts/rfl-build.sh
+++ b/src/ci/docker/scripts/rfl-build.sh
@@ -65,4 +65,5 @@ make -C linux LLVM=1 -j$(($(nproc) + 1)) \
 make -C linux LLVM=1 -j$(($(nproc) + 1)) \
     samples/rust/rust_minimal.o \
     samples/rust/rust_print.o \
-    drivers/net/phy/ax88796b_rust.o
+    drivers/net/phy/ax88796b_rust.o \
+    rust/doctests_kernel_generated.o

From 77cc18fd79073beada6dcd1e392be7996683503d Mon Sep 17 00:00:00 2001
From: Miguel Ojeda <ojeda@kernel.org>
Date: Mon, 29 Jul 2024 23:03:26 +0200
Subject: [PATCH 2/2] CI: rfl: build the documentation

Since the `rfl` CI job has not had almost any issue for some weeks,
it is a good time to try to increase a bit the scope of what it tests.

The kernel does not use any particular `rustdoc` unstable issue (apart
from the doctests ones) so far, so in principle it should not introduce
extra issues here, and may be a good extra test case for Rust.

In addition, it may help to test new unstable features in the future.

In the worst case, we can revert it.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 src/ci/docker/scripts/rfl-build.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh
index 4e3079b35cac6..d690aac27fae6 100755
--- a/src/ci/docker/scripts/rfl-build.sh
+++ b/src/ci/docker/scripts/rfl-build.sh
@@ -67,3 +67,6 @@ make -C linux LLVM=1 -j$(($(nproc) + 1)) \
     samples/rust/rust_print.o \
     drivers/net/phy/ax88796b_rust.o \
     rust/doctests_kernel_generated.o
+
+make -C linux LLVM=1 -j$(($(nproc) + 1)) \
+    rustdoc