about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-01-14 19:25:05 +0100
committerGitHub <noreply@github.com>2025-01-14 19:25:05 +0100
commitca9a9d2f3553676e642bc570ec58332acf0f0f71 (patch)
tree28f78e1d893ac7faf0d6ad6f1761cd4192ade2e7 /compiler/rustc_codegen_llvm/src
parentaeadee0642137014a76ae0d60eae3f8e464e3c2e (diff)
parent2c4aee92fa65e74f23ad7853937db8d2c4bfa6c8 (diff)
downloadrust-ca9a9d2f3553676e642bc570ec58332acf0f0f71.tar.gz
rust-ca9a9d2f3553676e642bc570ec58332acf0f0f71.zip
Rollup merge of #134880 - as1100k-forks:fix-rustdoc-json-path-name, r=aDotInTheVoid
Made `Path::name` only have item name rather than full name

Closes #134853

This PR makes `Path::name` to only have item name rather than full name, i.e. with the following code

```rust
pub mod foo {
    pub struct Bar;
}

pub fn get_bar() -> foo::Bar {
    foo::Bar
}
```
and running `./rustdoc ./demo.rs -wjson -Zunstable-options` gives:
```json
{
    "41": {
        "id": 41,
        "name": "get_bar",
        "inner": {
            "function": {
                "sig": {
                    "inputs": [],
                    "output": {
                        "resolved_path": {
                            "name": "Bar",
                            "id": 0,
                            "args": { "angle_bracketed": { "args": [], "constraints": [] }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
_Information which isn't useful here was trimmed_

r? aDotInTheVoid
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions