]> git.lizzy.rs Git - rust.git/commit
auto merge of #9535 : alexcrichton/rust/no-format-default, r=thestinger
authorbors <bors@rust-lang.org>
Fri, 27 Sep 2013 16:41:07 +0000 (09:41 -0700)
committerbors <bors@rust-lang.org>
Fri, 27 Sep 2013 16:41:07 +0000 (09:41 -0700)
commit78c3fac85292fc3083def6913cc934d9e20893c1
treeb0c9e27d0d96c50b74d0fcfa92639f019b254adc
parent10e7f12dafc2e24c9f072d68ff6c4929a28b5c8c
parentb74663e027521d351b5920e6ce95d5c58221cef5
auto merge of #9535 : alexcrichton/rust/no-format-default, r=thestinger

As mentioned in #9456, the format! syntax extension would previously consider an
empty format as a 'Unknown' format which could then also get coerced into a
different style of format on another argument.

This is unusual behavior because `{}` is a very common format and if you have
`{0} {0:?}` you wouldn't expect them both to be coereced to the `Poly`
formatter. This commit removes this coercion, but still retains the requirement
that each argument has exactly one format specified for it (an empty format now
counts as well).

Perhaps at a later date we can add support for multiple formats of one argument,
but this puts us in at least a backwards-compatible situation if we decide to do
that.
src/librustdoc/html/render.rs