File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ fn main() {
71
71
writeln ! (
72
72
generated,
73
73
r#"
74
- /// Maps the input of `namespace_prefix!` to the output of `namespace_url!`.
74
+ /// Maps the input of [`namespace_prefix!`](macro.namespace_prefix.html) to
75
+ /// the output of [`namespace_url!`](macro.namespace_url.html).
76
+ ///
75
77
#[macro_export] macro_rules! ns {{
76
78
"#
77
79
)
Original file line number Diff line number Diff line change @@ -43,6 +43,14 @@ impl<'a> fmt::Debug for ExpandedName<'a> {
43
43
44
44
/// Helper to quickly create an expanded name.
45
45
///
46
+ /// Can be used with no namespace as `expanded_name!("", "some_name")`
47
+ /// or with a namespace as `expanded_name!(ns "some_name")`. In the
48
+ /// latter case, `ns` is one of the symbols which the [`ns!`][ns]
49
+ /// macro accepts; note the lack of a comma between the `ns` and
50
+ /// `"some_name"`.
51
+ ///
52
+ /// [ns]: macro.ns.html
53
+ ///
46
54
/// # Examples
47
55
///
48
56
/// ```
@@ -57,7 +65,15 @@ impl<'a> fmt::Debug for ExpandedName<'a> {
57
65
/// ns: &ns!(),
58
66
/// local: &local_name!("div")
59
67
/// }
60
- /// )
68
+ /// );
69
+ ///
70
+ /// assert_eq!(
71
+ /// expanded_name!(html "div"),
72
+ /// ExpandedName {
73
+ /// ns: &ns!(html),
74
+ /// local: &local_name!("div")
75
+ /// }
76
+ /// );
61
77
/// # }
62
78
#[ macro_export]
63
79
macro_rules! expanded_name {
You can’t perform that action at this time.
0 commit comments