Commit Graph

16 Commits

Author SHA1 Message Date
Niko Matsakis
7f661ec417 new tests for RFC #1445 2016-03-25 06:45:43 -04:00
Niko Matsakis
56ebf2b046 fallout in existing tests 2016-03-25 06:45:42 -04:00
Brian Anderson
1639e51f6e Feature gate *all* slice patterns. #23121
Until some backwards-compatibility hazards are fixed in #23121,
these need to be unstable.

[breaking-change]
2015-03-27 12:50:49 -07:00
Huon Wilson
c195783c05 Feature gate #[static_assert].
The API this exposes is a little strange (being attached to `static`s),
so it makes sense to conservatively feature gate it. If it is highly
popular, it is possible to reverse this gating.
2015-03-03 13:00:10 +11:00
P1start
94bcd3539c Set the non_uppercase_statics lint to warn by default 2014-10-03 20:39:56 +13:00
Brian Anderson
451e8c1c61 Convert most code to new inner attribute syntax.
Closes #2569
2014-03-28 17:12:21 -07:00
Derek Guenther
730bdb6403 Added tests to make tidy 2014-02-07 12:49:24 -06:00
Kiet Tran
c06dd0e0af Add dead-code warning pass 2013-12-08 02:55:27 -05:00
Ziad Hatahet
3797f2bfe6 Capitalize statics in f32 and f64 mods
Fixes #10077
2013-10-28 19:35:56 -07:00
bors
97cd495aca auto merge of #9638 : pnkfelix/rust/fsk-issue7526-attempt-to-catch-nonuc-statics-in-match-patterns, r=alexcrichton
r? anyone

Address scariest part of #7526 by adding a new more specific lint (that is set to warn by default, rather than allow).
2013-10-02 01:16:31 -07:00
Daniel Micay
c9d4ad07c4 remove the float type
It is simply defined as `f64` across every platform right now.

A use case hasn't been presented for a `float` type defined as the
highest precision floating point type implemented in hardware on the
platform. Performance-wise, using the smallest precision correct for the
use case greatly saves on cache space and allows for fitting more
numbers into SSE/AVX registers.

If there was a use case, this could be implemented as simply a type
alias or a struct thanks to `#[cfg(...)]`.

Closes #6592

The mailing list thread, for reference:

https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-10-01 14:54:10 -04:00
Felix S. Klock II
8d6f4c207a Workaround conflict between all-uppercase static and NaN definition. 2013-10-01 02:55:51 +02:00
Chris Morgan
d9874c0885 Rename the NaN and is_NaN methods to lowercase.
This is for consistency in naming conventions.

- ``std::num::Float::NaN()`` is changed to ``nan()``;
- ``std::num::Float.is_NaN()`` is changed to ``is_nan()``; and
- ``std::num::strconv::NumStrConv::NaN()`` is changed to ``nan()``.

Fixes #9319.
2013-09-19 23:59:51 +10:00
Etienne Millon
f929a49d9c NaN patterns: indicate that is_NaN is a method 2013-07-25 16:40:59 +02:00
Etienne Millon
fdd71bece2 Generalize NaN pattern detection using walk_pat 2013-07-24 23:20:57 +02:00
Etienne Millon
5c729c0dca Check for comparisons to NaN in patterns
For every pattern that refers to a static value, evaluate it and emit a warning
if it is a NaN.

Fixes #6804
2013-07-24 23:20:57 +02:00