File tree 3 files changed +4
-9
lines changed
3 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1
1
// force-host
2
2
// no-prefer-dynamic
3
+ // edition: 2021
3
4
4
5
#![ crate_type = "proc-macro" ]
5
6
#![ crate_name = "proc_macro_api_tests" ]
6
7
#![ feature( proc_macro_span) ]
7
8
#![ feature( proc_macro_byte_character) ]
8
- #![ feature( c_str_literals) ]
9
9
#![ deny( dead_code) ] // catch if a test function is never called
10
10
11
11
extern crate proc_macro;
Original file line number Diff line number Diff line change @@ -19,14 +19,8 @@ fn test_display_literal() {
19
19
"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0" ,
20
20
) ;
21
21
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""# ) ;
30
24
assert_eq ! ( Literal :: character( 'a' ) . to_string( ) , "'a'" ) ;
31
25
assert_eq ! ( Literal :: character( '\t' ) . to_string( ) , "'\\ t'" ) ;
32
26
assert_eq ! ( Literal :: character( '❤' ) . to_string( ) , "'❤'" ) ;
Original file line number Diff line number Diff line change 1
1
// check-pass
2
2
// aux-build:api/mod.rs
3
+ // edition: 2021
3
4
4
5
//! This is for everything that *would* be a #[test] inside of libproc_macro,
5
6
//! 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