File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11use 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 } ;
33
44#[ test]
55fn 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+ } ) ;
79}
810
911#[ test]
1012fn parse_lint_with_tool ( ) {
11- with_default_session_globals ( || {
13+ create_default_session_globals_then ( || {
1214 assert_eq ! ( parse_lint_and_tool_name( "clippy::foo" ) , ( Some ( Symbol :: intern( "clippy" ) ) , "foo" ) )
1315 } ) ;
1416}
1517
1618#[ test]
1719fn parse_lint_multiple_path ( ) {
18- with_default_session_globals ( || {
20+ create_default_session_globals_then ( || {
1921 assert_eq ! (
2022 parse_lint_and_tool_name( "clippy::foo::bar" ) ,
2123 ( Some ( Symbol :: intern( "clippy" ) ) , "foo::bar" )
You can’t perform that action at this time.
0 commit comments