rust-lang / rust-lang/rust

Don't show two different types as the same thing in a single function

Open
#122,673 10 comments 4 reactions 1 assignee View on GitHub

@krtab is already working on this.

Since Mar 18, 2024.

A-rustdoc-ui C-enhancement T-rustdoc
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I noticed this in https://doc.rust-lang.org/nightly/nightly-rustc/rustc_codegen_ssa/traits/consts/trait.ConstMethods.html#tymethod.scalar_to_backend today:

image

Those two Scalars are actually different types, however.

It would be nice to detect things like this and show some distinguisher. Maybe value::Scalar and rustc_abi::Scalar -- including enough module context to distinguish -- or something? Or maybe show the crate name?

(Crate name might be good, since a single crate can fix multiple types with the same name, if needed.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.