Commit Graph

38342 Commits

Author SHA1 Message Date
Brian Anderson
1364919b6c mk: Print test summary after tidy when running 'make check' 2015-02-05 14:37:17 -08:00
Brian Anderson
68ddd73257 testparser has long lines 2015-02-05 14:37:16 -08:00
Brian Anderson
4368f6161c mk: Add version number to output. Useful for logs 2015-02-05 14:37:16 -08:00
Brian Anderson
62c90fc6be mk: Add tidy commands to 'make tips' 2015-02-05 14:37:16 -08:00
Brian Anderson
29be938136 mk: Remove redundant valgrind notices in build 2015-02-05 14:37:16 -08:00
Brian Anderson
290b79c15d Clean up tidy scripts, coverage, performance
This restructures tidy.py to walk the tree itself,
and improves performance considerably by not loading entire
files into buffers for licenseck.

Splits build rules into 'tidy', 'tidy-basic', 'tidy-binaries',
'tidy-errors', 'tidy-features'.
2015-02-05 14:37:16 -08:00
Brian Anderson
0e16ad8c3f Polish errorck and featureck UI 2015-02-05 14:37:16 -08:00
Brian Anderson
1ce86651c7 mk: Split tidy into multiple tidy rules
* tidy - runs all tidy scripts
* tidy-basic - tidy.rs
* tidy-binaries - check-binaries.py
* tidy-errors - errorck.py
* tidy-features - featureck.py
2015-02-05 14:37:16 -08:00
Niko Matsakis
bbf0898013 Fix license 2015-02-05 17:01:11 -05:00
Niko Matsakis
fab32b4167 Now that the elaboration mechanism is suppressing defaults, we can remove this overeager code that was pruning out ambig where-clause matches in trait selection. cc #21974. 2015-02-05 16:34:54 -05:00
bors
99f6206c4e Auto merge of #21894 - dotdash:assume_rc, r=alexcrichton
This is half of what @Aatch implemented in #21418. The non-null assumption is later canonicalized to !nonnull metadata and doesn't cause any slowdowns (in fact the build is slightly faster with this change). I left out the other half of #21418 because that still causes a ~16% increase in compile times (30m -> 35m).
2015-02-05 21:08:03 +00:00
Niko Matsakis
8d9bb17204 Extend the solution to encompass HRTB 2015-02-05 15:50:34 -05:00
Mikhail Zabaluev
023a931309 Make the lifetime anchor immutable on std::mem::copy_mut_lifetime
Only the second reference's mutability is relevant to the mutability
of the returned reference.
2015-02-05 22:19:11 +02:00
bors
189930fcae Auto merge of #21916 - japaric:no-as-slice, r=alexcrichton
r? @alexcrichton 
cc @eddyb
2015-02-05 19:00:13 +00:00
Jorge Aparicio
17bc7d8d5b cleanup: replace as[_mut]_slice() calls with deref coercions 2015-02-05 13:45:01 -05:00
Sébastien Marie
cb4965ef3a complete openbsd support for std::env
- add `std::env:consts`
- deprecating `std::os::consts`
- refactoring errno_location()
2015-02-05 19:04:30 +01:00
Ulrik Sverdrup
7d527fa96b Implement pretty-printing of .. and update tests.
Update tests to change all `&expr[]` to `&expr[..]` to make sure pretty printing
passes.
2015-02-05 18:09:12 +01:00
Niko Matsakis
be8d9bb98a When elaborating predicates, purge duplicates from the initial vector.
Fixes #21965.
2015-02-05 11:48:44 -05:00
Alexander Light
8fded29586 Made external_crates feature work again.
Also added test for it.

Fixes #21928
2015-02-05 11:48:28 -05:00
Sébastien Marie
5ad3488f29 unbreak tree for openbsd after #21787
- add `_SC_GETPW_R_SIZE_MAX` constant
- declare `struct passwd`
- convert `load_self` to `current_exe`

Note: OpenBSD don't provide system function to return a valuable Path
for `env::current_exe`. The implementation is currently based on the
value of `argv[0]`, which couldn't be used when executable is called via
PATH.
2015-02-05 16:37:39 +01:00
bors
2c05354211 Auto merge of #21843 - japaric:kindless, r=alexcrichton
This needs a snapshot that includes #21805 before it can be merged.

There are some places where type inference regressed after I removed the annotations (see `FIXME`s). cc @nikomatsakis.

r? @eddyb or anyone
(I'll remove the `FIXME`s before merging, as they are only intended to point out regressions)
2015-02-05 15:22:48 +00:00
Mikhail Zabaluev
fb6b970bf8 Replace one more slice::from_raw_mut_buf added with new io 2015-02-05 13:54:26 +02:00
Mikhail Zabaluev
3ac862816f Replace usage of slice::from_raw_buf with slice::from_raw_parts
New functions, slice::from_raw_parts and slice::from_raw_parts_mut,
are added to implement the lifetime convention as agreed in RFC PR #556.
The functions slice::from_raw_buf and slice::from_raw_mut_buf are
left deprecated for the time being.
2015-02-05 13:54:26 +02:00
Kostas Karachalios
a40df9ddb9 Remove unused src/doc/trpl/rust-book.css 2015-02-05 11:57:06 +01:00
Kostas Karachalios
adfe4d4040 Make the book chapters printable
Tested on:
* Safari on OSX
* Firefox on OSX
2015-02-05 10:21:06 +01:00
bors
2bd8ec2d19 Auto merge of #21944 - alexcrichton:lframework, r=eddyb
On OSX the linker has a separate framework lookup path which is specified via
the `-F` flag. This adds a new kind of `-L` path recognized by the compiler for
frameworks to be passed through to the linker.

Closes #20259
2015-02-05 08:47:48 +00:00
Brian Anderson
456d23e73e Add a lint for writing #[feature] for stable features, warn by default.
The 'stable_features' lint helps people progress from unstable to
stable Rust by telling them when they no longer need a `feature`
attribute because upstream Rust has declared it stable.

This compares to the existing 'unstable_features', which is used
to implement feature staging, and triggers on *any* use
of `#[feature]`.
2015-02-04 23:18:24 -08:00
Joseph Crail
fc0fd289c9 Fix for misspelled comments in tests.
Just spelling corrections.
2015-02-04 23:04:10 -05:00
Joseph Crail
dc2e444e50 Fix for misspelled comments.
The spelling corrections were made in both documentation comments and
regular comments.
2015-02-04 23:00:02 -05:00
bors
fa28f023c2 Auto merge of #21152 - steveklabnik:tasks, r=huonw
This moves the "Tasks" chapter to a "Concurrency" one, as it's about threads, but also about how to deal with concurrency issues.

r? @aturon
2015-02-05 03:11:57 +00:00
Steve Klabnik
5401f086f0 A concurrency chapter to replace the tasks chapter.
Fixes #18936
Fixes #18938
Fixes #20038
Fixes #8395
Fixes #2080
Fixes #21194
2015-02-04 21:47:16 -05:00
Seo Sanghyeon
4ef7551cca Fix type inference related to upvars in closures 2015-02-05 11:29:38 +09:00
Jorge Aparicio
92f11e938a register snapshots 2015-02-04 20:06:12 -05:00
Jorge Aparicio
571cc7f8e9 remove all kind annotations from closures 2015-02-04 20:06:08 -05:00
Alexis
5cbbc12827 stabilize core Entry API 2015-02-04 19:42:58 -05:00
Ulrik Sverdrup
75239142a8 Implement .. syntax for RangeFull as expression
Allows the expression `..` (without either endpoint) in general, can be
used in slicing syntax `&expr[..]` where we previously wrote `&expr[]`.

The old syntax &expr[] is not yet removed or warned for.
2015-02-04 23:23:12 +01:00
Alex Crichton
6c62839a7f rustc: Recognize -L framework=foo
On OSX the linker has a separate framework lookup path which is specified via
the `-F` flag. This adds a new kind of `-L` path recognized by the compiler for
frameworks to be passed through to the linker.

Closes #20259
2015-02-04 13:54:49 -08:00
Hugo van der Wijst
6f872113ab Add QPath construction to ExtCtxt for UFCS support. 2015-02-04 22:44:34 +01:00
bors
ba2f13ef06 Auto merge of #21885 - dotdash:nonnull_load, r=alexcrichton
These pointers are never null, let's tell LLVM about it.
2015-02-04 20:03:55 +00:00
Björn Steinbrink
db8f2d5903 Avoid unnecessary codegen in with_cond()
Currently "k / 2" generates one (k: uint) or two (k: int) "br false,
..." instructions and the corresponding basic blocks, producing quite
some noise and making the code unnecessarily hard to read.

Additionally we can skip translation if the code would end up
unreachable anyway.
2015-02-04 20:06:17 +01:00
Alex Crichton
f77dd70d61 std: Add reexports for core parse errors
These were forgotten reexports from #21718

Closes #21929
2015-02-04 08:48:46 -08:00
bors
3ae76d5c1c Auto merge of #21544 - P1start:mangle-unicode, r=alexcrichton
`{` and `}` aren’t valid characters on ARM, so this makes Unicode characters render as, e.g., `$u38d$` instead of `$u{38d}`.

This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*` (**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in backtraces.
2015-02-04 15:49:43 +00:00
bors
ac134f7ca4 Auto merge of #21499 - P1start:issue-8706, r=huonw
Closes #8706.
2015-02-04 12:42:40 +00:00
bors
c3e1f77291 Auto merge of #21892 - huonw:deprecate-rand, r=alexcrichton
Use [`rand`](https://crates.io/crates/rand) and [`derive_rand`](https://crates.io/crates/derive_rand) from crates.io.

[breaking-change]
2015-02-04 08:47:27 +00:00
Steven Fackler
85a85c2070 Switch missing_copy_implementations to default-allow
This was particularly helpful in the time just after OIBIT's
implementation to make sure things that were supposed to be Copy
continued to be, but it's now creates a lot of noise for types that
intentionally don't want to be Copy.
2015-02-03 23:31:07 -08:00
Steve Klabnik
d992d3d9f3 Fix issue with rt::unwind::try() docs
This is now a Result, not an Option.
2015-02-04 02:19:54 -05:00
bors
d6c15d9b2d Auto merge of #21919 - alexcrichton:rollup, r=alexcrichton 2015-02-04 06:40:12 +00:00
Alex Crichton
70ecd8ed38 Test fixes and rebase conflicts 2015-02-03 21:30:32 -08:00
Alex Crichton
d0029a47c2 rollup merge of #21910: Manishearth/missing_stability
Currently, if a `#![staged_api]` crate contains an exported item without a stability marker (or inherited stability),
the item is useless.

This change introduces a check to ensure that all exported items have a defined stability.

it also introduces the `unmarked_api` feature, which lets users import unmarked features. While this PR should in theory forbid these from existing,
in practice we can't be so sure; so this lets users bypass this check instead of having to wait for the library and/or compiler to be fixed (since otherwise this is a hard error).

r? @aturon
2015-02-03 20:11:20 -08:00
Alex Crichton
9db593c90a rollup merge of #21907: alexcrichton/iter-by-ref
This removes the `ByRef` iterator adaptor to stay in line with the changes to
`std::io`. The `by_ref` method instead just returns `&mut Self`.

This also removes the implementation of `Iterator for &mut Iterator` and instead
generalizes it to `Iterator for &mut I` where `I: Iterator + ?Sized`. The
`Box<I>` implementations were also updated.
2015-02-03 20:11:20 -08:00