about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-14 15:28:59 -0700
committerbors <bors@rust-lang.org>2013-05-14 15:28:59 -0700
commitc30414f980eb3e8010640f6c83a5ef6f8e6ab047 (patch)
tree1c7286df87d9beaa410a53fbdbcb714884d98e86 /src/libsyntax/parse
parent043d02213e19c5a5cffb781e5a11accbe28bf0de (diff)
parentda9c1fbf2740258fcb73a3d23bf3cf9d7d096189 (diff)
downloadrust-c30414f980eb3e8010640f6c83a5ef6f8e6ab047.tar.gz
rust-c30414f980eb3e8010640f6c83a5ef6f8e6ab047.zip
auto merge of #6471 : gifnksm/rust/reform-rational, r=brson
`std::ratio` module contains `BigRational` type, but the type is not usable by following reasons.
* `Ratio::new` requires `T: Copy + Num + Ord`, but `BigInt` is not implicitly copyable, because it contains unique vector.
* `BigInt` is not implements `Num`

So, I rewrite `Ratio` as follows.
* `Ratio` requires `T: Clone + Integer + Ord`.
  * `Copy` -> `Clone`: to be able to use `BigRational`
  * `Num` -> `Integer`: It is incorrect that a rational number constructed by two non-integer numbers.
* `BigInt` implements `Num` and `Orderable` which are required by `Integer` bound
Diffstat (limited to 'src/libsyntax/parse')
0 files changed, 0 insertions, 0 deletions