mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
bindgen std::convert::Infallible for empty tag unions
This commit is contained in:
parent
24df6ef93b
commit
c4a3428b34
1 changed files with 1 additions and 1 deletions
|
@ -1268,7 +1268,7 @@ fn add_struct<S: Display>(
|
||||||
fn type_name(id: TypeId, types: &Types) -> String {
|
fn type_name(id: TypeId, types: &Types) -> String {
|
||||||
match types.get_type(id) {
|
match types.get_type(id) {
|
||||||
RocType::Unit => "()".to_string(),
|
RocType::Unit => "()".to_string(),
|
||||||
RocType::EmptyTagUnion => "()".to_string(), // In the future, this can be `!` - https://doc.rust-lang.org/std/primitive.never.html
|
RocType::EmptyTagUnion => "std::convert::Infallible".to_string(),
|
||||||
RocType::RocStr => "roc_std::RocStr".to_string(),
|
RocType::RocStr => "roc_std::RocStr".to_string(),
|
||||||
RocType::Bool => "bool".to_string(),
|
RocType::Bool => "bool".to_string(),
|
||||||
RocType::Num(RocNum::U8) => "u8".to_string(),
|
RocType::Num(RocNum::U8) => "u8".to_string(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue