Skip to content
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

Incomplete Type Hover Information with Macro-Generated Types and Documentation #15930

Closed
FuuuOverclocking opened this issue Nov 19, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@FuuuOverclocking
Copy link

rust-analyzer version: 0.3.1730-standalone

rustc version: 1.73.0 (cc66ad468 2023-10-03)

The latter half of the type documentation disappears when hovering over types that are generated through macros.

To reproduce the bug, cargo new and

image

Its source: (~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs)

macro_rules! uint_impl {
    (
        // ...
    ) => {
        // ...

        /// Returns the number of trailing ones in the binary representation
        /// of `self`.
        ///
        /// # Examples
        ///
        /// Basic usage:
        ///
        /// ```
        #[doc = concat!("let n = 0b1010111", stringify!($SelfT), ";")]
        ///
        /// assert_eq!(n.trailing_ones(), 3);
        /// ```
        #[stable(feature = "leading_trailing_ones", since = "1.46.0")]
        #[rustc_const_stable(feature = "leading_trailing_ones", since = "1.46.0")]
        #[must_use = "this returns the result of the operation, \
                      without modifying the original"]
        #[inline(always)]
        pub const fn trailing_ones(self) -> u32 {
            (!self).trailing_zeros()
        }
}
@FuuuOverclocking FuuuOverclocking added the C-bug Category: bug label Nov 19, 2023
@lnicola
Copy link
Member

lnicola commented Nov 19, 2023

Duplicate of #8092.

@lnicola lnicola closed this as completed Nov 19, 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