Skip to content

Commit ab86642

Browse files
committed
rustdoc: Don't use by copy in fst/snd to work around segv
Issue #1546
1 parent 27fe23d commit ab86642

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rustdoc/util.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
2-
fn fst<T, U>(+pair: (T, U)) -> T {
1+
// FIXME #1546: Would rather write fst<T, U>(+pair: (T, U)) -> T
2+
fn fst<T:copy, U:copy>(pair: (T, U)) -> T {
33
let (t, _) = pair;
44
ret t;
55
}
66

7-
fn snd<T, U>(+pair: (T, U)) -> U {
7+
fn snd<T:copy, U:copy>(pair: (T, U)) -> U {
88
let (_, u) = pair;
99
ret u;
1010
}

0 commit comments

Comments
 (0)