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
Index lang items are required before we can implement slices support properly.
[lang = "index"]traitIndex<Idx>{typeOutput;fnindex(&self,index:Idx) -> &Self::Output;}structFoo(i32,i32);implIndex<isize>forFoo{typeOutput = i32;fnindex(&self,index:isize) -> &i32{if index == 0{&self.0}else{&self.1}}}fnmain() -> i32{let a = Foo(1,2);let b = a[0];let c = a[1];
c - b - 1}
The text was updated successfully, but these errors were encountered:
974: Add support for ranges and index lang items along with the TyTy::SliceType r=philberty a=philberty
This PR contains more code to begin supporting Slices which requires support
for more intrinsic, range and index lang items. More work is needed to support
slices such as the const_ptr lang item and the offset intrinsic but this is a big
PR already and adds support for more lang items along the way.
Fixes#975
Addresses #849
Co-authored-by: Philip Herron <[email protected]>
Index lang items are required before we can implement slices support properly.
The text was updated successfully, but these errors were encountered: