Un-gate macro_rules
This commit is contained in:
parent
d0163d3311
commit
c2e26972e3
129 changed files with 15 additions and 260 deletions
|
@ -11,8 +11,6 @@
|
|||
// This test is brittle!
|
||||
// ignore-pretty - the pretty tests lose path information, breaking include!
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
pub mod m1 {
|
||||
pub mod m2 {
|
||||
pub fn where_am_i() -> String {
|
||||
|
@ -24,9 +22,9 @@ pub mod m1 {
|
|||
macro_rules! indirect_line { () => ( line!() ) }
|
||||
|
||||
pub fn main() {
|
||||
assert_eq!(line!(), 27);
|
||||
assert_eq!(line!(), 25);
|
||||
//assert!((column!() == 11));
|
||||
assert_eq!(indirect_line!(), 29);
|
||||
assert_eq!(indirect_line!(), 27);
|
||||
assert!((file!().ends_with("syntax-extension-source-utils.rs")));
|
||||
assert_eq!(stringify!((2*3) + 5).to_string(), "( 2 * 3 ) + 5".to_string());
|
||||
assert!(include!("syntax-extension-source-utils-files/includeme.\
|
||||
|
@ -44,7 +42,7 @@ pub fn main() {
|
|||
// The Windows tests are wrapped in an extra module for some reason
|
||||
assert!((m1::m2::where_am_i().as_slice().ends_with("m1::m2")));
|
||||
|
||||
assert!(match (47, "( 2 * 3 ) + 5") {
|
||||
assert!(match (45, "( 2 * 3 ) + 5") {
|
||||
(line!(), stringify!((2*3) + 5)) => true,
|
||||
_ => false
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue