Skip to content

rustc_layout_scalar_valid_range_end does not affect niches #15687

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
Veykril opened this issue Sep 29, 2023 · 1 comment · Fixed by #15688
Closed

rustc_layout_scalar_valid_range_end does not affect niches #15687

Veykril opened this issue Sep 29, 2023 · 1 comment · Fixed by #15688
Assignees
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Sep 29, 2023

Works properly has a niche of 1, while DoesNotWork has no niches even though it should

#[rustc_layout_scalar_valid_range_start(1)]
pub struct Works {
  private: u32,
}
#[rustc_layout_scalar_valid_range_end(0xFFFF_FF00)]
pub struct DoesNotWork {
  private: u32,
}
@Veykril Veykril added A-ty type system / type inference / traits / method resolution C-bug Category: bug labels Sep 29, 2023
@Veykril Veykril self-assigned this Sep 29, 2023
@Veykril
Copy link
Member Author

Veykril commented Sep 29, 2023

ah the problem is the hex number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug
Projects
None yet
1 participant