Commit Graph

34412 Commits

Author SHA1 Message Date
Aaron Turon
32c3d02780 Disable dubious pipe test 2014-11-20 17:19:25 -08:00
Aaron Turon
86992b6437 Loosen possibly bogus constraints in backtrace test 2014-11-20 17:19:24 -08:00
Aaron Turon
243bfc277e Fallout from namespaced enums 2014-11-20 17:19:24 -08:00
Aaron Turon
b3d4379042 Fallout from new termination semantics 2014-11-20 17:19:24 -08:00
Aaron Turon
6987ad22e4 Make most of std::rt private
Previously, the entire runtime API surface was publicly exposed, but
that is neither necessary nor desirable. This commit hides most of the
module, using librustrt directly as needed. The arrangement will need to
be revisited when rustrt is pulled into std.

[breaking-change]
2014-11-20 17:19:24 -08:00
Aaron Turon
40c78ab037 Fallout from libgreen and libnative removal 2014-11-20 17:19:24 -08:00
Aaron Turon
a68ec98166 Rewrite sync::mutex as thin layer over native mutexes
Previously, sync::mutex had to split between green and native runtime
systems and thus could not simply use the native mutex facility.

This commit rewrites sync::mutex to link directly to native mutexes; in
the future, the two will probably be coalesced into a single
module (once librustrt is pulled into libstd wholesale).
2014-11-20 17:19:24 -08:00
Aaron Turon
91a2c0d512 Remove libgreen
With runtime removal complete, there is no longer any reason to provide
libgreen.

[breaking-change]
2014-11-20 17:19:24 -08:00
Aaron Turon
3ee916e50b Remove libnative
With runtime removal complete, there's nothing left of libnative. This
commit removes it.

Fixes #18687

[breaking-change]
2014-11-20 17:19:13 -08:00
Aaron Turon
ad022b1a1b Remove Runtime trait
This commit removes most of the remaining runtime infrastructure related
to the green/native split. In particular, it removes the `Runtime` trait
and instead inlines the native implementation.

Closes #17325

[breaking-change]
2014-11-20 17:19:13 -08:00
bors
9830051607 auto merge of #18441 : mdinger/rust/literals, r=steveklabnik
Closes #18415

This links [`std::str`](http://doc.rust-lang.org/std/str/index.html) documentation to [literals](http://doc.rust-lang.org/reference.html#literals) in the reference guide and collects examples of literals into one group at the beginning of the section. ~~The new tables are not exhaustive (some escapes were skipped) and so I try to link back to the respective sections where more detail is located.~~ The tables are are mostly exhaustive. I misunderstood some of the whitespace codes.

I don't think the tables actually look that nice if that's important and I'm not sure how it could be improved. I think it does do a good job of collecting available options together. I think listing the escapes together is particularly helpful because they vary with type and are embedded in paragraphs.

[EDIT]
The [ascii table](http://man-ascii.com/) is here and may be useful.
2014-11-21 01:06:47 +00:00
Cody P Schafer
12749fc8ec mk/rt: use CFG_LLVM_TARGET instead of plain target when calling llc
We add CFG_LLVM_TARGET_$(target) (which can be defined in any of the
mk/cfg/* files) and supply a default to the plain target name

CFG_LLVM_TARGET mirrors the value of llvm_target (aka llvm-target) in
the librustc_back runtime target specification.
2014-11-20 18:34:10 -05:00
bors
770378a313 auto merge of #18773 : subhashb/rust/convert_remaining_failures_to_panic, r=steveklabnik
I have also renamed `fail` to `panic` in some non-documentation comments, where I thought it mattered.
Fixes #18677 

cc @steveklabnik
2014-11-20 23:02:01 +00:00
Alexander Light
26107f6181 rustdoc: Allow private modules be included in docs
Made it so that what passes are used is passed onto the renderer so it
can intelligently deal with private modules.
2014-11-20 17:02:58 -05:00
mdinger
16bb4e6400 Add examples for all literal types in reference grouped together 2014-11-20 16:05:33 -05:00
Cody P Schafer
9c320dd7af configure: silence warning about LOCAL_RUST_ROOT being set
We have a default value for this ('/usr/local'), so this warning is
printed ALL the time unless one does --enable-local-rust. As a result,
it doesn't really help at all.
2014-11-20 16:00:12 -05:00
Cody P Schafer
bc5a139baa rustdoc: avoid supplying a bad default sysroot so the librustc code can calculate it properly 2014-11-20 16:00:12 -05:00
Cody P Schafer
29cc7c2adf mk/target: fix typo so we depend on the correct directory
Without this, if we we're using a non-standard host libdir, the target
bindir would not exist (and rustc would fail to write to the
non-existent directory).
2014-11-20 16:00:12 -05:00
Cody P Schafer
aa58d534e5 mk/stage0: complain instead of creating an empty file
If the expected rustc snapshot is not where we expect it to be,
complain and fail at that point rather than creating a empty rustc file
and continuing until we try to run it.
2014-11-20 16:00:12 -05:00
Jakub Bukaj
0524161c0b Fix an ICE on diagnostics originating in external macros 2014-11-20 21:31:59 +01:00
Aaron Turon
bab9564280 libs: make Cow usable, improve documentation
This commit makes `Cow` more usable by allowing it to be applied to
unsized types (as was intended) and providing some basic `ToOwned`
implementations on slice types. It also corrects the documentation for
`Cow` to no longer mention `DerefMut`, and adds an example.
2014-11-20 12:00:07 -08:00
Manish Goregaokar
f85f971e44 Mention that find() doesn't consume the full iterator 2014-11-21 01:15:56 +05:30
bors
d13aff1224 auto merge of #18750 : nikomatsakis/rust/issue-18333-skolemize-open-existential, r=nrc
In the general case, at least, it is not possible to make an object out of an unsized type. This is because the object type would have to store the fat pointer information for the `self` value *and* the vtable -- meaning it'd have to be a fat pointer with three words -- but for the compiler to know that the object requires three words, it would have to know the self-type of the object (is `self` a thin or fat pointer?), which of course it doesn't.

Fixes #18333.

r? @nick29581
2014-11-20 19:26:40 +00:00
mdinger
c8106a016f Link std::str to reference literals section 2014-11-20 14:10:25 -05:00
Subhash Bhushan
bc9de771d5 Rename remaining Failures to Panic 2014-11-20 23:45:42 +05:30
Jonathan S
07af6f0f43 Implement BorrowFrom<&'a T> for T (with mutable variants) 2014-11-20 10:34:54 -06:00
bors
96c8f2b0c1 auto merge of #19071 : huonw/rust/col2column, r=nikomatsakis
This macro is very rarely used, so there is no need (and it is better)
for it to avoid the abbreviation.

Closes rust-lang/rfcs#467.
2014-11-20 16:02:03 +00:00
Niko Matsakis
7a372e23cb Require that objects can only be made from Sized types. Fixes #18333. 2014-11-20 09:16:20 -05:00
Simon Sapin
dff48a99d6 Add Utf16Encoder. Generalize Utf16CodeUnits for any Iterator<char>.
This allows encoding to UTF-16 something that is not in UTF-8, e.g. a
`[char]` UTF-32 string.

This might help with https://github.com/servo/servo/issues/4023
2014-11-20 14:05:28 +00:00
bors
394269d16e auto merge of #19033 : pnkfelix/rust/fsk-introduce-scopedata-via-refactor, r=nikomatsakis
(Previously, scopes were solely identified with NodeId's; this
refactoring prepares for a future where that does not hold.)

Ground work for a proper fix to #8861.
2014-11-20 14:01:51 +00:00
Felix S. Klock II
5ff9087e05 Refactored new CodeExtent type for improved abstraction.
(Previously, statically identifiable scopes/regions were solely
identified with NodeId's; this refactoring prepares for a future
where that 1:1 correspondence does not hold.)
2014-11-20 13:10:03 +01:00
bors
1d81776209 auto merge of #19113 : nikomatsakis/rust/unboxed-boxed-closure-unification, r=acrichto
Use the expected type to infer the argument/return types of unboxed closures. Also, in `||` expressions, use the expected type to decide if the result should be a boxed or unboxed closure (and if an unboxed closure, what kind).

This supercedes PR #19089, which was already reviewed by @pcwalton.
2014-11-20 12:01:44 +00:00
Tobias Bucher
f9f5c03026 Add comment on why RefCell::unwrap is safe 2014-11-20 12:28:32 +01:00
bors
b825b3496a auto merge of #18638 : aturon/rust/as_slice_dst, r=japaric
This PR changes `AsSlice` to work on unsized types, and changes the
`impl` for `&[T]` to `[T]`. Aside from making the trait more general,
this also helps some ongoing work with method resolution changes.

This is a breaking change: code that uses generics bounded by `AsSlice`
will have to change. In particular, such code previously often took
arguments of type `V` where `V: AsSlice<T>` by value. These should now
be taken by reference:

```rust
fn foo<Sized? V: AsSlice<T>>(v: &V) { .. }
```

A few std lib functions have been changed accordingly.

The PR also relaxes constraints on generics and traits within the
`core::ops` module and for the `Equiv` trait.

[breaking-change]

r? @nikomatsakis 
cc @japaric
2014-11-20 10:01:42 +00:00
Alfie John
e87894ef04 doc: adding example for type definitions 2014-11-20 09:44:57 +00:00
Huon Wilson
3f3b2d6b7e Rename col! to column!.
This macro is very rarely used, so there is no need (and it is better)
for it to avoid the abbreviation.

Closes rust-lang/rfcs#467.

[breaking-change]
2014-11-20 20:18:21 +11:00
Aaron Turon
c287afb2fa libcore: DSTify ops traits, Equiv
This commit relaxes constraints on generics and traits within the
`core::ops` module and for the `Equiv` trait.
2014-11-20 00:05:00 -08:00
Aaron Turon
004db80afe libcore: DST-ify AsSlice
This commit changes `AsSlice` to work on unsized types, and changes the
`impl` for `&[T]` to `[T]`. Aside from making the trait more general,
this also helps some ongoing work with method resolution changes.

This is a breaking change: code that uses generics bounded by `AsSlice`
will have to change. In particular, such code previously often took
arguments of type `V` where `V: AsSlice<T>` by value. These should now
be taken by reference:

```rust
fn foo<Sized? V: AsSlice<T>>(v: &V) { .. }
```

A few std lib functions have been changed accordingly.

[breaking-change]
2014-11-20 00:05:00 -08:00
Davis Silverman
fb67b05506 Removed unneeded conversion to a slice.
Vec<T> can index now so its a useless conversion.
2014-11-20 01:34:14 -05:00
NODA, Kai
102b1a5bf1 test/run-make: some test cases lacked $(EXTRACFLAGS).
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-11-20 14:12:57 +08:00
bors
dd5ce5ae2f auto merge of #19105 : alfie/rust/master, r=thestinger
As discussed in pull #19068, trying to make the wording more clear for unsafe code vs undefined behavior.
2014-11-20 06:11:36 +00:00
Davis Silverman
f36ebb0eaa fixed markdown rendering a H1 in comment 2014-11-20 00:15:15 -05:00
bors
793624261a auto merge of #18999 : aturon/rust/stab-floats, r=alexcrichton,alexcrichton
This commit adds stability markers for the APIs that have recently been aligned with [numerics reform](https://github.com/rust-lang/rfcs/pull/369). For APIs that were changed as part of that reform, `#[unstable]` is used to reflect the recency, but the APIs will become `#[stable]` in a follow-up pass.

In addition, a few aspects of the APIs not explicitly covered by the RFC are marked here -- in particular, constants for floats.

This commit does not mark the `uint` or `int` modules as `#[stable]`, given the ongoing debate out the names and roles of these types.

Due to some deprecation (see the RFC for details), this is a:

[breaking-change]

r? @alexcrichton 
cc @bjz
2014-11-20 02:31:31 +00:00
bors
399ff259e1 auto merge of #19118 : jakub-/rust/roll-up, r=jakub- 2014-11-20 00:27:07 +00:00
Chris Morgan
dc0416ebce Update the Vim syntax prelude. 2014-11-20 11:00:45 +11:00
Simon Wollwage
f950e3c495 removed struct_variant feature from tests 2014-11-20 00:56:50 +01:00
Simon Wollwage
4a83726517 removed usage of struct_variant feature as it is no longer gated 2014-11-20 00:21:32 +01:00
Jakub Bukaj
ee66c84165 Fixes to the roll-up 2014-11-19 23:34:01 +01:00
bors
a24b44483a auto merge of #18728 : thestinger/rust/int, r=cmr
This fixes the gap in the language definition causing #18726 by defining
a clear bound on the maximum size for libraries to enforce.

Closes #18069
2014-11-19 22:27:00 +00:00
Jakub Bukaj
2e9f705b93 rollup merge of #19108: steveklabnik/doc_atomic_bool
I don't know enough about the free functions to give them better docs right now.
2014-11-19 22:41:39 +01:00