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

Renaming insinde the offset_of! macro is not working #18891

Open
Tracked by #18812
Veykril opened this issue Jan 9, 2025 · 0 comments
Open
Tracked by #18812

Renaming insinde the offset_of! macro is not working #18891

Veykril opened this issue Jan 9, 2025 · 0 comments
Labels
A-ide general IDE features C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Jan 9, 2025

pub struct Offset {
    // renaming inner here won't rename inner in the offset_of! macro
    inner: Inner,
}

pub struct Inner {
    // renaming `a` here won't rename `a` in the offset_of! macro
    a: u8,
}

#[test]
fn rename_offset_of() {
    // Trying to rename inner or `a` from here results in a "No reference found at position"
    std::mem::offset_of!(Offset, inner.a);
}
@Veykril Veykril mentioned this issue Jan 9, 2025
5 tasks
@Veykril Veykril added C-bug Category: bug A-ide general IDE features labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant