Commit Graph

29321 Commits

Author SHA1 Message Date
Steven Fackler
24f98c6d7a Whitelist doc attributes
This is a bit overly permissive but should be okay for now.
2014-05-24 16:49:46 -07:00
Steven Fackler
e0648093d8 Port more stuff to mark used attributes 2014-05-24 16:49:46 -07:00
Steven Fackler
50181add04 First sketch of lint pass
Enough attributes are marked to cleanly compile an empty library.
2014-05-24 16:08:36 -07:00
Steven Fackler
c305473d3c Add AttrId to Attribute_ 2014-05-24 16:08:36 -07:00
bors
6304a27b80 auto merge of #14401 : aochagavia/rust/pr4, r=alexcrichton
Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]
2014-05-24 14:26:23 -07:00
Alan Andrade
99744653d5 get over bold text madness, changes per PR, brought the "returning pointers" section back to pointers guide 2014-05-24 13:15:48 -07:00
Adolfo Ochagavía
e998958672 Update ascii functions used elsewhere 2014-05-24 22:00:18 +02:00
bors
43f942f886 auto merge of #14378 : huonw/rust/deque-adjustments, r=alexcrichton
Might as well remove the duplication/`forget` call.
2014-05-24 12:51:24 -07:00
bors
b546fff784 auto merge of #14405 : aochagavia/rust/pr5, r=cmr 2014-05-24 10:51:25 -07:00
Adolfo Ochagavía
9088a56db1 Removed unnecessary macro declaration 2014-05-24 18:11:30 +02:00
bors
39c1ecd411 auto merge of #14396 : vhbit/rust/opaque-mutex, r=alexcrichton
On some systems (iOS for example) mutex is represented by opaque data structure which doesn't play well with simple data copy. Therefore mutex should be initialized from magic static value and filled by OS only when it landed RC.

Initially written for iOS but since landing iOS support might require quite a lot of time I think it is better to split parts which aren't directly related to iOS and merge them in
2014-05-24 04:56:25 -07:00
Huon Wilson
9a8379deb2 std: minor simplification to sync::deque. 2014-05-24 21:44:37 +10:00
Adolfo Ochagavía
f7ccae5f15 Rename functions in Ascii
Some functions implemented for the Ascii struct have the same functionality as other functions implemented for the normal chars. For consistency, I think they should have the same name, so I renamed the functions in Ascii to match the names in the Char trait.

* Renamed `to_lower` to `to_lowercase`
* Renamed `to_upper` to `to_uppercase`
* Renamed `is_alpha` to `is_alphabetic`
* Renamed `is_alnum` to `is_alphanumeric`
* Renamed `is_lower` to `is_lowercase`
* Renamed `is_upper` to `is_uppercase`

[breaking-change]
2014-05-24 12:44:36 +02:00
bors
e72a21b2bb auto merge of #14392 : alexcrichton/rust/mem-updates, r=sfackler
* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]
2014-05-24 03:21:24 -07:00
bors
12467989c3 auto merge of #14389 : Ryman/rust/14303, r=alexcrichton
Closes #14303.
2014-05-24 01:41:25 -07:00
bors
6cf430147e auto merge of #14388 : kballard/rust/nonfatal_lexer_errors, r=alexcrichton
Most errors that arise in the lexer can be recovered from. This allows
for more than one syntax error to be reported at a time.
2014-05-24 00:01:25 -07:00
bors
3bec8d7246 auto merge of #14384 : luqmana/rust/mca, r=alexcrichton
Only add `-Qunused-arguments` for clang.
2014-05-23 22:06:23 -07:00
Valerii Hiora
41b65d39ab Fixes problems on systems with opaque mutex
On some systems (iOS for example) mutex is represented by
opaque data structure which doesn't play well with simple
data copy. Therefore mutex should be initialized from
magic static value and filled by OS only when it landed RC.
2014-05-24 08:01:23 +03:00
Alex Crichton
2fd4841724 core: Finish stabilizing the mem module.
* All of the *_val functions have gone from #[unstable] to #[stable]
* The overwrite and zeroed functions have gone from #[unstable] to #[stable]
* The uninit function is now deprecated, replaced by its stable counterpart,
  uninitialized

[breaking-change]
2014-05-23 20:55:57 -07:00
bors
9c870b3d1c auto merge of #14306 : luqmana/rust/up-llvm, r=alexcrichton
We can now mark arguments and returns as `nonnull` in LLVM. It's still somewhat limited by the fact that LLVM loses this information after inlining but it might help in certain cases.
2014-05-23 19:51:20 -07:00
Kevin Ballard
4c9dace5d5 Make most lexer errors non-fatal
Most errors that arise in the lexer can be recovered from. This allows
for more than one syntax error to be reported at a time.
2014-05-23 19:35:08 -07:00
Luqman Aden
3cae434f5c librustc: Consolidate the attribute handling for tagging function arguments and returns. 2014-05-23 22:32:30 -04:00
Alan Andrade
64dad2cb03 Cleanup lifetime guide
Clean pointers guide
2014-05-23 18:52:06 -07:00
bors
12e80f1a14 auto merge of #14379 : brson/rust/simd, r=alexcrichton
Followup to https://github.com/mozilla/rust/pull/14331 and https://github.com/mozilla/rust/pull/12524
2014-05-23 18:06:19 -07:00
Luqman Aden
69e246fdc9 Add clang specific flag more selectively. 2014-05-23 17:27:13 -07:00
bors
4462687457 auto merge of #14317 : P1start/rust/lifetime-formatting, r=alexcrichton
This changes certain error messages about lifetimes so that they display lifetimes without an `&`.

Fixes #10291.
2014-05-23 16:31:20 -07:00
Brian Anderson
02d1ce830b core: Derive Show on SIMD types 2014-05-23 15:28:30 -07:00
Brian Anderson
eea66e1697 core: Document simd mod 2014-05-23 15:28:30 -07:00
Brian Anderson
8e58ec5b9d std: Move unstable::finally to std::finally. #1457
[breaking-change]
2014-05-23 15:28:27 -07:00
Brian Anderson
1a1e6c8e73 std: Move simd to core::simd and reexport. #1457
[breaking-change]
2014-05-23 15:27:48 -07:00
Brian Anderson
1240197a5b std: Move running_on_valgrind to rt::util. #1457
[breaking-change]
2014-05-23 15:27:48 -07:00
bors
11aa731b38 auto merge of #14368 : tedhorst/rust/master, r=alexcrichton 2014-05-23 14:56:24 -07:00
bors
53db981148 auto merge of #14359 : brson/rust/minordoc, r=alexcrichton 2014-05-23 13:21:25 -07:00
Kevin Butler
da663ccf9f Improve error message for lifetimes after type params.
Closes #14303.
2014-05-23 20:51:21 +01:00
bors
c329a1fcdc auto merge of #14313 : kballard/rust/tuple_dotdot_match_ice, r=cmr
Fixes #14308.
2014-05-23 11:46:26 -07:00
Brian Anderson
807dffde18 Minor library doc copyediting 2014-05-23 10:33:21 -07:00
bors
ad775be8b4 auto merge of #14360 : alexcrichton/rust/remove-deprecated, r=kballard
These have all been deprecated for awhile now, so it's likely time to start removing them.
2014-05-23 09:11:26 -07:00
Alex Crichton
33573bc0aa syntax: Clean out obsolete syntax parsing
All of these features have been obsolete since February 2014, where most have
been obsolete since 2013. There shouldn't be any more need to keep around the
parser hacks after this length of time.
2014-05-23 09:07:28 -07:00
bors
9e244d7084 auto merge of #14372 : neeee/rust/intrinsic-docs, r=brson 2014-05-23 02:06:25 -07:00
bors
33c3eddd11 auto merge of #14362 : zecozephyr/rust/docfixes, r=cmr
extra::arc -> alloc::arc
2014-05-23 00:31:27 -07:00
P1start
e6b23da5a2 Fix lifetime error to print 'a instead of &'a
This changes certain error messages about lifetimes so that they display
lifetimes without an `&`.

Fixes #10291.
2014-05-23 18:22:48 +12:00
Corey Richardson
d8467e23e7 rustc: abstract lint level exporting from EnumSizeVariance 2014-05-22 23:01:47 -07:00
Corey Richardson
c327080ee0 rustc: add a lint for large enum variants
It can be easy to accidentally bloat the size of an enum by making one variant
larger than the others. When this happens, it usually goes unnoticed. This
commit adds a lint that can warn when the largest variant in an enum is more
than 3 times larger than the second-largest variant. This requires a little
bit of rejiggering, because size information is only available in trans, but
lint levels are only available in the lint context.

It is allow by default because it's pretty noisy, and isn't really *that*
undesirable.

Closes #10362
2014-05-22 23:01:47 -07:00
lucy
3d6337079f libcore: Document math intrinsics. 2014-05-23 07:44:03 +02:00
Corey Richardson
f122ad08a5 rustc: middle: ty: use doc comments for the tcx 2014-05-22 22:24:56 -07:00
Corey Richardson
3f8cc1683b rustc: middle: lint: use more doc comments 2014-05-22 22:24:54 -07:00
Ted Horst
2571d42241 updated hash value in reduced benchmark 2014-05-22 23:07:57 -05:00
bors
02117dd1bc auto merge of #14357 : huonw/rust/spelling, r=pnkfelix
The span on a inner doc-comment would point to the next token, e.g. the span for the `a` line points to the `b` line, and the span of `b` points to the `fn`.

```rust
//! a
//! b

fn bar() {}
```
2014-05-22 20:56:18 -07:00
bors
ec0258a381 auto merge of #14314 : alexcrichton/rust/deriving-hash, r=brson
One of the long-term goals of the libstd facade is to move the collections
library underneath the standard library. This would imply that libcollections
today would invert its dependency with libstd.

One of the primary blockers for doing this is the HashMap collection. Of its two
major dependencies, hashing and randomness, this commit is the first step in
dealing with hashing.

When moving the hash module beneath libstd, it must break its primary dependence
on the io::Writer trait (used as the hashing state). The proposed strategy for
breaking this dependence is taking a similar path as core::fmt, which is to have
the hash module define its own "writer trait". This trait would be similar to
std::io::Writer, except that it would not return errors and it would have fewer
convenience methods.

The Hash trait today has its type parameter behind a feature gate (default type
parameters), so this pending change will likely break no code which hasn't opted
in to the feature gate. The SipState struct will lose its implementation of
io::Writer, but it will regain similar methods for dealing with writing data.

This change specifically prepares for the hash migration by modifying
deriving(Hash) to use the std:#️⃣:Writer bound instead of the std::io::Writer
bound. This bound is currently wired to std::io::Writer, but after a snapshot it
will have no need to be wired to the io writer trait.
2014-05-22 18:36:22 -07:00
Luqman Aden
90eeb92e10 Update to LLVM head and mark various ptrs as nonnull. 2014-05-22 21:06:24 -04:00