File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2245,6 +2245,15 @@ impl Context {
2245
2245
try_err ! ( layout:: redirect( & mut redirect_out, file_name) , & redir_dst) ;
2246
2246
}
2247
2247
}
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
+ }
2248
2257
}
2249
2258
}
2250
2259
Ok ( ( ) )
Original file line number Diff line number Diff line change 1
1
#![ crate_name = "foo" ]
2
2
3
3
// @has foo/macro.bar.html
4
- // @! has foo/macro.bar!.html
4
+ // @has foo/macro.bar!.html
5
5
// @!has foo/bar.m.html
6
6
#[ macro_export]
7
7
macro_rules! bar {
You can’t perform that action at this time.
0 commit comments