Commit Graph

27647 Commits

Author SHA1 Message Date
Brian Anderson
545f012527 rustc: Fix detection of lib64 directory
Instead of just looking for its presence we need to see if it actually
contains rust stuffs.
2014-03-26 19:21:23 -07:00
Brian Anderson
c060e2e515 install: Don't allow installation over the install files 2014-03-26 18:52:23 -07:00
bors
c83994e0f4 auto merge of #13145 : alexcrichton/rust/flip-some-defaults, r=brson
This change prepares `rustc` to accept private fields by default. These changes will have to go through a snapshot before the rest of the changes can happen.
2014-03-26 16:37:03 -07:00
Brian Anderson
92d0ec2ec7 install: name the bundled manifest 'manifest.in'. Cleanup
The installed manifest is a different file, so they should have
different names. This should prevent various wierd conflicts in the future.
2014-03-26 14:59:08 -07:00
Alex Crichton
8118406ecf syntax: Tweak parsing bounds on generics paths
The previous syntax was `Foo:Bound<trait-parameters>`, but this is a little
ambiguous because it was being parsed as `Foo: (Bound<trait-parameters)` rather
than `Foo: (Bound) <trait-parameters>`

This commit changes the syntax to `Foo<trait-parameters>: Bound` in order to be
clear where the trait parameters are going.

Closes #9265
2014-03-26 14:51:41 -07:00
bors
533a526327 auto merge of #13152 : huonw/rust/wtf-are-things-in-spans, r=alexcrichton
Add some docs to ExpnInfo. Add a single overlooked `new_span` call to the folder (I'm pretty sure nothing reads this span, though, so it's probably pointless).
2014-03-26 13:36:52 -07:00
bors
2c71cdf64b auto merge of #13071 : ktt3ja/rust/deterministic-lifetime-suggestion, r=cmr
Close #13057
2014-03-26 10:26:55 -07:00
Alex Crichton
7de48419ee syntax: Permit visibility on tuple fields
This change is in preparation for #8122. Nothing is currently done with these
visibility qualifiers, they are just parsed and accepted by the compiler.

RFC: 0004-private-fields
2014-03-26 10:20:15 -07:00
Alex Crichton
104aaa44e8 rustc: Relax restriction on privacy for fields
This is a necessary change in preparation for switching the defaults as part
of #8122.

RFC: 0004-private-fields
2014-03-26 10:20:12 -07:00
Felix S. Klock II
0cbb1ceaa9 Add test using early-bound lifetimes in trait generic parameters. 2014-03-26 17:57:02 +01:00
Felix S. Klock II
ab8e02616c Fix Repr impl for method::Candidate to include the method_ty. 2014-03-26 17:57:02 +01:00
Felix S. Klock II
6b5ca8b1aa Fix #13140: Early/Late Bound related ICEs.
The problem was that we need to apply the substitution, so that the
formal lifetime parameters get replaced with (unifiable)
free-lifetimes that can actually be fed into the constraint solver.

Also, refactor code os that substitution for `check_item` and
`check_method`, moving both down the control flow into `check_bare_fn`.

----

Finally, there was another (similar) spot where we needed to
substitute early-bound lifetimes when invoking an object method of a
trait.
2014-03-26 17:54:49 +01:00
Alex Crichton
e12fda1c6e bench: Put the spawn bench back on libgreen
This bench is meant to exercise libgreen, not libnative. It recently caused the
auto-linux-32-nopt-t bot to fail as no output was produced for an hour.
2014-03-26 09:18:49 -07:00
bors
5da14c08a9 auto merge of #13135 : alexcrichton/rust/dox, r=alexcrichton
I touched up the documentation from @pcwalton found in #12952.
2014-03-26 09:11:57 -07:00
Tomas Sedovic
4d6c47bcce Derive TotalEq for std::intrinsics::TypeId
HashMap and HashSet require keys to implement TotalEq. This makes it possible to use TypeId as a HashMap key again.
2014-03-26 15:43:01 +01:00
Huon Wilson
6419848e66 syntax: add a missing span rewrite in fold.
This was leaving Decls without the new spans; this is a minor change,
since literally nothing reads in the code base reads the span of a Decl
itself, always just its contents.
2014-03-27 01:19:07 +11:00
Huon Wilson
85ff90c86c syntax: add a some docs/clarification to the fields of ExpnInfo. 2014-03-27 01:19:07 +11:00
bors
0908ffa660 auto merge of #13134 : alexcrichton/rust/freebsd-libm, r=thestinger
Apparently we had forgotten to do this for freebsd, causing possible problems
on FreeBSD 10. The discussion in #12324 has some more details about how it's
missing.
2014-03-26 04:16:52 -07:00
bors
82c8cb2abf auto merge of #13133 : alexcrichton/rust/issue-13130, r=brson
The libuv fs wrappers are very thin wrappers around the syscalls they correspond
to, and a notable worrisome case is the write syscall. This syscall is not
guaranteed to write the entire buffer provided, so we may have to continue
calling uv_fs_write if a short write occurs.

Closes #13130
2014-03-26 03:01:56 -07:00
bors
de85948ac0 auto merge of #13117 : alexcrichton/rust/no-crate-map, r=brson
This can be done now that logging has been moved out and libnative is the default (not libgreen)
2014-03-26 01:41:57 -07:00
Brian Anderson
ce1e48a52b install: Support --libdir and --mandir correctly
This adds a hack to rustc to make it find the library directory
regardless of whether it is named lib/lib64/lib32.
2014-03-25 23:57:39 -07:00
bors
6bac5607c9 auto merge of #13039 : Kimundi/rust/iter_by_value_extend, r=alexcrichton
# Summary 
Changed `iter::Extendable` and `iter::FromIterator` to take a `Iterator` by value.
These functions always exhaust the passed `Iterator`, and are often used for transferring the values of a new `Iterator` directly into a data structure, so using them usually require the use of the `&mut` operator:

```
foo.extend(&mut bar.move_iter()); // Transfer content from bar into foo

let mut iter = ...;
foo.extend(&mut iter); // iter is now empty
```
This patch changes both the `FromIterator` and `Extendable` traits to take the iterator by value instead, which makes the common case of using these traits less heavy:

```
foo.extend(bar.move_iter()); // Transfer content from bar into foo

let iter = ...;
foo.extend(iter);
// iter is now inaccessible if it moved
// or unchanged if it was Pod and copied.
```
# Composability
This technically makes the traits less flexible from a type system pov, because they now require ownership. 

However, because `Iterator` provides the `ByRef` adapter, there is no loss of functionality:
```
foo.extend(iter.by_ref()); // Same semantic as today, for the few situations where you need it.
```

# Motivation
This change makes it less painful to use iterators for shuffling values around between collections, which makes it more acceptable to always use them for this, enabling more flexibility.

For example, `foo.extend(bar.move_iter())` can generally be the fastest way to append an collections content to another one, without both needing to have the same type. Making this easy to use would allow the removal of special cased methods like `push_all()` on vectors. (See https://github.com/mozilla/rust/issues/12456)

I opened https://github.com/mozilla/rust/issues/13038 as well, to discuss this change in general if people object to it.

# Further work
This didn't change the `collect()` method to take by value `self`, nor any of the other adapters that also exhaust their iterator argument. For consistency this should probably happen in the long term, but for now this is too much trouble, as every use of them would need to be checked for accidentally changed semantic by going `&mut self -> self`. (which allows for the possibility that a `Pod` iterator got copied instead of exhausted without generating a type error by the change)
2014-03-25 23:41:57 -07:00
bors
e28f081cc2 auto merge of #13106 : CLUSTERfoo/rust/docs/labelled_breaks, r=brson
* Include tip given by Leo Testard in mailing list about labeled `break`
and `continue`:
https://mail.mozilla.org/pipermail/rust-dev/2014-March/009145.html
* cross-reference named lifetimes in tutorial -> lifetimes guide
* Broke named lifetimes section into two sub-sections.
* Added mention of `'static` lifetime.
2014-03-25 21:51:58 -07:00
Brian Anderson
380fe976c8 mk: Fix deps for prepare host tools 2014-03-25 21:35:10 -07:00
Brian Anderson
00f7776daa mk: Make nightlyism a configure option 2014-03-25 21:35:10 -07:00
Brian Anderson
d252539990 mk: Rename CFG_COMPILER to CFG_COMPILER_HOST_TRIPLE
Much clearer
2014-03-25 21:35:10 -07:00
Brian Anderson
f772e31d64 rustc: Stop relying on CFG_LIBDIR_RELATIVE
This is not sufficient for finding the library directory for binary
installs, but it does make the build more complex by requiring
env vars be set to build rustc.
2014-03-25 21:35:10 -07:00
Brian Anderson
6f9b30c6c1 configure: Make rustlibdir non-configurable
Trying to reduce the complexity of installation
2014-03-25 21:35:10 -07:00
Brian Anderson
e509cd6e2b Revert "Revert "mk: Run 'make install' through install.sh""
This reverts commit d62163188a.

Conflicts:
	mk/install.mk
2014-03-25 21:35:10 -07:00
Brian Anderson
ff17b7c099 mk: Remove leading './' from manifest entries 2014-03-25 21:35:10 -07:00
Brian Anderson
0063504fe5 rustdoc: Display rust logo again. Closes #13148 2014-03-25 20:28:41 -07:00
bors
60531025ab auto merge of #13141 : brson/rust/fix-make-install, r=cmr 2014-03-25 17:16:59 -07:00
Alex Crichton
47093648a7 mk: Use rwildcard to calculate dependent files
The previous dependency calculation was based on an arbitrary set of asterisks
at an arbitrary depth, but using the recursive version should be much more
robust in figuring out what's dependent.

Closes #13118
2014-03-25 15:50:36 -07:00
Brian Anderson
1f35f834be mk: Fix 'make install'. Closes #13128 2014-03-25 15:27:47 -07:00
bors
d130d8798d auto merge of #12961 : cmr/rust/rustdoc-impls, r=alexcrichton
Rendered form available at http://docs.octayn.net/doc/

This moves derived impls to the bottom of the list, separate from the rest,
and collapses default methods that aren't overridden into an expandible
accordion.
2014-03-25 13:51:52 -07:00
Marvin Löbel
6200e761f0 Changed iter::Extendable and iter::FromIterator to take a Iterator by value 2014-03-25 21:49:55 +01:00
Corey Richardson
1f937fa79e rustdoc: render derived impls separately 2014-03-25 15:32:27 -04:00
Corey Richardson
e88387a947 rustdoc: add some docs for item types 2014-03-25 15:01:27 -04:00
Corey Richardson
6f6b099f5d rustdoc: html: use raw strings for great justice 2014-03-25 15:01:27 -04:00
bors
de4473201a auto merge of #13070 : huonw/rust/share-doc, r=alexcrichton
std: expand the `Share` docs to make them more precise.

And give some examples about exactly what's `Share` and what's not.
2014-03-25 10:46:57 -07:00
Alex Crichton
fad77175e1 std: Touch various I/O documentation blocks
These are mostly touchups from the previous commit.
2014-03-25 10:27:24 -07:00
Patrick Walton
a424e84a3e libstd: Document the following modules:
* native::io
* std::char
* std::fmt
* std::fmt::parse
* std::io
* std::io::extensions
* std::io::net::ip
* std::io::net::udp
* std::io::net::unix
* std::io::pipe
* std::num
* std::num::f32
* std::num::f64
* std::num::strconv
* std::os
2014-03-25 10:12:49 -07:00
Alex Crichton
d1f8fb26f5 std: Explicitly link to libm for freebsd
Apparently we had forgotten to do this for freebsd, causing possible problems
on FreeBSD 10. The discussion in #12324 has some more details about how it's
missing.
2014-03-25 09:47:22 -07:00
Alex Crichton
5fddb4280e rustuv: Handle short writes in uv_fs_write
The libuv fs wrappers are very thin wrappers around the syscalls they correspond
to, and a notable worrisome case is the write syscall. This syscall is not
guaranteed to write the entire buffer provided, so we may have to continue
calling uv_fs_write if a short write occurs.

Closes #13130
2014-03-25 09:37:36 -07:00
bors
1f5571abc2 auto merge of #13122 : sstewartgallus/rust/cleanup-10734-workarounds, r=alexcrichton
Cleanup old issue references. One of these workarounds no longer need to be used anymore and the others are out of date.
2014-03-25 06:36:55 -07:00
Huon Wilson
e9475b57be std: expand the Share docs to make them more precise.
And give some examples about exactly what's `Share` and what's not.
2014-03-26 00:25:17 +11:00
bors
5d5634ace0 auto merge of #13083 : FlaPer87/rust/issue-13005-borrow-unsafe-static, r=nikomatsakis
It was possible to borrow unsafe static items in static initializers.
This patch implements a small `Visitor` that walks static initializer's
expressions and checks borrows aliasability.

Fixes #13005

cc @nikomatsakis r?
2014-03-25 03:01:48 -07:00
bors
b1091c3141 auto merge of #13063 : brson/rust/dist, r=alexcrichton
Several things here:

* Cleanup
* Fix build targets for building .pkg so that it works and works for all hosts
* Adds support for nightly artifacts
* Put docs in a location suitable for upload to s3 during 'make dist'
* Add coverage of unix binary installers to 'distcheck'
* Fix 'distcheck'
* Change 'dist' to build source tarballs, binary tarballs and OS X packages
2014-03-25 00:01:52 -07:00
bors
1e6e98c0c2 auto merge of #12991 : alexcrichton/rust/sync-chan, r=brson
This commit contains an implementation of synchronous, bounded channels for
Rust. This is an implementation of the proposal made last January [1]. These
channels are built on mutexes, and currently focus on a working implementation
rather than speed. Receivers for sync channels have select() implemented for
them, but there is currently no implementation of select() for sync senders.

Rust will continue to provide both synchronous and asynchronous channels as part
of the standard distribution, there is no intent to remove asynchronous
channels. This flavor of channels is meant to provide an alternative to
asynchronous channels because like green tasks, asynchronous channels are not
appropriate for all situations.

[1] - https://mail.mozilla.org/pipermail/rust-dev/2014-January/007924.html
2014-03-24 21:56:50 -07:00
Alex Crichton
56cae9b3c0 comm: Implement synchronous channels
This commit contains an implementation of synchronous, bounded channels for
Rust. This is an implementation of the proposal made last January [1]. These
channels are built on mutexes, and currently focus on a working implementation
rather than speed. Receivers for sync channels have select() implemented for
them, but there is currently no implementation of select() for sync senders.

Rust will continue to provide both synchronous and asynchronous channels as part
of the standard distribution, there is no intent to remove asynchronous
channels. This flavor of channels is meant to provide an alternative to
asynchronous channels because like green tasks, asynchronous channels are not
appropriate for all situations.

[1] - https://mail.mozilla.org/pipermail/rust-dev/2014-January/007924.html
2014-03-24 20:06:37 -07:00