Skip to content

Missing Doc comments in hover support when backticks and doc are intermixed #14731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sanbox-irl opened this issue May 3, 2023 · 1 comment
Closed
Labels
C-bug Category: bug

Comments

@sanbox-irl
Copy link

This bug is on current RA on current VSC on macOS.

Here's how I triggered it:

5i32.rem_euclid

and then I hovered over rem_euclid and saw this at the bottom of the tooltip (there is valid input above this)

Screenshot 2023-05-03 at 4 47 19 PM

But it didn't make sense because where is a in that example? So I dug through the docs and found the original:

        /// # Examples
        ///
        /// Basic usage:
        ///
        /// ```
        #[doc = concat!("let a: ", stringify!($SelfT), " = 7; // or any other integer type")]
        /// let b = 4;
        ///
        /// assert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1
        /// assert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1
        /// assert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2
        /// assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2
        /// ```

I appears that doc concat is hurting the RA's ability to udnerstand. Of course, this macro is within:

impl i32 {
    int_impl! { i32, i32, u32, 32, 31, -2147483648, 2147483647, 8, "0x10000b3", "0xb301",
    "0x12345678", "0x78563412", "0x1e6a2c48", "[0x78, 0x56, 0x34, 0x12]",
    "[0x12, 0x34, 0x56, 0x78]", "", "", "" }
}

so the solution is a bit messy.

Good luck to whatever soul must figure this out

@sanbox-irl sanbox-irl added the C-bug Category: bug label May 3, 2023
@HKalbasi
Copy link
Member

HKalbasi commented May 3, 2023

The problem isn't mixing #[doc] and ///, as it works for me in a simpler example. The problem is the concat!, so I think we can close this as duplicate of #8092

@HKalbasi HKalbasi closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants