]> git.lizzy.rs Git - rust.git/commit
Implement `..` syntax for RangeFull as expression
authorUlrik Sverdrup <root@localhost>
Wed, 4 Feb 2015 22:23:12 +0000 (23:23 +0100)
committerUlrik Sverdrup <root@localhost>
Wed, 4 Feb 2015 22:23:12 +0000 (23:23 +0100)
commit75239142a8271895775d69ef50037b0162cdcd6e
treeb41d240b3a91749bda5f1846e36c6b36dd397acb
parent3b2ed14906fd9f9daa27cc7d1dad263d2f5ff450
Implement `..` syntax for RangeFull as expression

Allows the expression `..` (without either endpoint) in general, can be
used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`.

The old syntax &expr[] is not yet removed or warned for.
src/libsyntax/parse/parser.rs
src/test/compile-fail/slice-1.rs
src/test/compile-fail/slice-2.rs
src/test/run-pass/range.rs
src/test/run-pass/ranges-precedence.rs
src/test/run-pass/slice-2.rs