about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-06-11 10:43:20 +0000
committerbors <bors@rust-lang.org>2018-06-11 10:43:20 +0000
commit13f8d073fe5c87638d9ebe849c5fdd80e87da95a (patch)
tree0d0471bcb122e2d35c2ad951a2555c6f08e3da20 /src/liballoc_system
parent18a00bd9855421a74f40a29fcb4dd2e0c8bea59f (diff)
parent987020846ce40ce479df3d62adc47ca4609a5317 (diff)
downloadrust-13f8d073fe5c87638d9ebe849c5fdd80e87da95a.tar.gz
rust-13f8d073fe5c87638d9ebe849c5fdd80e87da95a.zip
Auto merge of #51480 - dtolnay:lifetime, r=kennytm
Enable fall through past $:lifetime matcher

```rust
macro_rules! is_lifetime {
    ($lifetime:lifetime) => { true };
    ($other:tt) => { false };
}

fn main() {
    println!("{}", is_lifetime!('lifetime));
    println!("{}", is_lifetime!(@));
}
```

Before this fix, the `is_lifetime!` invocation would fail to compile with:

```
error: expected a lifetime, found `@`
 --> src/main.rs:8:33
  |
8 |     println!("{}", is_lifetime!(@));
  |                                 ^
```

Fixes #50903.
Fixes #51477.

r? @kennytm
Diffstat (limited to 'src/liballoc_system')
0 files changed, 0 insertions, 0 deletions