Commit Graph

29930 Commits

Author SHA1 Message Date
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
Kevin Butler
207bfee214 rustc: Add self/super hint for extern crate resolve errors. 2014-06-17 22:08:56 +01: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
Cameron Zwarich
178c4fbccb Remove an unused return value
The only caller of check_for_assignment_to_restricted_or_frozen_location
isn't checking its return value, so we can remove it and simplify the
internal logic of the function.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
702ef1b721 Call mark_variable_as_used_mut even after assignment errors
It doesn't actually matter if we call mark_variable_as_used_mut when the
assignment was invalid, since the variable was still used mutably.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
ba203c5c5d Add a new each_in_scope_loan_affecting_path helper function
Add a helper function that generalizes the loan path restriction
strategy used by analyze_restrictions_on_use.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
e018fc36d1 Remove Restriction
The Restriction struct now consists of a single Rc<LoanPath> field, so
it can be replaced with Rc<LoanPath>.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
59309e0d9b Remove RestrictionSet
Now that RestrictionSet is no longer being used for anything meaningful,
it can be removed, along with any other associated functions and
RestrictionSet fields of other types.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
9934759195 Remove an unused bkcerr_code constructor parameter
The RestrictionSet parameter of the err_borrowed_pointer_too_short
constructor isn't  actually used, so it can be removed.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
6849362f38 Remove the last actual usage of RestrictionSet
Switch to checking BorrowKind values of loans instead of their
RestrictionSet values. This was the last code that made a decision
based on a RestrictionSet.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
6ca8dbfaed Make a new compatible_borrow_kinds helper function
Move the `incompatible` helper function from analyze_restrictions_on_use
to the file scope and invert its meaning to account for future uses.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
d2ca7465aa Remove an unused closure parameter
Remove the unused &Restriction parameter of each_in_scope_restriction's
op parameter.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
2d3f122534 Remove a pointless check for intersection with RESTR_MUTATE
Now that all loans restrict mutation, there's no point in checking for
intersection with RESTR_MUTATE.
2014-06-16 15:40:20 -07:00
Cameron Zwarich
2f77212e0c Remove comments that no longer apply after the removal of const 2014-06-16 15:40:20 -07:00