Commit Graph

27866 Commits

Author SHA1 Message Date
Michael Woerister
5099b8c863 debuginfo: Don't create debuginfo for statics inlined from other crates.
Fixes issue #13213, that is linker errors when the inlined static has been optimized out of the exporting crate.
2014-04-10 15:21:57 -07:00
Michael Woerister
c26d25466d debuginfo: Implement discriminator type metadata re-use.
An optimization for sharing the type metadata of generic enum discriminators between monomorphized instances (fixes issue #12840)
2014-04-10 15:21:57 -07:00
Michael Woerister
43e8ace76b debuginfo: Improve source code position assignment for inlined functions.
This commit makes sure that code inlined from other functions isn't assigned the source position of the call site, since this leads to undesired behavior when setting line breakpoints (issue #12886)
2014-04-10 15:21:57 -07:00
bors
5bcb76181a auto merge of #13350 : huonw/rust/devec-collections, r=alexcrichton
collections: replace all ~[T] with Vec<T>.
2014-04-10 13:11:54 -07:00
bors
e263ef1df7 auto merge of #13437 : kaseyc/rust/remove_unnecessary_struct, r=sanxiyn
Removes the unused Point struct from assert-eq-macro-fail.rs.
2014-04-10 07:21:56 -07:00
bors
6d1c6124f6 auto merge of #13436 : pongad/rust/lazyemit, r=thestinger
Fixes #11926
2014-04-10 05:56:55 -07:00
Kasey Carrothers
27920afa85 Remove the unused Point struct in the assert-eq-macro-fail.rs test. 2014-04-09 21:56:21 -07:00
bors
7fbcb400f0 auto merge of #13413 : alexcrichton/rust/once-fn-move, r=brson
This fixes the categorization of the upvars of procs (represented internally
as once fns) to consider usage to require a loan. In doing so, upvars are no
longer allowed to be moved out of repeatedly in loops and such.

Closes #10398
Closes #12041
Closes #12127
2014-04-09 18:31:58 -07:00
Michael Darakananda
a00be50e00 Emit intrinsic lazily 2014-04-09 19:56:31 -04:00
bors
e2c84a78b4 auto merge of #13383 : ben0x539/rust/glob-dots, r=brson
Fixes #12930.
2014-04-09 14:11:56 -07:00
Alex Crichton
767ed1a71f rustc: Prevent repeated moves out of proc upvars
This fixes the categorization of the upvars of procs (represented internally
as once fns) to consider usage to require a loan. In doing so, upvars are no
longer allowed to be moved out of repeatedly in loops and such.

Closes #10398
Closes #12041
Closes #12127
2014-04-08 17:10:47 -07:00
Huon Wilson
4b9a7a2588 collections: replace all ~[T] with Vec<T>. 2014-04-09 09:58:17 +10:00
Huon Wilson
d3c831ba4a std: use a match in assert_eq! to extend the lifetime of the args.
This enables

    assert_eq!(foo.collect::<Vec<...>>().as_slice(), &[1,2,3,4]);

to work, by extending the lifetime of the .as_slice() rvalue.
2014-04-09 09:57:49 +10:00
bors
8801d891c4 auto merge of #13399 : SimonSapin/rust/patch-8, r=cmr 2014-04-08 15:06:31 -07:00
bors
02f51211ed auto merge of #13397 : alexcrichton/rust/rollup, r=alexcrichton 2014-04-08 08:16:52 -07:00
Simon Sapin
7619b78191 Update an obsolete comment about conditions 2014-04-08 10:56:48 +01:00
Alex Crichton
da8d4fddc6 Test fixes from rollup
Closes #13394 (sync: remove unsafe and add Send+Share to Deref (enabled by autoderef vtables))
Closes #13389 (Made libflate functions return Options instead of outright failing)
Closes #13388 (doc: Document flavorful variations of paths)
Closes #13387 (Register new snapshots)
Closes #13386 (std: Add more docs for ptr mod)
Closes #13384 (Tweak crate loading to load less metadata)
Closes #13382 (fix ~ZeroSizeType rvalues)
Closes #13378 (Update tidy script, replace XXX with FIXME)
Closes #13377 (std: User a smaller stdin buffer on windows)
Closes #13369 (Fix spelling errors in comments.)
Closes #13314 (Made 'make install' include libs for additional targets)
Closes #13278 (std: make vec!() macro handle a trailing comma)
Closes #13276 (Add test for #11881)
2014-04-08 00:03:16 -07:00
JustAPerson
cdf349d442 Add test for #11881
Closes #11881.

This code has been copied from the original issue and updated for
modern Rust APIs.
2014-04-08 00:03:12 -07:00
Kang Seonghoon
7a281718f0 std: make vec!() macro handle a trailing comma
Fixes #12910.
2014-04-08 00:03:12 -07:00
Dmitry Promsky
87334fb05f Made 'make install' include libs for additional targets 2014-04-08 00:03:12 -07:00
Joseph Crail
22b632560f Fix spelling errors in comments. 2014-04-08 00:03:12 -07:00
Alex Crichton
6ac34926a4 std: User a smaller stdin buffer on windows
Apparently windows doesn't like reading from stdin with a large buffer size, and
it also apparently is ok with a smaller buffer size. This changes the reader
returned by stdin() to return an 8k buffered reader for stdin rather than a 64k
buffered reader.

Apparently libuv has run into this before, taking a peek at their code, with a
specific comment in their console code saying that "ReadConsole can't handle big
buffers", which I presume is related to invoking ReadFile as if it were a file
descriptor.

Closes #13304
2014-04-08 00:03:12 -07:00
Boris Egorov
00cbda2d0a Improve searching for XXX in tidy script (#3303)
Few places where previous version of tidy script cannot find XXX:
* inside one-line comment preceding by a few spaces;
* inside multiline comments (now it finds it if multiline comment starts
on the same line with XXX).

Change occurences of XXX found by new tidy script.
2014-04-08 00:03:12 -07:00
Daniel Micay
de2567dec9 fix ~ZeroSizeType rvalues
Closes #13360
2014-04-08 00:03:11 -07:00
Alex Crichton
cced02fcac rustc: Don't read both rlib and dylib metadata
This is an optimization which is quite impactful for compiling small crates.
Reading libstd's metadata takes about 50ms, and a hello world before this change
took about 100ms (this change halves that time).

Recent changes made it such that this optimization wasn't performed, but I think
it's a better idea do to this for now. See #10786 for tracking this issue.
2014-04-08 00:03:11 -07:00
Alex Crichton
5367c32c7d rustc: Never register syntax crates in CStore
When linking, all crates in the local CStore are used to link the final product.
With #[phase(syntax)], crates want to be omitted from this linkage phase, and
this was achieved by dumping the entire CStore after loading crates. This causes
crates like the standard library to get loaded twice. This loading process is a
fairly expensive operation when dealing with decompressing metadata.

This commit alters the loading process to never register syntax crates in
CStore. Instead, only phase(link) crates ever make their way into the map of
crates. The CrateLoader trait was altered to return everything in one method
instead of having separate methods for finding information.
2014-04-08 00:03:11 -07:00
Alex Crichton
31755e2452 rustc: Use CStore, not a separate crate cache
This separate crate cache is one factor which is causing libstd to be loaded
twice during normal compilation. The crates loaded for syntax extensions have a
separate cache than the crates loaded for linking, so all crates are loaded once
per #[phase] they're tagged with.

This removes the cache and instead uses the CStore structure itself as the cache
for loaded crates. This should allow crates loaded during the syntax phase to be
shared with the crates loaded during the link phase.
2014-04-08 00:03:11 -07:00
Brian Anderson
ef37cfdecc std: Add more docs for ptr mod 2014-04-08 00:03:11 -07:00
Alex Crichton
c3ea3e439f Register new snapshots 2014-04-08 00:03:11 -07:00
Alex Crichton
c83afb9719 doc: Document flavorful variations of paths
Closes #4293
2014-04-08 00:03:11 -07:00
Tobba
bc234ae130 Made libflate functions return Options instead of outright failing 2014-04-08 00:03:11 -07:00
Jim Radford
dc49018679 sync: remove unsafe and add Send+Share to Deref (enabled by autoderef vtables) 2014-04-08 00:03:11 -07:00
bors
e415c25bcd auto merge of #13393 : alexcrichton/rust/hopefully-fix-bsd, r=sfackler
This appears to be causing the BSD bots to lock up when looking at the core
dumps I've managed to get. Dropping the `FileDesc` structure triggers the `Arc`
it's contained in to get cleaned up, invoking free(). This instead just closes
the file descriptor (the arc itself is never cleaned up).

I'm still not entirely sure why this is a problem because the pthreads runtime
should register hooks for fork() to prevent this sort of deadlock, but perhaps
that's only done on linux?
2014-04-07 21:21:47 -07:00
Alex Crichton
7da210907e native: Try hard to not malloc on a forked child
This appears to be causing the BSD bots to lock up when looking at the core
dumps I've managed to get. Dropping the `FileDesc` structure triggers the `Arc`
it's contained in to get cleaned up, invoking free(). This instead just closes
the file descriptor (the arc itself is never cleaned up).

I'm still not entirely sure why this is a problem because the pthreads runtime
should register hooks for fork() to prevent this sort of deadlock, but perhaps
that's only done on linux?
2014-04-07 20:27:12 -07:00
Benjamin Herr
1700f359bc libglob: only return dirs for globs ending in /
`foo.txt/` should not return `foo.txt` if `foo.txt` is in fact a text
file and not a directory.
2014-04-08 01:21:37 +02:00
Benjamin Herr
4051bd900a libglob: allow "." and ".." to be matched
... also don't read the whole directory if the glob for that path
component doesn't contain any metacharacters.

Patterns like `../*.jpg` will work now, and `.*` will match both `.` and
`..` to be consistent with shell expansion.

As before: Just `*` still won't match `.` and `..`, while it will still
match dotfiles like `.git` by default.
2014-04-08 01:21:28 +02:00
bors
9a33330caa auto merge of #13288 : alexcrichton/rust/remove-check-fast, r=brson
Rebasing of #12304.
2014-04-07 11:26:37 -07:00
Alex Crichton
2ecae80af2 Fix some windows rpass tests 2014-04-07 09:29:42 -07:00
bors
2db9700332 auto merge of #13363 : free-Runner/rust/patch-1, r=alexcrichton 2014-04-07 08:56:34 -07:00
bors
c7fac44712 auto merge of #13358 : tbu-/rust/pr_doc_equivrel, r=cmr
Add requirements of TotalEq and TotalOrd

Clarify that TotalEq needs an underlying equivalence relation and that TotalOrd
needs a total ordering and specifically named the required (and sufficient)
attributes.
2014-04-07 06:21:35 -07:00
bors
dd3e553120 auto merge of #13356 : alexcrichton/rust/ignore-flaky, r=huonw
This test relies on the parent to be descheduled before the child sends its
data. This has proved to be unreliable on libnative on the bots. It's a fairly
trivial test regardless, so ignoring it for now won't lose much.
2014-04-07 05:01:35 -07:00
bors
8902ed0c65 auto merge of #13354 : alexcrichton/rust/fixup-some-signals, r=sfackler
This also makes the listener struct sendable again by explicitly putting the
Send bound on the relevant Rtio object.

cc #13352
2014-04-07 03:46:37 -07:00
bors
0deb16a54e auto merge of #13347 : HeroesGrave/rust/master, r=alexcrichton
This has to be the most pathetic pull request I've ever made, but the `[` in `#![some_attribute]` was not getting highlighted in KATE.
2014-04-07 02:26:37 -07:00
bors
e4779b5050 auto merge of #13165 : sfackler/rust/io-vec, r=alexcrichton
`Reader`, `Writer`, `MemReader`, `MemWriter`, and `MultiWriter` now work with `Vec<u8>` instead of `~[u8]`. This does introduce some extra copies since `from_utf8_owned` isn't usable anymore, but I think that can't be helped until `~str`'s representation changes.
2014-04-06 23:36:38 -07:00
Alex Crichton
0d9fd8e2a1 rmake: Fix a test on FreeBSD 2014-04-06 15:55:43 -07:00
Alex Crichton
8ded99c0ef Remove ignore-fast that has cropped up 2014-04-06 15:55:43 -07:00
Brian Anderson
42847c8b1e Use ignore-freebsd for tests broken on FreeBSD 2014-04-06 15:55:43 -07:00
Brian Anderson
1ef8b75187 Ignore another test that fails mysteriously on BSD 2014-04-06 15:55:43 -07:00
Brian Anderson
e9108cd7b8 test: Ignore run-make tests that don't work on BSD 2014-04-06 15:55:43 -07:00
Brian Anderson
0e85e599db mk: Pass the name of the make command to maketest.py
This should make BSD use the proper GNU make.
2014-04-06 15:55:43 -07:00