2 #![allow(stable_features)]
4 // ignore-pretty issue #37195
8 pub fn where_am_i() -> String {
9 (module_path!()).to_string()
14 macro_rules! indirect_line { () => ( line!() ) }
17 assert_eq!(line!(), 17);
18 assert_eq!(column!(), 16);
19 assert_eq!(indirect_line!(), 19);
20 assert!((file!().ends_with("syntax-extension-source-utils.rs")));
21 assert_eq!(stringify!((2*3) + 5).to_string(), "(2 * 3) + 5".to_string());
22 assert!(include!("syntax-extension-source-utils-files/includeme.\
23 fragment").to_string()
24 == "victory robot 6".to_string());
27 include_str!("syntax-extension-source-utils-files/includeme.\
28 fragment").to_string()
29 .starts_with("/* this is for "));
31 include_bytes!("syntax-extension-source-utils-files/includeme.fragment")
32 [1] == (42 as u8)); // '*'
33 // The Windows tests are wrapped in an extra module for some reason
34 assert!((m1::m2::where_am_i().ends_with("m1::m2")));
36 assert_eq!((36, "(2 * 3) + 5"), (line!(), stringify!((2*3) + 5)));