File tree Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Expand file tree Collapse file tree 3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 11// force-host
22// no-prefer-dynamic
3+ // edition: 2021
34
45#![ crate_type = "proc-macro" ]
56#![ crate_name = "proc_macro_api_tests" ]
67#![ feature( proc_macro_span) ]
78#![ feature( proc_macro_byte_character) ]
8- #![ feature( c_str_literals) ]
99#![ deny( dead_code) ] // catch if a test function is never called
1010
1111extern crate proc_macro;
Original file line number Diff line number Diff line change @@ -19,14 +19,8 @@ fn test_display_literal() {
1919 "10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0" ,
2020 ) ;
2121
22- assert_eq ! (
23- Literal :: string( "a \t ❤ ' \" \u{1} " ) . to_string( ) ,
24- "\" a \\ t ❤ ' \\ \" \\ u{1}\" " ,
25- ) ;
26- assert_eq ! (
27- Literal :: c_string( c"a \t ❤ ' \" \u{1} " ) . to_string( ) ,
28- "\" a \\ t ❤ ' \\ \" \\ u{1}\" " ,
29- ) ;
22+ assert_eq ! ( Literal :: string( "a \t ❤ ' \" \u{1} " ) . to_string( ) , "\" a \\ t ❤ ' \\ \" \\ u{1}\" " , ) ;
23+ assert_eq ! ( Literal :: c_string( c"\' \" \x7f \u{7fff} " ) . to_string( ) , r#"c"\'\"\x7f\xe7\xbf\xbf""# ) ;
3024 assert_eq ! ( Literal :: character( 'a' ) . to_string( ) , "'a'" ) ;
3125 assert_eq ! ( Literal :: character( '\t' ) . to_string( ) , "'\\ t'" ) ;
3226 assert_eq ! ( Literal :: character( '❤' ) . to_string( ) , "'❤'" ) ;
Original file line number Diff line number Diff line change 11// check-pass
22// aux-build:api/mod.rs
3+ // edition: 2021
34
45//! This is for everything that *would* be a #[test] inside of libproc_macro,
56//! except for the fact that proc_macro objects are not capable of existing
You can’t perform that action at this time.
0 commit comments