]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/str/str-idx.rs
3 let _
: u8 = s
[4]; //~ ERROR the type `str` cannot be indexed by `{integer}`
4 let _
= s
.get(4); //~ ERROR the type `str` cannot be indexed by `{integer}`
5 let _
= s
.get_unchecked(4); //~ ERROR the type `str` cannot be indexed by `{integer}`
6 let _
: u8 = s
['c'
]; //~ ERROR the type `str` cannot be indexed by `char`