You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnmain(){let a = None;println!("{:?}", std::any::type_name_of_val(&a));
a = Some([todo!()]);}
Rust prints "core::option::Option<[(); 1]>" on edition 2021, and "core::option::Option<[!; 1]>" on edition 2024.
This happens because they decide to no longer decay ! to (), see rust-lang/rust#123748
When we were implementing ! we decided to follow Rust, and we now need to decide if we follow edition 2024 or not. I vote to follow it in the future, so we keep differences to Rust only where we think makes a difference.
The text was updated successfully, but these errors were encountered:
Take the following rust program as an example:
Rust prints
"core::option::Option<[(); 1]>"
on edition 2021, and"core::option::Option<[!; 1]>"
on edition 2024.This happens because they decide to no longer decay
!
to()
, see rust-lang/rust#123748When we were implementing
!
we decided to follow Rust, and we now need to decide if we follow edition 2024 or not. I vote to follow it in the future, so we keep differences to Rust only where we think makes a difference.The text was updated successfully, but these errors were encountered: