summary refs log tree commit diff
path: root/src/test/ui/parser/attr-stmt-expr-attr-bad.rs
AgeCommit message (Collapse)AuthorLines
2020-03-10parse_if_expr: recover on attributesMazdak Farrokhzad-8/+8
2020-03-04Permit attributes on 'if' expressionsAaron Hill-8/+2
Previously, attributes on 'if' expressions (e.g. #[attr] if true {}) were disallowed during parsing. This made it impossible for macros to perform any custom handling of such attributes (e.g. stripping them away), since a compilation error would be emitted before they ever had a chance to run. This PR permits attributes on 'if' expressions ('if-attrs' from here on). Both built-in attributes (e.g. `#[allow]`, `#[cfg]`) are supported. We still do *not* accept attributes on 'other parts' of an if-else chain. That is, the following code snippet still fails to parse: ```rust if true {} #[attr] else if false {} else #[attr] if false {} #[attr] else {} ```
2020-01-10Introduce `#![feature(half_open_range_patterns)]`.Mazdak Farrokhzad-3/+5
This feature adds `X..`, `..X`, and `..=X` patterns.
2019-12-31de-fatalize some errorsMazdak Farrokhzad-0/+1
2019-12-23extract error_unexpected_after_dot and de-fatalizeMazdak Farrokhzad-0/+7
2019-12-20ast_stmt_expr_attr -> pretty & ui testsMazdak Farrokhzad-0/+107