Commit Graph

29790 Commits

Author SHA1 Message Date
Alex Crichton
91c7687f03 test: Attempt to fix nightly-linux
The nightly builds on linux have been failing over the past few days due to a
malformed LD_LIBRARY_PATH. It appears that the underlying cause is that one of
the tests, dep-info-custom, recursively invokes make but the RUSTC variable
passed down has the string "$LD_LIBRARY_PATH". This is intended to read the
host's original LD_LIBRARY_PATH, but it appears that the makefile is eagerly
expanding the "$L" to nothing, causing the original host's LD_LIBRARY_PATH to be
ignored.

This fix removes passing the string "$LD_LIBRARY_PATH" and rather expands it
eagerly to ensure that escaping doesn't happen at a later stage. I'm still not
entirely sure why the makefile is interpreting the dollar as a variable, but
this seems to fix the issue.
2014-06-18 13:50:45 -07:00
bors
410d70b5af auto merge of #14992 : nathantypanski/rust/collect-docs, r=huonw
This updates the documentation for result::collect() and
option::collect() to use the new-style syntax for owned pointers and
vectors.

closes #14991
2014-06-18 05:26:38 +00:00
Nathan Typanski
feceb1276e change ~[] -> Vec for collect()
This updates the documentation for result::collect() and
option::collect() to use the new-style syntax for vectors, instead of
the old ~[].

Also updates the code blocks for these docs so they will be tested
automatically.

closes #14991
2014-06-17 23:45:34 -04:00
bors
d6736a1440 auto merge of #14880 : SimonSapin/rust/byte-literals, r=alexcrichton
See #14646 (tracking issue) and rust-lang/rfcs#69.

This does not close the tracking issue, as the `bytes!()` macro still needs to be removed. It will be later, after a snapshot is made with the changes in this PR, so that the new syntax can be used when bootstrapping the compiler.
2014-06-18 02:06:37 +00:00
bors
5c81a186e9 auto merge of #14869 : nick29581/rust/tstore, r=nmatsakis
Use ty_rptr/ty_uniq(ty_trait) rather than TraitStore to represent trait types.
Also addresses (but doesn't close) #12470.
Part of the work towards DST (#12938).
2014-06-18 00:16:37 +00:00
Simon Sapin
3744d82851 Fix expected error message in a test.
The change is a result of the char/string parsing refactor.
2014-06-18 00:47:20 +02:00
bors
1bb42e557c auto merge of #14956 : nathantypanski/rust/master, r=alexcrichton
Closes #14329

Recent-ish uses of `find_linkage_metas` from my `git grep` output are [here](https://gist.github.com/nathantypanski/b9d2d453718a22765f5c), for those interested who wish to tread through the history.
2014-06-17 22:31:41 +00:00
Nick Cameron
8e7213f65b Remove TraitStore from ty_trait
Use ty_rptr/ty_uniq(ty_trait) rather than TraitStore to represent trait types.
Also addresses (but doesn't close) #12470.
Part of the work towards DST (#12938).

[breaking-change] lifetime parameters in `&mut trait` are now invariant. They used to be contravariant.
2014-06-18 10:30:33 +12:00
Simon Sapin
8de2618182 Fix some violations of stronger guarantees for mutable borrows.
See 159e27aebb
2014-06-18 00:15:24 +02:00
Simon Sapin
612bbaf7a0 Refactor backslash-escape parsing to share similar code.
Move into a new syntax::parse::lexer::StringReader method the code
that was almost duplicated for parsing backslash-escapes in
byte, byte string, char, and string literals.
2014-06-17 23:49:53 +02:00
Simon Sapin
3a52a8a8b8 Document the byte, byte string, and raw byte string literals. 2014-06-17 23:43:18 +02:00
Simon Sapin
b8a4c1415b Add br##"xx"## raw byte string literals. 2014-06-17 23:43:18 +02:00
Simon Sapin
d7e01b5809 Add a b"xx" byte string literal of type &'static [u8]. 2014-06-17 23:43:18 +02:00
Simon Sapin
bccdba0296 Add a b'x' byte literal of type u8. 2014-06-17 23:41:03 +02:00
bors
ed3308098c auto merge of #14977 : pcwalton/rust/address-insignificant-reform, r=brson
`#[inline(never)]` is used.

Closes #8958.

This can break some code that relied on the addresses of statics
being distinct; add `#[inline(never)]` to the affected statics.

[breaking-change]

r? @brson
2014-06-17 20:41:38 +00:00
bors
2fd618e77a auto merge of #14976 : luqmana/rust/focwtc, r=pcwalton
Fixes #14959.
2014-06-17 18:56:35 +00:00
Patrick Walton
cad760b770 librustc: Make addresses of immutable statics insignificant unless
`#[inline(never)]` is used.

Closes #8958.

This can break some code that relied on the addresses of statics
being distinct; add `#[inline(never)]` to the affected statics.

[breaking-change]
2014-06-17 11:44:00 -07:00
Luqman Aden
8827395a3a librustc: Check regions for overloaded calls. 2014-06-17 14:27:37 -04:00
bors
db298145c7 auto merge of #14957 : alexcrichton/rust/rustdoc-fixups, r=huonw
Fixing some of rustdoc's rendering to use newer syntaxes rather than older
syntaxes.
2014-06-17 16:26:33 +00:00
Alex Crichton
7b42e3851c rustdoc: Remove outdated syntax
Fixing some of rustdoc's rendering to use newer syntaxes rather than older
syntaxes.
2014-06-17 08:23:15 -07:00
bors
acc944a35c auto merge of #14970 : nkoep/rust/patch-1, r=huonw
Compiling a crate with `rustc --crate-type=lib` produces an rlib file, not a shared object. The latter is only produced for `--crate-type=dylib`.
2014-06-17 13:36:35 +00:00
Niklas Koep
7fec86b5e2 tutorial.md: tiny correction for --crate-type=lib
Compiling a crate with `rustc --crate-type=lib` produces an rlib file, not a shared object. The latter is only produced for `--crate-type=dylib`.
2014-06-17 15:28:59 +02:00
bors
feb294ca11 auto merge of #14818 : tomjakubowski/rust/emacs-attributes-key-value, r=pnkfelix
This addresses two problems noted in #14347: the highlight of `#foo]` as an attribute, and the non-highlight of `#[foo = "bar"]`.
2014-06-17 08:16:27 +00:00
bors
9f8d2205f0 auto merge of #14945 : alexcrichton/rust/issue-14940, r=brson
This just takes a similar approach to reading stdin on windows by artificially
limiting the size of the buffers going in and out.

Closes #14940
2014-06-17 06:31:28 +00:00
Alex Crichton
d400563e17 std: Chunk writing to stdout on windows
This just takes a similar approach to reading stdin on windows by artificially
limiting the size of the buffers going in and out.

Closes #14940
2014-06-16 22:12:15 -07:00
Nathan Typanski
b68fa1ad5e libsyntax: remove dead code find_linkage_metas
Closes #14329
2014-06-17 00:54:03 -04:00
bors
79fca99438 auto merge of #14947 : zwarich/rust/check-loans-not-restrictions, r=nikomatsakis
Now that features like `const` are gone, we can remove the concept of restrictions from borrowck and just track loans and their restricted paths.
2014-06-17 04:46:26 +00:00
bors
09967665ea auto merge of #14955 : alexcrichton/rust/rollup, r=alexcrichton 2014-06-17 02:51:53 +00:00
Alex Crichton
b9adb6c717 Test fixes from rollup
Closes #14888 (Allow disabling jemalloc as the memory allocator)
Closes #14905 (rustc: Improve span for error about using a method as a field.)
Closes #14920 (Fix #14915)
Closes #14924 (Add a Syntastic plugin for Rust.)
Closes #14935 (debuginfo: Correctly handle indirectly recursive types)
Closes #14938 (Reexport `num_cpus` in `std::os`. Closes #14707)
Closes #14941 (std: Don't fail the task when a Future is dropped)
Closes #14942 (rustc: Don't mark type parameters as exported)
Closes #14943 (doc: Fix a link in the FAQ)
Closes #14944 (Update "use" to "uses" on ln186)
Closes #14949 (Update repo location)
Closes #14950 (fix typo in the libc crate)
Closes #14951 (Update Sublime Rust github link)
Closes #14953 (Fix --disable-rpath and tests)
2014-06-16 19:05:08 -07:00
Alex Crichton
375c5b884f Fix --disable-rpath and tests
This involved a few changes to the local build system:

* Makefiles now prefer our own LD_LIBRARY_PATH over the user's LD_LIBRARY_PATH
  in order to support building rust with rust already installed.
* The compiletest program was taught to correctly pass through the aux dir as a
  component of LD_LIBRARY_PATH in more situations.

This change was spliced out of #14832 to consist of just the fixes to running
tests without an rpath setting embedded in executables.
2014-06-16 18:16:45 -07:00
Christopher Bergqvist
56d7bbe263 Update Sublime Rust github link
Package switched maintainer from dbp to jhasse as stated in the README.md at the old link.
2014-06-16 18:16:42 -07:00
Daniel Micay
6dd6ddd9b9 fix typo in the libc crate 2014-06-16 18:16:40 -07:00
Brian Anderson
f4ae8a83f9 Update repo location 2014-06-16 18:16:36 -07:00
theptrk
e1971dd35a Update "use" to "uses" ln186 2014-06-16 18:16:32 -07:00
Alex Crichton
ebac770abb doc: Fix a link in the FAQ
Closes #14914
2014-06-16 18:16:29 -07:00
Alex Crichton
accb442b38 rustc: Don't mark type parameters as exported
This ends up causing the privacy pass to get all confused, and there's nothing
inherently exported about them anyway.

Closes #14933
2014-06-16 18:16:28 -07:00
Alex Crichton
01dc27a219 std: Don't fail the task when a Future is dropped
It's a benign failure that no one needs to know about.

Closes #14892
2014-06-16 18:16:14 -07:00
Jorge Aparicio
0439162d59 Move num_cpus from std::rt::util to std::os. Closes #14707 2014-06-16 18:16:12 -07:00
Michael Woerister
88e1576190 debuginfo: Correctly handle indirectly recursive types.
So far handling some indirectly recursive types, such as pointer types, has relied on LLVM metadata uniquing in a very implicit way. This could cause some inconsistencies in the debuginfo, and sometimes to hard to trace LLVM assertions.
With this commit unique type IDs and the TypeMap are used to explicitly make sure that no inconsistencies exist, and, if in the future some regression re-introduces one, give a better error message instead of the hard-to-interpret LLVM error.
2014-06-16 18:16:10 -07:00
Andrew Gallant
b5d9e941f5 Add a Syntastic plugin for Rust. 2014-06-16 18:16:05 -07:00
John Schmidt
ebde8cfa61 Change prints: @T -> Gc<T> , ~T -> Box<T>
Fixes #14915
2014-06-16 18:16:01 -07:00
Kevin Butler
9945052e64 rustc: Improve span for error about using a method as a field.
libsyntax: ExprField now contains a SpannedIdent rather than Ident.

[breaking-change]
2014-06-16 18:15:54 -07:00
Alex Crichton
051abae802 alloc: Refactor OOM into a common routine 2014-06-16 18:15:48 -07:00
Alex Crichton
4cd932f94e alloc: Allow disabling jemalloc 2014-06-16 18:15:48 -07:00
Alex Crichton
7613c9dd59 alloc: Format heap.rs to 80-char max 2014-06-16 18:15:48 -07:00
bors
cc30abbcad auto merge of #14855 : TeXitoi/rust/relicense-shootout-binarytrees, r=brson
Everyone agreed.

Related to #14248, close #14720

@brson OK?
2014-06-17 01:01:55 +00:00
bors
ad7508e39c auto merge of #14852 : TeXitoi/rust/relicense-shootout-pidigits, r=brson
Everyone agreed.

Related to #14248, close #14718

@brson OK?
2014-06-16 23:11:46 +00:00
Cameron Zwarich
480cd6fb90 Rename check_for_assignment_to_restricted_or_frozen_location
Rename check_for_assignment_to_restricted_or_frozen_location to
check_for_assignment_to_borrowed_path.
2014-06-16 15:40:21 -07:00
Cameron Zwarich
a924d740df Switch to each_in_scope_loan_affecting_path
The last remaining use of each_in_scope_restriction in
check_for_assignment_to_restricted_or_frozen_location is using the
pattern captured by each_in_scope_loan_affecting_path, so it can be
removed.
2014-06-16 15:40:21 -07:00
Cameron Zwarich
69f4839b92 Always check assigned loan paths to the top of the path
Currently, check_for_assignment_to_restricted_or_frozen_location bails
out early when looking for loaned base paths when it hits an McDeclared
or McImmutable extension. With the current type system, this is actually
irrelevant, since mutation can only occur given a unique mutable access
path, forcing the same requirement on each base path.
2014-06-16 15:40:20 -07:00