Commit Graph

33021 Commits

Author SHA1 Message Date
Brian Anderson
5c92a8e054 Use the same html_root_url for all docs 2014-10-09 10:50:13 -07:00
Brian Anderson
afc1b20d8e Bump version to 0.13.0 2014-10-09 10:41:23 -07:00
Brian Anderson
6beddcfd83 Revert "Update html_root_url for 0.12.0 release"
This reverts commit 2288f33230.
2014-10-09 10:34:34 -07:00
Brian Anderson
158eaa643b 0.12.0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUNrj+AAoJEIWrlub6G+X+4TMQAIlyIoTpbZfA7MgaqHmrqp/O
 DkWH4sjoiTL3pdqHitbaJWFzStLjmM+hzOKYVYxXJGqpHuZv7pbnN2sQCKvJ6m9E
 htojoy9ZVeOUjkqz3+PYc6mh+SuQq4bpAhnnt60tLSxZCda7uTpdTcsOgDlwhu8P
 /YIbnBHo6brcQi6kEK27uN7U2MsluRR/ZhAmZH1mvrTtjKrGsKTEdta2NW1tUzNT
 sDluM9D0/WFjwSA9OohjtpUI7KYudqChOCRaqREgNq6xc/9at/TQHULsjzxLFIiC
 tAttF7ZZ2s1TmS4qzmx3AAWl8n8xYrDo+CpfPqKvSGwDegfHN9Epa+24Cdf2Q5GO
 9RSup89NlNNo3tjmK+G1cUqi/K9RseiZNPSJSoLlR2L9QFg/VFEVbcaZX+oX+CQF
 pfWkKqsfLqj50EimO+vuXRZhShHlu/McOdN0cd+S0KEGdd7ngqU3d7YJf9Ppm1mV
 d1VUqnPxvDrGQTGqk4cpGMIv+LmT6vY2iix3ha583zMYcU9VWrC9VEmR3I4XZefE
 UgsbAx2jIgagWa6ylDpes7X8dn/7qj3BA6l3Bt9aGrs9KnyQ+a3xOyz8dFvRJwks
 T8izOhfJXpxW4CLFZjDIQ9RD/joJuvuqTSIqf7zGIxIbMUQFB9EC/Rn7a3ftidds
 aZVZSl2li1vOa3DucW64
 =4lHl
 -----END PGP SIGNATURE-----

Merge tag '0.12.0'

0.12.0 release
2014-10-09 09:36:30 -07:00
bors
dfd52817ee auto merge of #17875 : dotdash/rust/static_bool, r=alexcrichton
While booleans are represented as i1 in SSA values, LLVM expects them
to be stored/loaded as i8 values. Using i1 as we do now works, but
kills some optimizations, so we should switch to i8, just like we do
everywhere else.

Fixes #16959.
2014-10-09 12:47:01 +00:00
bors
e6cfb56a5c auto merge of #17870 : thestinger/rust/alloc, r=eddyb
Using reallocate(old_ptr, old_size, new_size, align) makes a lot more
sense than reallocate(old_ptr, new_size, align, old_size) and matches up
with the order used by existing platform APIs like mremap.

Closes #17837

[breaking-change]
2014-10-09 10:57:25 +00:00
Björn Steinbrink
6fa5a2f66f Properly translate boolean statics to be stored as i8
While booleans are represented as i1 in SSA values, LLVM expects them
to be stored/loaded as i8 values. Using i1 as we do now works, but
kills some optimizations, so we should switch to i8, just like we do
everywhere else.

Fixes #16959.
2014-10-09 11:09:17 +02:00
bors
1b46b007d7 auto merge of #17784 : bkoropoff/rust/issue-17780, r=pcwalton
This fixes a soundness problem where `Fn` unboxed closures can mutate free variables in the environment.
The following presently builds:

```rust
#![feature(unboxed_closures, overloaded_calls)]

fn main() {
    let mut x = 0u;
    let _f = |&:| x = 42;
}
```

However, this is equivalent to writing the following, which borrowck rightly rejects:

```rust
struct F<'a> {
    x: &'a mut uint
}

impl<'a> Fn<(),()> for F<'a> {
    #[rust_call_abi_hack]
    fn call(&self, _: ()) {
        *self.x = 42; // error: cannot assign to data in a `&` reference
    }
}

fn main() {
    let mut x = 0u;
    let _f = F { x: &mut x };
}
```

This problem is unique to unboxed closures; boxed closures cannot be invoked through an immutable reference and are not subject to it.

This change marks upvars of `Fn` unboxed closures as freely aliasable in mem_categorization, which causes borrowck to reject attempts to mutate or mutably borrow them.

@zwarich pointed out that even with this change, there are remaining soundness issues related to regionck (issue #17403).  This region issue affects boxed closures as well.

Closes issue #17780
2014-10-09 07:12:30 +00:00
bors
8f96590150 auto merge of #17873 : steveklabnik/rust/gh16413, r=alexcrichton
A fix for the issues mentioned in https://github.com/rust-lang/rust/issues/16413
2014-10-09 05:22:27 +00:00
bors
d569dfe37e auto merge of #17871 : michaelwoerister/rust/lldb-versioning, r=alexcrichton
Apart from making the build system determine the LLDB version, this PR also fixes an issue with enums in LLDB pretty printers. In order for GDB's pretty printers to know for sure if a field of some value is an enum discriminant, I had rustc mark discriminant fields with the `artificial` DWARF tag. This worked out nicely for GDB but it turns out that one can't access artificial fields from LLDB. So I changed the debuginfo representation so that enum discriminants are marked by the special field name `RUST$ENUM$DISR` instead, which works in both cases.

The PR does not activate the LLDB test suite yet.
2014-10-09 03:07:27 +00:00
bors
63fe80e1ff auto merge of #17867 : jbcrail/rust/unclear-macros-doc, r=alexcrichton
I rearranged one sentence in the macros guide to make it less awkward.
2014-10-08 23:42:39 +00:00
bors
218cb4bc99 auto merge of #17748 : mahkoh/rust/int_slice, r=aturon 2014-10-08 21:22:32 +00:00
Steve Klabnik
557014cd83 add mention of test attribute
Fixes #16413
2014-10-08 16:46:01 -04:00
Steve Klabnik
3f1ed8608d remove crate_id attribute, add crate_name one
this is true as of https://github.com/rust-lang/rust/pull/15319
2014-10-08 16:44:40 -04:00
Julian Orth
bd527909e7 add {Imm,M}utableIntSlice 2014-10-08 20:51:31 +02:00
bors
afb5fcd553 auto merge of #17843 : coffeejunk/rust/guide-macros, r=steveklabnik
The old version switched in between examples from the value `5i` to `"Hello"` and back.

Additionally, the code generated by `rustc print.rs --pretty=expanded` is not as verbose anymore.
2014-10-08 17:52:08 +00:00
Daniel Micay
1c6fd76f80 saner parameter order for reallocation functions
Using reallocate(old_ptr, old_size, new_size, align) makes a lot more
sense than reallocate(old_ptr, new_size, align, old_size) and matches up
with the order used by existing platform APIs like mremap.

Closes #17837

[breaking-change]
2014-10-08 12:46:09 -04:00
bors
c588e407b9 auto merge of #17866 : jgallagher/rust/reserve-inheritance-keywords, r=huonw
Closes #17862
2014-10-08 13:47:13 +00:00
bors
eb2240aca3 auto merge of #17855 : steveklabnik/rust/fix_table_reference, r=alexcrichton
Markdown tables require a header, and we don't want one.

Fixes #17528
2014-10-08 11:32:11 +00:00
Michael Woerister
98a0f9166c debuginfo: Don't mark struct fields as artificial.
LLDB doesn't allow for reading 'artifical' fields (fields that are generated by the compiler). So do not mark, slice fields, enum discriminants, and GcBox value fields as artificial.
2014-10-08 11:52:06 +02:00
bors
bc649ba8f8 auto merge of #17447 : thestinger/rust/silly_string, r=aturon
This provides a way to pass `&[T]` to functions taking `&U` where `U` is
a `Vec<T>`. This is useful in many cases not covered by the Equiv trait
or methods like `find_with` on TreeMap.
2014-10-08 08:27:10 +00:00
Daniel Micay
f744479562 add #[experimental] as_string/as_vec functions
This provides a way to pass `&[T]` to functions taking `&U` where `U` is
a `Vec<T>`. This is useful in many cases not covered by the Equiv trait
or methods like `find_with` on TreeMap.
2014-10-08 04:18:54 -04:00
Michael Woerister
895aac9935 debuginfo: Add LLDB version handling to test infrastructure. 2014-10-08 08:24:49 +02:00
bors
57af34b9ad auto merge of #17840 : Sawyer47/rust/issue-17751, r=huonw
Closes #17751
2014-10-08 05:32:09 +00:00
bors
593174b42d auto merge of #17838 : vadimcn/rust/macros, r=alexcrichton 2014-10-08 02:52:08 +00:00
John Gallagher
3db9070e9c Add tests for new reserved keywords abstract,final,override 2014-10-07 22:19:02 -04:00
John Gallagher
4d190b1235 Add abstract, final, and override to rust.vim keyword list 2014-10-07 22:18:36 -04:00
John Gallagher
7091fe3972 Remove use of final and override (now reserved) 2014-10-07 22:18:12 -04:00
Joseph Crail
daa91d8ef4 Fix unclear macros documentation. 2014-10-07 22:18:10 -04:00
John Gallagher
1426f5834c Add abstract, final, and override to reserved keywords 2014-10-07 22:17:54 -04:00
bors
0606234880 auto merge of #17836 : typelist/rust/guide-tuples, r=steveklabnik
Currently, the Guide says tuples "are only equivalent if the arity, types, and values are all identical", before presenting an example that uses `==` to compare two tuples whose arity and contained types match. This is misleading, because it implies that `==` can dynamically check whether two tuples have the same arity and contained types, whereas trying to do this would lead to a compiler error.

I tried to avoid destroying the flow of this section, but I'm not sure if I've been successful.
2014-10-08 01:02:10 +00:00
bors
3b945dcae6 auto merge of #17787 : bgamari/rust/fix-quote-method, r=huonw
The previous fix introduced in 75d49c8203 neglected to parse outer attributes as described in #17782.
2014-10-07 23:12:08 +00:00
bors
8881c3524b auto merge of #17834 : sfackler/rust/rustdoc-cfgs, r=alexcrichton,alexcrichton
Rustdoc would previously improperly handle key="value" style cfgs, which
are notably used for Cargo features.
2014-10-07 21:12:10 +00:00
Brian Anderson
ba4081a5a8 More relnotes tweaks 2014-10-07 13:44:41 -07:00
Steve Klabnik
3610f8fdc2 Fix keyword table
Markdown tables require a header, and we don't want one.

Fixes #17528
2014-10-07 15:01:26 -04:00
Brian Anderson
2288f33230 Update html_root_url for 0.12.0 release 2014-10-07 11:18:50 -07:00
Brian Anderson
d2856f8127 Update per feedback 2014-10-07 11:18:49 -07:00
Brian Anderson
c1db2fbec8 Update AUTHORS.txt for 0.12.0 2014-10-07 11:18:49 -07:00
Brian Anderson
bad7ecbfc7 Update RELEASES.md for 0.12.0 2014-10-07 11:18:49 -07:00
Brian Anderson
ea4d5d2a24 Rename RELEASES.txt to RELEASES.md. It's markdown. 2014-10-07 11:18:47 -07:00
bors
683e40f355 auto merge of #16641 : steveklabnik/rust/intro_redux, r=alexcrichton
Because my '30 minute intro' was originally a blog post, the tone was a bit too light. It also was written a long time ago, and deserves a bit of a refresher for modern Rust. now that my work on the Guide is wrapping up, I want to give it a quick re-write as well.

This is not yet done, but I'm submitting it for feedback so far. I'd really like some comments on the ownership part in particular, which gets lower level than before, but is not strictly 100% accurate. Trying to strike a balance.

In general, I'm not sure I go into enough detail for those without systems experience, but am afraid of too much detail for those that do.

Rendered view: https://github.com/steveklabnik/rust/blob/intro_redux/src/doc/intro.md

/cc @wycats @nikomatsakis @brson etc
2014-10-07 14:32:09 +00:00
bors
95090922b3 auto merge of #17832 : brson/rust/updateversion, r=alexcrichton 2014-10-07 11:32:04 +00:00
Maximilian Haack
e656affa79 Guide: Fix inconsistency in 'Marcos' section
The old version switched in between examples from the value `5i` to `"Hello"`
and back. Additionally, the code generated by `rustc print.rs
--pretty=expanded` is not as verbose anymore.
2014-10-07 13:12:27 +02:00
bors
a3786db706 auto merge of #17802 : Gankro/rust/collection-docs-redux, r=aturon
Adds a high-level discussion of "what collection should you use for what", as well as some general discussion of correct/efficient usage of the capacity, iterator, and entry APIs.

Still building docs to confirm this renders right and the examples are good, but the content can be reviewed now.
2014-10-07 09:42:06 +00:00
Vadim Chugunov
fc60797f7f Fix the most egregious instances of "local ambiguity: multiple parsing options..." error in macros, which often occurs when trying to match parts of Rust syntax.
For example, this matcher: `fn $name:ident( $($param:ident : $pty:ty),* )` would fail when parsing `fn foo()`, because macro parser wouldn't realize that an ident cannot start with `)`.

This resolves #5902, and at least partially mitigates #9364 and #3232.
2014-10-07 02:13:05 -07:00
Piotr Jawniak
e8c03c3f42 Re-exports core::str::Utf16CodeUnits in std::str
Closes #17751
2014-10-07 08:51:12 +02:00
bors
e62ef37cfa auto merge of #17807 : nick29581/rust/slice6, r=aturon
r? @aturon
2014-10-07 06:17:11 +00:00
Johannes Muenzel
c211d132c3 Clarify that assigning/comparing different tuple types to one another won't compile 2014-10-07 01:43:18 -04:00
bors
8d702167ba auto merge of #17745 : aturon/rust/revert-any-private, r=alexcrichton
[Previously](e5da6a71a6), the `Any` trait was split into a private portion and an (empty) public portion, in order to hide the implementation strategy used for downcasting. However, the [new rules](e9ad12c0ca) for privacy forbid `AnyPrivate` from actually being private.

This patch thus reverts the introduction of `AnyPrivate`.

Although this is unlikely to break any real code, it removes a public trait and is therefore a:

[breaking-change]
2014-10-07 03:27:12 +00:00
Alexis Beingessner
1d6eda30c6 add missing btree re-exports 2014-10-06 23:19:15 -04:00