File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
use crate :: context:: parse_lint_and_tool_name;
2
- use rustc_span:: { with_default_session_globals , Symbol } ;
2
+ use rustc_span:: { create_default_session_globals_then , Symbol } ;
3
3
4
4
#[ test]
5
5
fn parse_lint_no_tool ( ) {
6
- with_default_session_globals ( || assert_eq ! ( parse_lint_and_tool_name( "foo" ) , ( None , "foo" ) ) ) ;
6
+ create_default_session_globals_then ( || {
7
+ assert_eq ! ( parse_lint_and_tool_name( "foo" ) , ( None , "foo" ) )
8
+ } ) ;
7
9
}
8
10
9
11
#[ test]
10
12
fn parse_lint_with_tool ( ) {
11
- with_default_session_globals ( || {
13
+ create_default_session_globals_then ( || {
12
14
assert_eq ! ( parse_lint_and_tool_name( "clippy::foo" ) , ( Some ( Symbol :: intern( "clippy" ) ) , "foo" ) )
13
15
} ) ;
14
16
}
15
17
16
18
#[ test]
17
19
fn parse_lint_multiple_path ( ) {
18
- with_default_session_globals ( || {
20
+ create_default_session_globals_then ( || {
19
21
assert_eq ! (
20
22
parse_lint_and_tool_name( "clippy::foo::bar" ) ,
21
23
( Some ( Symbol :: intern( "clippy" ) ) , "foo::bar" )
You can’t perform that action at this time.
0 commit comments