This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -189,11 +189,4 @@ pub mod vec;
189189#[ unstable( feature = "liballoc_internals" , issue = "none" , reason = "implementation detail" ) ]
190190pub mod __export {
191191 pub use core:: format_args;
192-
193- /// Force AST node to an expression to improve diagnostics in pattern position.
194- #[ rustc_macro_transparency = "semitransparent" ]
195- #[ unstable( feature = "liballoc_internals" , issue = "none" , reason = "implementation detail" ) ]
196- pub macro force_expr( $e: expr) {
197- $e
198- }
199192}
Original file line number Diff line number Diff line change 4040#[ allow_internal_unstable( box_syntax, liballoc_internals) ]
4141macro_rules! vec {
4242 ( ) => (
43- $crate:: __export :: force_expr!( $crate:: vec:: Vec :: new( ) )
43+ $crate:: force_expr!( $crate:: vec:: Vec :: new( ) )
4444 ) ;
4545 ( $elem: expr; $n: expr) => (
46- $crate:: __export :: force_expr!( $crate:: vec:: from_elem( $elem, $n) )
46+ $crate:: force_expr!( $crate:: vec:: from_elem( $elem, $n) )
4747 ) ;
4848 ( $( $x: expr) ,+ $( , ) ?) => (
49- $crate:: __export :: force_expr!( <[ _] >:: into_vec( box [ $( $x) ,+] ) )
49+ $crate:: force_expr!( <[ _] >:: into_vec( box [ $( $x) ,+] ) )
5050 ) ;
5151}
5252
@@ -111,3 +111,13 @@ macro_rules! format {
111111 res
112112 } }
113113}
114+
115+ /// Force AST node to an expression to improve diagnostics in pattern position.
116+ #[ doc( hidden) ]
117+ #[ macro_export]
118+ #[ unstable( feature = "liballoc_internals" , issue = "none" , reason = "implementation detail" ) ]
119+ macro_rules! force_expr {
120+ ( $e: expr) => {
121+ $e
122+ } ;
123+ }
You can’t perform that action at this time.
0 commit comments