Commit graph

39462 commits

Author SHA1 Message Date
Manish Goregaokar
faca553a01 Rollup merge of #22994 - eddyb:unsuffix-ints-good, r=alexcrichton
Automatic has-same-types testing methodology can be found in #22501.
Because most of them don't work with `--pretty=typed`, compile-fail tests were manually audited.

r? @aturon
2015-03-05 12:39:05 +05:30
Manish Goregaokar
931c55ab00 Move span in error (fixup #22764) 2015-03-05 12:38:36 +05:30
Manish Goregaokar
3d3ccfff9e Rollup merge of #23006 - dhuseby:master, r=alexcrichton
as the subject says.
2015-03-05 12:38:36 +05:30
Dave Huseby
13720b5571 updating llvm-auto-clean-trigger too 2015-03-05 12:38:35 +05:30
Dave Huseby
07e51ec7e0 adding bitrig snapshot to snapshots file 2015-03-05 12:38:35 +05:30
Dave Huseby
4ca07af526 bumping again to get the updated configure 2015-03-05 12:38:35 +05:30
Dave Huseby
a73fc0fe83 bumping the jemalloc revision to include the bitrig changes 2015-03-05 12:38:35 +05:30
Manish Goregaokar
ca13fd2a07 Rollup merge of #22973 - djmally:coll_docs, r=Gankro 2015-03-05 12:38:34 +05:30
Dave Huseby
5d003c6f79 updating llvm submodule to include bitrig support 2015-03-05 12:38:34 +05:30
Manish Goregaokar
145b83e633 Rollup merge of #22994 - eddyb:unsuffix-ints-good, r=alexcrichton
Automatic has-same-types testing methodology can be found in #22501.
Because most of them don't work with `--pretty=typed`, compile-fail tests were manually audited.

r? @aturon
2015-03-05 12:38:33 +05:30
Eduard Burtescu
34410ec748 Fix compile-fail error messages after integer suffix removal. 2015-03-05 12:38:33 +05:30
Eduard Burtescu
e64670888a Remove integer suffixes where the types in compiled code are identical. 2015-03-05 12:38:33 +05:30
Manish Goregaokar
c8c4d85b50 Rollup merge of #22764 - ivanradanov:fileline_help, r=huonw
When warnings and errors occur, the associated help message should not print the same code snippet.
https://github.com/rust-lang/rust/issues/21938
2015-03-05 12:38:32 +05:30
Manish Goregaokar
4de4234795 Rollup merge of #23018 - sanxiyn:quote-question, r=huonw
Fix #22957.
2015-03-05 12:38:32 +05:30
Seo Sanghyeon
951118b74f Fix quoting of ?Sized 2015-03-05 12:38:30 +05:30
Manish Goregaokar
71ef0734e7 Rollup merge of #23013 - nikomatsakis:syncbox, r=pnkfelix
When generating WF criteria, do not visit the same type more than once. Fixes an infinite stack overflow (#23003).

r? @aturon
2015-03-05 12:37:49 +05:30
Manish Goregaokar
bedfca0fb3 Rollup merge of #23004 - alexcrichton:libc-stable, r=brson
This same source is being built in the Cargo ecosystem and hence needs to build
on stable Rust as well. This commit places the `no_std` attribute along with the
`no_std` feature behind a `cfg_attr` flag so they are not processed when
compiled on crates.io
2015-03-05 12:37:49 +05:30
Manish Goregaokar
24f00eb2ae Rollup merge of #23001 - alexcrichton:index-output-stable, r=nikomatsakis
This stability attribute was left out by accident and the stability pass has
since picked up the ability to check for this. As a result, crates are currently
getting warnings for implementations of `Index`.
2015-03-05 12:37:49 +05:30
Manish Goregaokar
bb459bf95b Rollup merge of #23000 - Florob:unicode-FL, r=brson
This handles the ranges contained in UnicodeData.txt.
Counterintuitively this actually makes the tables shorter.
2015-03-05 12:37:48 +05:30
Manish Goregaokar
478c396b7a Rollup merge of #22939 - bleibig:grammar-updates, r=sanxiyn
Updates to the bison grammar to account for recent grammar additions and new tests. In particular:

* Support parsing `impl MyTrait for .. { }`
* Support parsing ExprQualifiedPaths without \"as TRAIT_REF\" such as `<Foo>::bar(&Foo)`
* Support parsing \"for\" clauses at the beginning of where clauses such as `where for<'a, 'b> &'a T: Bar<'b>`
2015-03-05 12:37:48 +05:30
Manish Goregaokar
d693ec17a5 Rollup merge of #22029 - iKevinY:tidy-changes, r=brson
Currently, the list of files linted in `tidy.py` is unordered. It seems more appropriate for more frequently appearing files (like `.rs`) to appear at the top of the list and for \"other files\" to appear at the very end. This PR also changes the wildcard import of `check_license()` into an explicit one.

```
Before:                     After:
* linted 4 .sh files        * linted 5034 .rs files
* linted 4 .h files         * linted 29 .c files
* linted 29 .c files        * linted 28 .py files
* linted 2 .js files        * linted 4 .sh files
* linted 0 other files      * linted 4 .h files
* linted 28 .py files       * linted 2 .js files
* linted 5034 .rs files     * linted 0 other files
```

r? @brson
2015-03-05 12:37:48 +05:30
bors
68740b4054 Auto merge of #22061 - pczarn:quote_matcher_and_attr, r=kmcallister
Fixes #19674
Fixes #17396 (already closed, yeah)

cc @kmcallister , @cmr
2015-03-05 04:32:51 +00:00
bors
cc722a4dd3 Auto merge of #22873 - alexcrichton:deprecate-fs, r=aturon
This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.

[breaking-change]
2015-03-05 01:19:15 +00:00
Alex Crichton
95d904625b std: Deprecate std::old_io::fs
This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.
2015-03-04 15:59:30 -08:00
Piotr Czarnecki
3541abedeb Add quasiquote for matchers and attributes 2015-03-04 16:13:37 +01:00
bors
3b3bb0e682 Auto merge of #22235 - michaelwoerister:cross-crate-spans, r=michaelwoerister
This allows to create proper debuginfo line information for items inlined from other crates (e.g. instantiations of generics). Only the codemap's 'metadata' is stored in a crate's metadata. That is, just filename, positions of line-beginnings, etc. but not the actual source code itself.

Crate metadata size is increased by this change because spans in the encoded ASTs take up space now:
```
                BEFORE    AFTER
libcore         36 MiB    39.6 MiB    +10%
libsyntax       51.1 MiB  60.5 MiB    +18.4%
libcollections  11.2 MiB  12.8 MiB    +14.3%
```
This only affects binaries containing metadata (rlibs and dylibs), executables should not be affected in size. 

Fixes #19228 and probably #22226.
2015-03-04 14:47:51 +00:00
Eduard Burtescu
48fba76c7d Fix compile-fail error messages after integer suffix removal. 2015-03-04 15:48:33 +02:00
bors
bdf6e4fcf5 Auto merge of #22920 - tshepang:remove-some-warnings, r=huonw 2015-03-04 12:16:51 +00:00
bors
6e055c3f00 Auto merge of #22958 - laijs:option_map_for_iter_map, r=alexcrichton
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
2015-03-04 09:46:29 +00:00
Michael Woerister
2f8865556b Encode codemap and span information in crate metadata.
This allows to create proper debuginfo line information for items inlined from other crates (e.g. instantiations of generics).
Only the codemap's 'metadata' is stored in a crate's metadata. That is, just filename, line-beginnings, etc. but not the actual source code itself. We are thus missing the opportunity of making Rust the first "open-source-only" programming language out there. Pity.
2015-03-04 09:50:09 +01:00
Eduard Burtescu
8e50853b54 Remove integer suffixes where the types in compiled code are identical. 2015-03-04 07:03:05 +02:00
Niko Matsakis
8c28284e51 When generating WF criteria, do not visit the same type more than
once. Fixes an infinite stack overflow (#23003).
2015-03-03 19:27:50 -05:00
Alex Crichton
9893b44ad9 libc: Move features behind a cfg_attr gate
This same source is being built in the Cargo ecosystem and hence needs to build
on stable Rust as well. This commit places the `no_std` attribute along with the
`no_std` feature behind a `cfg_attr` flag so they are not processed when
compiled on crates.io
2015-03-03 13:05:55 -08:00
bors
fed12499e7 Auto merge of #23002 - pnkfelix:fsk-box-place-runway, r=nikomatsakis
Runway for RFC 809 (overloaded box/placement-in) by adding type annotations or explicit calls to `Box::new` where I found it necessary on PR #22086.

I have broken this up into more than one PR because the entire commit chain (see PR #22086) is long, widespread and unwieldy to rebase frequently.

To my knowledge this is not a breaking change.  Also, there is in principle nothing stopping someone from reverting some/all of these annotations, since without the rest of the commit chain in #22086, the associated code would continue to compile.

All I can do is ask: Try to discourage others from removing seemingly "unnecessary" uses of the `Box` type or the `Box::new()` function, until the rest of RFC 809 lands.
2015-03-03 20:17:08 +00:00
Felix S. Klock II
cb1b0dd589 Fix doc example to accommodate overloaded-box. 2015-03-03 21:16:03 +01:00
Felix S. Klock II
0d5bcb14ad Switched to Box::new in many places.
Many of the modifications putting in `Box::new` calls also include a
pointer to Issue 22405, which tracks going back to `box <expr>` if
possible in the future.

(Still tried to use `Box<_>` where it sufficed; thus some tests still
have `box_syntax` enabled, as they use a mix of `box` and `Box::new`.)

Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-03-03 21:05:55 +01:00
Felix S. Klock II
b03279aaa2 inline Box::new always.
(You shouldn't use it, but it is a semi-reasonable way to annotate
types when necessary.)
2015-03-03 20:29:01 +01:00
Felix S. Klock II
270f0eef73 Add : Box<_> or ::Box<_> type annotations to various places.
This is the kind of change that one is expected to need to make to
accommodate overloaded-`box`.

----

Note that this is not *all* of the changes necessary to accommodate
Issue 22181.  It is merely the subset of those cases where there was
already a let-binding in place that made it easy to add the necesasry
type ascription.

(For unnamed intermediate `Box` values, one must go down a different
route; `Box::new` is the option that maximizes portability, but has
potential inefficiency depending on whether the call is inlined.)

----

There is one place worth note, `run-pass/coerce-match.rs`, where I
used an ugly form of `Box<_>` type ascription where I would have
preferred to use `Box::new` to accommodate overloaded-`box`.  I
deliberately did not use `Box::new` here, because that is already done
in coerce-match-calls.rs.

----

Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-03-03 20:29:01 +01:00
Alex Crichton
da03392e1f std: Mark Index::Output as a stable associated type
This stability attribute was left out by accident and the stability pass has
since picked up the ability to check for this. As a result, crates are currently
getting warnings for implementations of `Index`.
2015-03-03 11:28:57 -08:00
Florian Zeitz
c9e2de42b5 unicode: Properly parse ranges in UnicodeData.txt
This handles the ranges contained in UnicodeData.txt.
Counterintuitively this actually makes the tables shorter.
2015-03-03 20:04:55 +01:00
bors
129173f198 Auto merge of #22997 - pnkfelix:make-timestamps-robust-to-concurrent-edits, r=nikomatsakis
Make build timestamp files robust in face of concurrent source modification.

Strategy: If the end goal is to touch e.g. `stamp.std`, then we first touch `stamp.std.start_time` before doing anything else.  Then when the receipe finishes, we touch `stamp.std` using the timestamp from `stamp.std.start_time` as the reference time, and remove `stamp.std.start_time`.

Fix #6518.
2015-03-03 17:07:57 +00:00
bors
14f0942a49 Auto merge of #22532 - pnkfelix:arith-overflow, r=pnkfelix,eddyb
Rebase and follow-through on work done by @cmr and @aatch.

Implements most of rust-lang/rfcs#560. Errors encountered from the checks during building were fixed.

The checks for division, remainder and bit-shifting have not been implemented yet.

See also PR #20795

cc @Aatch ; cc @nikomatsakis
2015-03-03 14:18:03 +00:00
Felix S. Klock II
62aa899e3d Make build timestamp files robust in face of concurrent source modification.
Strategy: If the end goal is to touch e.g. `stamp.std`, then we first
touch `stamp.std.start_time` before doing anything else.  Then when
the receipe finishes, we touch `stamp.std` using the timestamp from
`stamp.std.start_time` as the reference time, and remove
`stamp.std.start_time`.

Fix #6518.
2015-03-03 15:11:01 +01:00
Ivan Radanov Ivanov
7496539a00 Change span_help calls to fileline_help where appropriate 2015-03-03 15:18:33 +02:00
Felix S. Klock II
243c5164ea sidestep potential over- and underflow in estimated stack bounds.
See buildlog here for evidence of such occurring:
  http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3910/steps/test/logs/stdio
2015-03-03 13:12:38 +01:00
bors
38e97b99a6 Auto merge of #22995 - Manishearth:rollup, r=Manishearth 2015-03-03 11:32:11 +00:00
Manish Goregaokar
4f1f5eb1ab Rollup merge of #22988 - dcrewi:slice-swap-inline, r=alexcrichton 2015-03-03 17:02:24 +05:30
Manish Goregaokar
415c42ecc4 Rollup merge of #22982 - tbu-:pr_fixup_22510, r=Manishearth
r? @Manishearth
2015-03-03 17:02:24 +05:30
Manish Goregaokar
2e15a7d92e Rollup merge of #22977 - kmcallister:issue-15778, r=sfackler
Fixes #15778.

r? @sfackler
2015-03-03 17:02:24 +05:30
Tobias Bucher
d18897cadf Revert incorrect usize -> u32 replacements from #22510
Conflicts:
	src/libstd/thread.rs
2015-03-03 17:02:24 +05:30