diff options
| author | bors <bors@rust-lang.org> | 2018-05-03 20:45:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-05-03 20:45:54 +0000 |
| commit | e82261dfbb5feaa2d28d2b138f4aabb2aa52c94b (patch) | |
| tree | 3bade0f4dfbda64eac4eed19227ac3f46acdf373 /src/test/compile-fail | |
| parent | d68b0eceaaf719a4702ab13a7ca62dea5d966082 (diff) | |
| parent | 03a0402dbf3143ab6a8b7166f4d1f74aa68f71df (diff) | |
| download | rust-e82261dfbb5feaa2d28d2b138f4aabb2aa52c94b.tar.gz rust-e82261dfbb5feaa2d28d2b138f4aabb2aa52c94b.zip | |
Auto merge of #50413 - kennytm:rollup, r=kennytm
Rollup of 12 pull requests Successful merges: - #50302 (Add query search order check) - #50320 (Fix invalid path generation in rustdoc search) - #50349 (Rename "show type declaration" to "show declaration") - #50360 (Clarify wordings of the `unstable_name_collision` lint.) - #50365 (Use two vectors in nearest_common_ancestor.) - #50393 (Allow unaligned reads in constants) - #50401 (Revert "Implement FromStr for PathBuf") - #50406 (Forbid constructing empty identifiers from concat_idents) - #50407 (Always inline simple BytePos and CharPos methods.) - #50416 (check if the token is a lifetime before parsing) - #50417 (Update Cargo) - #50421 (Fix ICE when using a..=b in a closure.) Failed merges:
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/macro-non-lifetime.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/compile-fail/macro-non-lifetime.rs b/src/test/compile-fail/macro-non-lifetime.rs new file mode 100644 index 00000000000..a2706e83229 --- /dev/null +++ b/src/test/compile-fail/macro-non-lifetime.rs @@ -0,0 +1,20 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Test for issue #50381: non-lifetime passed to :lifetime. + +#![feature(macro_lifetime_matcher)] + +macro_rules! m { ($x:lifetime) => { } } + +fn main() { + m!(a); + //~^ ERROR expected a lifetime, found `a` +} |
