File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,15 @@ fn main() {
66 let ac = autocfg:: new ( ) ;
77 stable_feature ( & ac, "assert_matches" ) ;
88
9+ autocfg:: emit_possibility ( "assert_matches_in_module" ) ;
10+ let code = r#"
11+ #![feature(assert_matches)]
12+ use std::assert_matches::assert_matches;
13+ "# ;
14+ if ac. probe_raw ( code) . is_ok ( ) {
15+ autocfg:: emit ( "assert_matches_in_module" ) ;
16+ }
17+
918 stable_feature ( & ac, "let_chains" ) ;
1019
1120 stable_feature ( & ac, "if_let_guard" ) ;
Original file line number Diff line number Diff line change 44#![ feature( try_trait_v2) ]
55#![ feature( try_trait_v2_residual) ]
66
7- #[ cfg( not ( stable_assert_matches ) ) ]
7+ #[ cfg( assert_matches_in_module ) ]
88use std:: assert_matches:: assert_matches;
99
10- #[ cfg( stable_assert_matches ) ]
10+ #[ cfg( not ( assert_matches_in_module ) ) ]
1111use std:: assert_matches;
1212
1313use try_v2:: { Try , Try_ConvertResult } ;
You can’t perform that action at this time.
0 commit comments