1 An inclusive range was used with no end.
3 Erroneous code example:
7 let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
8 let x = &tmp[1..=]; // error: inclusive range was used with no end
12 An inclusive range needs an end in order to *include* it. If you just need a
13 start and no end, use a non-inclusive range (with `..`):
17 let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
18 let x = &tmp[1..]; // ok!
22 Or put an end to your inclusive range:
26 let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1];
27 let x = &tmp[1..=3]; // ok!