diff options
| author | Steven Fackler <sfackler@gmail.com> | 2014-03-02 13:38:44 -0800 |
|---|---|---|
| committer | Steven Fackler <sfackler@gmail.com> | 2014-03-02 14:12:02 -0800 |
| commit | a0e54c77612faa9008f95a136ed1674dfcf494ef (patch) | |
| tree | 9538bd363a1f57d13d755cf570ddeb6d55ed1513 /src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs | |
| parent | 25431774a933a3b0c5212ea45150660544dec1ec (diff) | |
| download | rust-a0e54c77612faa9008f95a136ed1674dfcf494ef.tar.gz rust-a0e54c77612faa9008f95a136ed1674dfcf494ef.zip | |
Expand string literals and exprs inside of macros
A couple of syntax extensions manually expanded expressions, but it wasn't done universally, most noticably inside of asm!(). There's also a bit of random cleanup.
Diffstat (limited to 'src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs')
| -rw-r--r-- | src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs b/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs new file mode 100644 index 00000000000..a7b8297487d --- /dev/null +++ b/src/test/run-pass-fulldeps/phase-syntax-link-does-resolve.rs @@ -0,0 +1,35 @@ +// Copyright 2013-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. + +// aux-build:macro_crate_test.rs +// ignore-stage1 +// ignore-fast +// ignore-android +// force-host + +// You'll note that there's lots of directives above. This is a very particular +// test in which we're both linking to a macro crate and loading macros from it. +// This implies that both versions are the host architecture, meaning this test +// must also be compiled with the host arch. +// +// Hence, ignore-stage1 because macros are unstable around there, ignore-fast +// because this doesn't work with that test runner, ignore-android because it +// can't run host binaries, and force-host to make this test build as the host +// arch. + +#[feature(phase)]; + +#[phase(syntax, link)] +extern crate macro_crate_test; + +fn main() { + assert_eq!(1, make_a_1!()); + macro_crate_test::foo(); +} |
