about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-11-28 12:06:07 +0100
committerGitHub <noreply@github.com>2024-11-28 12:06:07 +0100
commit7201f70c3749c1cfabfa1280d3ce877e1dc7b0ee (patch)
tree9bcd458714b19ee2a126d2673e0ace971955a2c8
parentca71c8fe5e12704bd2f58081375a9c9d27bd8399 (diff)
parentca55eeeaf36b059dad6d2a170a37d1544682168d (diff)
downloadrust-7201f70c3749c1cfabfa1280d3ce877e1dc7b0ee.tar.gz
rust-7201f70c3749c1cfabfa1280d3ce877e1dc7b0ee.zip
Rollup merge of #133557 - Monadic-Cat:small_doc_fixes, r=bjorn3
Small doc fixes in `rustc_codegen_ssa`

I'm trying to make a toy codegen backend for `rustc`, and I got confused for a few minutes about what `codegen_backend` was referring to in the `CodegenBackend::join_codegen` docs.

Experimentally, it looks like the result of `CodegenBackend::codegen_crate` is passed to `CodegenBackend::join_codegen`, so this updates the docs to refer to that. This time using intra-doc links to hopefully cause people to notice if that gets out of date again.

Also, added another intra-doc link nearby, on `CodegenBackend::link`, for the same reason.
-rw-r--r--compiler/rustc_codegen_ssa/src/traits/backend.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs
index cbf214763b4..7eab889edf0 100644
--- a/compiler/rustc_codegen_ssa/src/traits/backend.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs
@@ -71,11 +71,11 @@ pub trait CodegenBackend {
         need_metadata_module: bool,
     ) -> Box<dyn Any>;
 
-    /// This is called on the returned `Box<dyn Any>` from `codegen_backend`
+    /// This is called on the returned `Box<dyn Any>` from [`codegen_crate`](Self::codegen_crate)
     ///
     /// # Panics
     ///
-    /// Panics when the passed `Box<dyn Any>` was not returned by `codegen_backend`.
+    /// Panics when the passed `Box<dyn Any>` was not returned by [`codegen_crate`](Self::codegen_crate).
     fn join_codegen(
         &self,
         ongoing_codegen: Box<dyn Any>,
@@ -83,7 +83,7 @@ pub trait CodegenBackend {
         outputs: &OutputFilenames,
     ) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>);
 
-    /// This is called on the returned `CodegenResults` from `join_codegen`
+    /// This is called on the returned [`CodegenResults`] from [`join_codegen`](Self::join_codegen).
     fn link(
         &self,
         sess: &Session,