Skip to content

Unstable indexing permitted in beta channel #24791

Closed
@bluss

Description

@bluss

I just discovered you can slice the slice iterator. It's neat, but unstable. .as_slice() as well as the Index implementations for the slice::Iter are marked unstable, but you can still use the slicing syntax in the beta channel.

Compiles in rustc 1.0.0-beta.2 (e9080ec 2015-04-16) (built 2015-04-16)

println!("{:?}", &[1,2,3].iter()[..1]);

The effect is that converting iterators to slices isn't closed down like it was intended.

Metadata

Metadata

Assignees

Labels

P-highHigh priority

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions