about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-06-16 20:33:55 +0000
committerbors <bors@rust-lang.org>2019-06-16 20:33:55 +0000
commit4edff843dd219cf19a5fede6c78c7ce95402e1f5 (patch)
tree8b249bd7f2e9c9743684019f07ab792a7846afa5 /src/test/ui/thinlto
parent799cf3f603b5809a68853efcd779671cb8e046c4 (diff)
parente62c9d7917052db098c6f27314f4daa5b9513387 (diff)
downloadrust-4edff843dd219cf19a5fede6c78c7ce95402e1f5.tar.gz
rust-4edff843dd219cf19a5fede6c78c7ce95402e1f5.zip
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](https://github.com/rust-lang-nursery/wg-grammar/blob/9d1984d7ae8d6576f943566539a31a5800644c57/grammar/item.lyg#L3-L42), as written in [the *`.lyg`* notation](https://github.com/rust-lang/gll/tree/263bf161dad903e67aa65fc591ced3cab18afa2a#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
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions