Usually when you create an instance of a struct you have to list the field names, like this:
let apples = 2.0;
let bananas = 3.0;
let f = Food { apples: 2.0, bananas: 3.0 };
// or
let f = Food { apples: apples, bananas: bananas }
In case you use a variable for initializing a field and that variable has the same name as the field you want to initialize, you can omit the field's name:
let f = Food { apples, bananas }
// or
let f = Food { bananas, apples }
// or, for example
let f = Food { bananas: bananas, apples }
But literal values don't have a name of course, so you need to manually specify which struct field to assign it to.
It's almostnever a compiler bug. Read: especially when you are learning the language, you cannot reasonably expect to find a real, honest compiler bug. It's overwhelmingly more likely that your understaning or expectations of the language are flawed.
Of course, this is by design. Rust's struct fields are named, and field names carry semantics to a human reader. The compiler doesn't blindly initialize fields in declaration order because then accidentally interchanging two fields of the same type would be silently accepted and do the wrong thing. Rust's philosophy is all about correctness, and not being able to accidentally misuse the code.