5
जब टुपल्स की एक सरणी पर पुनरावृत्त होता है, तो जंग जंगलों को क्यों नष्ट नहीं करता है? उदाहरण के लिए:tuples की सरणी पर पुनरावृत्ति करते समय tuples क्यों संरचित नहीं होते हैं?
let x: &[(usize, usize)] = &[...];
for (a,b) in x.iter() {
...
}
त्रुटि की ओर जाता है:
error: type mismatch resolving `<core::slice::Iter<'_, (usize, usize)> as core::iter::Iterator>::Item == (_, _)`:
expected &-ptr,
found tuple [E0271]