2024-06-05 14:54:22 -05:00
|
|
|
// Don't const eval fields with ambiguous layout.
|
|
|
|
// See issues #125842 and #124464.
|
|
|
|
|
2024-05-05 16:41:08 -05:00
|
|
|
enum TestOption<T> {
|
|
|
|
TestSome(T),
|
|
|
|
TestSome(T),
|
2024-06-05 14:54:22 -05:00
|
|
|
//~^ ERROR the name `TestSome` is defined multiple times
|
2024-05-05 16:41:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct Request {
|
|
|
|
bar: TestOption<u64>,
|
|
|
|
bar: u8,
|
2024-06-05 14:54:22 -05:00
|
|
|
//~^ ERROR field `bar` is already declared
|
2024-05-05 16:41:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn default_instance() -> &'static Request {
|
|
|
|
static instance: Request = Request { bar: 17 };
|
|
|
|
&instance
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {}
|