Skip to content

Commit 862976c

Browse files
committed
avoid modifying variable we are alting over
1 parent 1f4b3cf commit 862976c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/rustdoc/sectionalize_pass.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,22 +106,22 @@ fn sectionalize(desc: option<str>) -> (option<str>, [doc::section]) {
106106
});
107107
}
108108
none {
109-
alt current_section {
109+
alt copy current_section {
110110
some(section) {
111111
current_section = some({
112112
body: section.body + "\n" + line
113113
with section
114114
});
115115
}
116116
none {
117-
alt new_desc {
117+
new_desc = alt new_desc {
118118
some(desc) {
119-
new_desc = some(desc + "\n" + line);
119+
some(desc + "\n" + line)
120120
}
121121
none {
122-
new_desc = some(line);
122+
some(line)
123123
}
124-
}
124+
};
125125
}
126126
}
127127
}

0 commit comments

Comments
 (0)