bors
4edff843dd
Auto merge of #61347 - Centril:stabilize-underscore_const_names, r=petrochenkov
Stabilize underscore_const_names in 1.37.0
You are now permitted to write:
```rust
const _: $type_expression = $term_expression;
```
That is, we change the [grammar of items](9d1984d7ae/grammar/item.lyg (L3-L42)
), as written in [the *`.lyg`* notation](263bf161da (grammar)
), from:
```java
Item = attrs:OuterAttr* vis:Vis? kind:ItemKind;
ItemKind =
| ...
| Const:{ "const" name:IDENT ":" ty:Type "=" value:Expr ";" }
| ...
;
```
into:
```java
Item = attrs:OuterAttr* vis:Vis? kind:ItemKind;
ItemKind =
| ...
| Const:{ "const" name:IdentOrUnderscore ":" ty:Type "=" value:Expr ";" }
| ...
;
IdentOrUnderscore =
| Named:IDENT
| NoName:"_"
;
```
r? @petrochenkov
2019-06-16 20:33:55 +00:00
..
2019-04-09 11:48:31 +01:00
2019-02-10 23:42:32 +00:00
2019-06-16 14:17:01 +03:00
2019-02-09 01:36:22 +09:00
2019-06-16 14:17:01 +03:00
2019-02-10 23:42:32 +00:00
2019-06-10 14:46:40 -07:00
2019-03-10 04:49:45 +01:00
2019-06-01 19:17:22 +03:00
2018-12-25 21:08:33 -07:00
2019-02-09 01:36:22 +09:00
2019-05-13 11:09:06 +02:00
2019-06-01 19:17:22 +03:00
2019-05-25 02:53:08 +02:00
2018-12-25 21:08:33 -07:00
2019-04-09 07:44:10 +02:00
2019-03-10 04:49:45 +01:00
2019-06-10 06:17:39 +02:00
2019-02-09 01:36:22 +09:00
2019-02-10 23:42:32 +00:00
2018-12-25 21:08:33 -07:00
2019-06-16 14:17:01 +03:00
2019-06-10 14:46:40 -07:00
2019-02-10 23:42:32 +00:00
2019-03-06 04:47:08 +01:00
2019-06-09 07:58:40 -03:00
2019-02-09 01:36:22 +09:00
2019-02-10 23:42:32 +00:00
2019-02-09 01:36:22 +09:00
2019-02-10 23:42:32 +00:00