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