File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2245,6 +2245,15 @@ impl Context {
22452245 try_err ! ( layout:: redirect( & mut redirect_out, file_name) , & redir_dst) ;
22462246 }
22472247 }
2248+ // If the item is a macro, redirect from the old macro URL (with !)
2249+ // to the new one (without).
2250+ if item_type == ItemType :: Macro {
2251+ let redir_name = format ! ( "{}.{}!.html" , item_type, name) ;
2252+ let redir_dst = self . dst . join ( redir_name) ;
2253+ let redirect_out = try_err ! ( File :: create( & redir_dst) , & redir_dst) ;
2254+ let mut redirect_out = BufWriter :: new ( redirect_out) ;
2255+ try_err ! ( layout:: redirect( & mut redirect_out, file_name) , & redir_dst) ;
2256+ }
22482257 }
22492258 }
22502259 Ok ( ( ) )
Original file line number Diff line number Diff line change 11#![ crate_name = "foo" ]
22
33// @has foo/macro.bar.html
4- // @! has foo/macro.bar!.html
4+ // @has foo/macro.bar!.html
55// @!has foo/bar.m.html
66#[ macro_export]
77macro_rules! bar {
You can’t perform that action at this time.
0 commit comments