rust-diplomat / diplomat

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code
https://rust-diplomat.github.io/book/
Other
499 stars 47 forks source link

HIR's `Slice` should be `SliceRef` or `BorrowedSlice` #293

Open robertbastian opened 1 year ago

robertbastian commented 1 year ago

"Slice" is the unsized datatype [T], which we don't support.

In the future we want an OwnedSlice (a.k.a. Box<[T]>), so we should be clear about what type of slice this is.

Manishearth commented 1 year ago

IME in usual parlance "slice" refers to the reference types, with "unsized slice" and "box slice" being used for the others. The unsized datatype is technically called slice but it's rather rare so nobody really does.

That said I'm fine with SliceRef.