File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1426,6 +1426,16 @@ impl Context {
14261426 . open ( & redir_dst) {
14271427 try_err ! ( layout:: redirect( & mut redirect_out, file_name) , & redir_dst) ;
14281428 }
1429+
1430+ // If the item is a macro, redirect from the old macro URL (with !)
1431+ // to the new one (without).
1432+ // FIXME(#35705) remove this redirect.
1433+ if item_type == ItemType :: Macro {
1434+ let redir_name = format ! ( "{}.{}!.html" , item_type, name) ;
1435+ let redir_dst = self . dst . join ( redir_name) ;
1436+ let mut redirect_out = try_err ! ( File :: create( & redir_dst) , & redir_dst) ;
1437+ try_err ! ( layout:: redirect( & mut redirect_out, file_name) , & redir_dst) ;
1438+ }
14291439 }
14301440 }
14311441 Ok ( ( ) )
Original file line number Diff line number Diff line change 1212// @has - //pre '() => { ... };'
1313// @has - //pre '($a:tt) => { ... };'
1414// @has - //pre '($e:expr) => { ... };'
15+ // @has macros/macro.my_macro!.html
16+ // @has - //a 'macro.my_macro.html'
1517#[ macro_export]
1618macro_rules! my_macro {
1719 ( ) => [ ] ;
You can’t perform that action at this time.
0 commit comments