diff options
| author | bors <bors@rust-lang.org> | 2014-11-13 14:17:10 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-13 14:17:10 +0000 |
| commit | 37ea270accf97fc4eed21a7373c3e7e62de7bbeb (patch) | |
| tree | c74775edb02ad57cd1ec49bfa677f9fe9e8db5f0 /src/test | |
| parent | 82f383839c7cc0ce66d7cfbd400182b535029f0f (diff) | |
| parent | a3208246f1b7b6199121d80a9232139800459a44 (diff) | |
| download | rust-37ea270accf97fc4eed21a7373c3e7e62de7bbeb.tar.gz rust-37ea270accf97fc4eed21a7373c3e7e62de7bbeb.zip | |
auto merge of #18811 : pczarn/rust/issue-18763-ice, r=pnkfelix
Fix ICEs introduced in #17830 * fixed get_tt for doc comments * properly handle MatchNt in `quote` Fixes #18763 Fixes #18775
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs new file mode 100644 index 00000000000..23228d49995 --- /dev/null +++ b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs @@ -0,0 +1,31 @@ +// Copyright 2012-2014 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. + +// ignore-android +// ignore-pretty: does not work well with `--test` + +#![feature(quote)] + +extern crate syntax; + +use syntax::ext::base::ExtCtxt; + +fn syntax_extension(cx: &ExtCtxt) { + let _toks_1 = vec![quote_tokens!(cx, /** comment */ fn foo() {})]; + let name = quote_tokens!(cx, bar); + let _toks_2 = vec![quote_item!(cx, static $name:int = 2;)]; + let _toks_3 = vec![quote_item!(cx, + /// comment + fn foo() { let $name:int = 3; } + )]; +} + +fn main() { +} |
