Skip to content

Commit

Permalink
Unrolled build for rust-lang#133557
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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.
  • Loading branch information
rust-timer authored Nov 28, 2024
2 parents c1cfab2 + ca55eee commit 97a9b81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_codegen_ssa/src/traits/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ 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>,
sess: &Session,
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,
Expand Down

0 comments on commit 97a9b81

Please sign in to comment.