about summary refs log tree commit diff
path: root/tests/rustdoc/source-code-pages/src-mod-path-absolute-26995.rs
diff options
context:
space:
mode:
authordswij <dharmasw@outlook.com>2025-04-27 03:13:19 +0000
committerGitHub <noreply@github.com>2025-04-27 03:13:19 +0000
commit39a408664b383865a56a0a76bbef6e36654edf7d (patch)
treeeb11f21911fdeee5fd8007587afb54f7aa78fd0d /tests/rustdoc/source-code-pages/src-mod-path-absolute-26995.rs
parent58cfdb72a84e941d54f0d1d8a9252f3d2296ac40 (diff)
parentfc12b5b6d8f5ed80ba07e2a43b3a08b07d8482d3 (diff)
downloadrust-39a408664b383865a56a0a76bbef6e36654edf7d.tar.gz
rust-39a408664b383865a56a0a76bbef6e36654edf7d.zip
`manual_div_ceil`: fix suggestions when macro is involved (#14666)
here is my small fix

changelog: fix suggestion span to avoid showing macro name in
`.div_ceil()` suggestion

i changed this line
`let divisor_snippet = snippet_with_applicability(cx,
rhs.spansource_callsite(), "..", applicability);`
to this line
`let divisor_snippet = snippet_with_applicability(cx, rhs.span, "..",
applicability);`
to fix problem where this warning in macro expands like this
```rust
4  |         let _ = (x + 7) / 8;
   |                 ^^^^^^^^^^^ help: consider using `.div_ceil()`: `x.div_ceil(y!())`
```
[play it
yourself](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=397aa8cd2ffffb24a286fbddbc75446c)

as you can see here it looks like `x.div_ceil(y!())` and contains macro
signature
so i fixed this problem, i will look closely if there any more problems
like this and fix them in order

**Related issue**

fixes
[rust-lang/rust-clippy#14665](https://github.com/rust-lang/rust-clippy/issues/14665)
Diffstat (limited to 'tests/rustdoc/source-code-pages/src-mod-path-absolute-26995.rs')
0 files changed, 0 insertions, 0 deletions