]> git.lizzy.rs Git - rust.git/log
rust.git
9 years agorustc: Convert statics to constants
Alex Crichton [Tue, 7 Oct 2014 00:30:54 +0000 (17:30 -0700)]
rustc: Convert statics to constants

9 years agorustrt: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:35:11 +0000 (16:35 -0700)]
rustrt: Convert statics to constants

9 years agoserialize: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:33:56 +0000 (16:33 -0700)]
serialize: Convert statics to constants

9 years agosyntax: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:33:44 +0000 (16:33 -0700)]
syntax: Convert statics to constants

9 years agonative: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:33:29 +0000 (16:33 -0700)]
native: Convert statics to constants

9 years agolog: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:33:13 +0000 (16:33 -0700)]
log: Convert statics to constants

9 years agoregex: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:32:48 +0000 (16:32 -0700)]
regex: Convert statics to constants

This require a bit of finesse to work around the changes with libunicode, but
nothing too major!

9 years agoalloc: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:32:00 +0000 (16:32 -0700)]
alloc: Convert statics to constants

9 years agoterm: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:31:39 +0000 (16:31 -0700)]
term: Convert statics to constants

9 years agostd: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:29:47 +0000 (16:29 -0700)]
std: Convert statics to constants

This commit repurposes most statics as constants in the standard library itself,
with the exception of TLS keys which precisely have their own memory location as
an implementation detail.

This commit also rewrites the bitflags syntax to use `const` instead of
`static`. All invocations will need to replace the word `static` with `const`
when declaring flags.

Due to the modification of the `bitflags!` syntax, this is a:

[breaking-change]

9 years agorand: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:18:57 +0000 (16:18 -0700)]
rand: Convert statics to constants

This leaves the ziggurat tables as `pub static` as they're likely too large to
want to go into the metadata anyway.

9 years agolibc: Convert all statics to constant
Alex Crichton [Mon, 6 Oct 2014 23:17:51 +0000 (16:17 -0700)]
libc: Convert all statics to constant

This crate is largely just one giant header file, so there's no need for any of
these values to actually have a memory location, they're all just basically a
regular #define.

9 years agocollections: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:15:54 +0000 (16:15 -0700)]
collections: Convert statics to constants

9 years agounicode: Make statics legal
Alex Crichton [Mon, 6 Oct 2014 23:14:38 +0000 (16:14 -0700)]
unicode: Make statics legal

The tables in libunicode are far too large to want to be inlined into any other
program, so these tables are all going to remain `static`. For them to be legal,
they cannot reference one another by value, but instead use references now.

This commit also modifies the src/etc/unicode.py script to generate the right
tables.

9 years agosync: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:14:30 +0000 (16:14 -0700)]
sync: Convert statics to constants

9 years agocore: Convert statics to constants
Alex Crichton [Mon, 6 Oct 2014 23:14:00 +0000 (16:14 -0700)]
core: Convert statics to constants

9 years agorustc: Add `const` globals to the language
Alex Crichton [Mon, 6 Oct 2014 15:17:01 +0000 (08:17 -0700)]
rustc: Add `const` globals to the language

This change is an implementation of [RFC 69][rfc] which adds a third kind of
global to the language, `const`. This global is most similar to what the old
`static` was, and if you're unsure about what to use then you should use a
`const`.

The semantics of these three kinds of globals are:

* A `const` does not represent a memory location, but only a value. Constants
  are translated as rvalues, which means that their values are directly inlined
  at usage location (similar to a #define in C/C++). Constant values are, well,
  constant, and can not be modified. Any "modification" is actually a
  modification to a local value on the stack rather than the actual constant
  itself.

  Almost all values are allowed inside constants, whether they have interior
  mutability or not. There are a few minor restrictions listed in the RFC, but
  they should in general not come up too often.

* A `static` now always represents a memory location (unconditionally). Any
  references to the same `static` are actually a reference to the same memory
  location. Only values whose types ascribe to `Sync` are allowed in a `static`.
  This restriction is in place because many threads may access a `static`
  concurrently. Lifting this restriction (and allowing unsafe access) is a
  future extension not implemented at this time.

* A `static mut` continues to always represent a memory location. All references
  to a `static mut` continue to be `unsafe`.

This is a large breaking change, and many programs will need to be updated
accordingly. A summary of the breaking changes is:

* Statics may no longer be used in patterns. Statics now always represent a
  memory location, which can sometimes be modified. To fix code, repurpose the
  matched-on-`static` to a `const`.

      static FOO: uint = 4;
      match n {
          FOO => { /* ... */ }
          _ => { /* ... */ }
      }

  change this code to:

      const FOO: uint = 4;
      match n {
          FOO => { /* ... */ }
          _ => { /* ... */ }
      }

* Statics may no longer refer to other statics by value. Due to statics being
  able to change at runtime, allowing them to reference one another could
  possibly lead to confusing semantics. If you are in this situation, use a
  constant initializer instead. Note, however, that statics may reference other
  statics by address, however.

* Statics may no longer be used in constant expressions, such as array lengths.
  This is due to the same restrictions as listed above. Use a `const` instead.

[breaking-change]

[rfc]: https://github.com/rust-lang/rfcs/pull/246

9 years agorustc: Reformat check_const with modern style
Alex Crichton [Tue, 7 Oct 2014 04:32:58 +0000 (21:32 -0700)]
rustc: Reformat check_const with modern style

Remove a bunch of two-space tabs

9 years agoMerge tag '0.12.0'
Brian Anderson [Thu, 9 Oct 2014 16:36:30 +0000 (09:36 -0700)]
Merge tag '0.12.0'

0.12.0 release

9 years agoIn sieve example, end iteration sooner
Graham Fawcett [Thu, 9 Oct 2014 14:02:07 +0000 (10:02 -0400)]
In sieve example, end iteration sooner

The Sieve algorithm only requires checking all elements up to and including the square root of the maximum prime you're looking for. After that, the remaining elements are guaranteed to be prime.

9 years agoauto merge of #17875 : dotdash/rust/static_bool, r=alexcrichton
bors [Thu, 9 Oct 2014 12:47:01 +0000 (12:47 +0000)]
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.

9 years agoauto merge of #17870 : thestinger/rust/alloc, r=eddyb
bors [Thu, 9 Oct 2014 10:57:25 +0000 (10:57 +0000)]
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]

9 years agoProperly translate boolean statics to be stored as i8
Björn Steinbrink [Wed, 8 Oct 2014 21:20:18 +0000 (23:20 +0200)]
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.

9 years agoauto merge of #17784 : bkoropoff/rust/issue-17780, r=pcwalton
bors [Thu, 9 Oct 2014 07:12:30 +0000 (07:12 +0000)]
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

9 years agolibrustc: Forbid duplicate name bindings in the same parameter or type
Patrick Walton [Thu, 9 Oct 2014 04:28:50 +0000 (21:28 -0700)]
librustc: Forbid duplicate name bindings in the same parameter or type
parameter list.

This breaks code like:

    fn f(a: int, a: int) { ... }
    fn g<T,T>(a: T) { ... }

Change this code to not use the same name for a parameter. For example:

    fn f(a: int, b: int) { ... }
    fn g<T,U>(a: T) { ... }

Code like this is *not* affected, since `_` is not an identifier:

    fn f(_: int, _: int) { ... } // OK

Closes #17568.

[breaking-change]

9 years agoauto merge of #17873 : steveklabnik/rust/gh16413, r=alexcrichton
bors [Thu, 9 Oct 2014 05:22:27 +0000 (05:22 +0000)]
auto merge of #17873 : steveklabnik/rust/gh16413, r=alexcrichton

A fix for the issues mentioned in https://github.com/rust-lang/rust/issues/16413

9 years agoauto merge of #17871 : michaelwoerister/rust/lldb-versioning, r=alexcrichton
bors [Thu, 9 Oct 2014 03:07:27 +0000 (03:07 +0000)]
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.

9 years agoClean up the implementations of Bitv and BitvSet.
Kasey Carrothers [Fri, 26 Sep 2014 06:49:17 +0000 (23:49 -0700)]
Clean up the implementations of Bitv and BitvSet.

Functions that add bits now ensure that any unused bits are set to 0.
`into_bitv` sanitizes the nbits of the Bitv/BitvSet it returns by setting the nbits to the current capacity.
Fix a bug with `union_with` and `symmetric_difference` with due to not updating nbits properly
Add test cases to the _with functions
Remove `get_mut_ref`

This is a [breaking-change]. The things you will need to fix are:

1. BitvSet's `unwrap()` has been renamed to `into_bitv`
2. BitvSet's `get_mut_ref()` has been removed. Use `into_bitv()` and `from_bitv()` instead.

9 years agoauto merge of #17867 : jbcrail/rust/unclear-macros-doc, r=alexcrichton
bors [Wed, 8 Oct 2014 23:42:39 +0000 (23:42 +0000)]
auto merge of #17867 : jbcrail/rust/unclear-macros-doc, r=alexcrichton

I rearranged one sentence in the macros guide to make it less awkward.

9 years agoauto merge of #17748 : mahkoh/rust/int_slice, r=aturon
bors [Wed, 8 Oct 2014 21:22:32 +0000 (21:22 +0000)]
auto merge of #17748 : mahkoh/rust/int_slice, r=aturon

9 years agoadd mention of test attribute
Steve Klabnik [Wed, 8 Oct 2014 20:45:42 +0000 (16:45 -0400)]
add mention of test attribute

Fixes #16413

9 years agoremove crate_id attribute, add crate_name one
Steve Klabnik [Wed, 8 Oct 2014 20:44:40 +0000 (16:44 -0400)]
remove crate_id attribute, add crate_name one

this is true as of https://github.com/rust-lang/rust/pull/15319

9 years agoadd {Imm,M}utableIntSlice
Julian Orth [Fri, 3 Oct 2014 18:34:32 +0000 (20:34 +0200)]
add {Imm,M}utableIntSlice

9 years agoauto merge of #17843 : coffeejunk/rust/guide-macros, r=steveklabnik
bors [Wed, 8 Oct 2014 17:52:08 +0000 (17:52 +0000)]
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.

9 years agosaner parameter order for reallocation functions
Daniel Micay [Wed, 8 Oct 2014 04:57:29 +0000 (00:57 -0400)]
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]

9 years agoauto merge of #17866 : jgallagher/rust/reserve-inheritance-keywords, r=huonw
bors [Wed, 8 Oct 2014 13:47:13 +0000 (13:47 +0000)]
auto merge of #17866 : jgallagher/rust/reserve-inheritance-keywords, r=huonw

Closes #17862

9 years agolibrustdoc/html: recognize slices not to nest A tags.
NODA, Kai [Sat, 27 Sep 2014 16:15:31 +0000 (00:15 +0800)]
librustdoc/html: recognize slices not to nest A tags.

1. A slice of parametrized type, say
   BorrowedRef { ... Vector(Generic(T)) }, is rendered as
   "<a href='primitive.slice.html'>&amp;[T]</a>"
2. A slice of other types, say
   BorrowedRef { ... Vector(int) }, is rendered as
   "<a href='primitive.slice.html'>&amp;[</a>
    <a href='primitive.int.html'>int</a>
    <a href='primitive.slice.html'>]</a>"
3. Other cases, say BorrowedRef { ... int }, are
   rendered as same as before:
   "&<a href='primitive.int.html'>int</a>"

Relevant W3C specs:
- http://www.w3.org/TR/html401/struct/links.html#h-12.2.2
  12.2.2 Nested links are illegal
- http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element
  states A tag must not enclose any "interactive contents"
  which include A tags themselves.

9 years agoauto merge of #17855 : steveklabnik/rust/fix_table_reference, r=alexcrichton
bors [Wed, 8 Oct 2014 11:32:11 +0000 (11:32 +0000)]
auto merge of #17855 : steveklabnik/rust/fix_table_reference, r=alexcrichton

Markdown tables require a header, and we don't want one.

Fixes #17528

9 years agodebuginfo: Don't mark struct fields as artificial.
Michael Woerister [Thu, 2 Oct 2014 13:59:22 +0000 (15:59 +0200)]
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.

9 years agoauto merge of #17447 : thestinger/rust/silly_string, r=aturon
bors [Wed, 8 Oct 2014 08:27:10 +0000 (08:27 +0000)]
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.

9 years agoadd #[experimental] as_string/as_vec functions
Daniel Micay [Sun, 24 Aug 2014 00:26:53 +0000 (20:26 -0400)]
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.

9 years agodebuginfo: Add LLDB version handling to test infrastructure.
Michael Woerister [Thu, 2 Oct 2014 09:35:24 +0000 (11:35 +0200)]
debuginfo: Add LLDB version handling to test infrastructure.

9 years agoauto merge of #17840 : Sawyer47/rust/issue-17751, r=huonw
bors [Wed, 8 Oct 2014 05:32:09 +0000 (05:32 +0000)]
auto merge of #17840 : Sawyer47/rust/issue-17751, r=huonw

Closes #17751

9 years agoauto merge of #17838 : vadimcn/rust/macros, r=alexcrichton
bors [Wed, 8 Oct 2014 02:52:08 +0000 (02:52 +0000)]
auto merge of #17838 : vadimcn/rust/macros, r=alexcrichton

9 years agoAdd tests for new reserved keywords `abstract`,`final`,`override`
John Gallagher [Wed, 8 Oct 2014 02:19:02 +0000 (22:19 -0400)]
Add tests for new reserved keywords `abstract`,`final`,`override`

9 years agoAdd `abstract`, `final`, and `override` to rust.vim keyword list
John Gallagher [Wed, 8 Oct 2014 02:18:36 +0000 (22:18 -0400)]
Add `abstract`, `final`, and `override` to rust.vim keyword list

9 years agoRemove use of `final` and `override` (now reserved)
John Gallagher [Wed, 8 Oct 2014 02:18:12 +0000 (22:18 -0400)]
Remove use of `final` and `override` (now reserved)

9 years agoFix unclear macros documentation.
Joseph Crail [Wed, 8 Oct 2014 02:18:10 +0000 (22:18 -0400)]
Fix unclear macros documentation.

9 years agoAdd `abstract`, `final`, and `override` to reserved keywords
John Gallagher [Wed, 8 Oct 2014 02:17:54 +0000 (22:17 -0400)]
Add `abstract`, `final`, and `override` to reserved keywords

9 years agoauto merge of #17836 : typelist/rust/guide-tuples, r=steveklabnik
bors [Wed, 8 Oct 2014 01:02:10 +0000 (01:02 +0000)]
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.

9 years agoauto merge of #17787 : bgamari/rust/fix-quote-method, r=huonw
bors [Tue, 7 Oct 2014 23:12:08 +0000 (23:12 +0000)]
auto merge of #17787 : bgamari/rust/fix-quote-method, r=huonw

The previous fix introduced in 75d49c8203405ab0af7a2b8b8698af02868fdbc2 neglected to parse outer attributes as described in #17782.

9 years agoauto merge of #17834 : sfackler/rust/rustdoc-cfgs, r=alexcrichton,alexcrichton
bors [Tue, 7 Oct 2014 21:12:10 +0000 (21:12 +0000)]
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.

9 years agoMore relnotes tweaks
Brian Anderson [Tue, 7 Oct 2014 00:30:30 +0000 (17:30 -0700)]
More relnotes tweaks

9 years agoFix keyword table
Steve Klabnik [Tue, 7 Oct 2014 19:01:26 +0000 (15:01 -0400)]
Fix keyword table

Markdown tables require a header, and we don't want one.

Fixes #17528

9 years agoUpdate html_root_url for 0.12.0 release
Brian Anderson [Mon, 6 Oct 2014 23:19:37 +0000 (16:19 -0700)]
Update html_root_url for 0.12.0 release

9 years agoUpdate per feedback
Brian Anderson [Mon, 6 Oct 2014 19:07:28 +0000 (12:07 -0700)]
Update per feedback

9 years agoUpdate AUTHORS.txt for 0.12.0
Brian Anderson [Thu, 2 Oct 2014 23:14:38 +0000 (16:14 -0700)]
Update AUTHORS.txt for 0.12.0

9 years agoUpdate RELEASES.md for 0.12.0
Brian Anderson [Thu, 2 Oct 2014 22:54:43 +0000 (15:54 -0700)]
Update RELEASES.md for 0.12.0

9 years agoRename RELEASES.txt to RELEASES.md. It's markdown.
Brian Anderson [Thu, 2 Oct 2014 23:18:27 +0000 (16:18 -0700)]
Rename RELEASES.txt to RELEASES.md. It's markdown.

9 years agoauto merge of #16641 : steveklabnik/rust/intro_redux, r=alexcrichton
bors [Tue, 7 Oct 2014 14:32:09 +0000 (14:32 +0000)]
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

9 years agoauto merge of #17832 : brson/rust/updateversion, r=alexcrichton
bors [Tue, 7 Oct 2014 11:32:04 +0000 (11:32 +0000)]
auto merge of #17832 : brson/rust/updateversion, r=alexcrichton

9 years agoGuide: Fix inconsistency in 'Marcos' section
Maximilian Haack [Tue, 7 Oct 2014 11:12:27 +0000 (13:12 +0200)]
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.

9 years agoauto merge of #17802 : Gankro/rust/collection-docs-redux, r=aturon
bors [Tue, 7 Oct 2014 09:42:06 +0000 (09:42 +0000)]
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.

9 years agoFix the most egregious instances of "local ambiguity: multiple parsing options.....
Vadim Chugunov [Tue, 7 Oct 2014 06:15:12 +0000 (23:15 -0700)]
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.

9 years agoRe-exports core::str::Utf16CodeUnits in std::str
Piotr Jawniak [Tue, 7 Oct 2014 06:51:12 +0000 (08:51 +0200)]
Re-exports core::str::Utf16CodeUnits in std::str

Closes #17751

9 years agoauto merge of #17807 : nick29581/rust/slice6, r=aturon
bors [Tue, 7 Oct 2014 06:17:11 +0000 (06:17 +0000)]
auto merge of #17807 : nick29581/rust/slice6, r=aturon

r? @aturon

9 years agoClarify that assigning/comparing different tuple types to one another won't compile
Johannes Muenzel [Tue, 7 Oct 2014 05:22:58 +0000 (01:22 -0400)]
Clarify that assigning/comparing different tuple types to one another won't compile

9 years agoauto merge of #17745 : aturon/rust/revert-any-private, r=alexcrichton
bors [Tue, 7 Oct 2014 03:27:12 +0000 (03:27 +0000)]
auto merge of #17745 : aturon/rust/revert-any-private, r=alexcrichton

[Previously](https://github.com/rust-lang/rust/commit/e5da6a71a6a0b46dd3630fc8326e6d5906a1fde6), 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](https://github.com/rust-lang/rust/commit/e9ad12c0cae5c43ada6641c7dc840a0fbe5010a2) 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]

9 years agoadd missing btree re-exports
Alexis Beingessner [Sun, 5 Oct 2014 17:55:49 +0000 (13:55 -0400)]
add missing btree re-exports

9 years agolibrary-level docs for collections
Alexis Beingessner [Sun, 5 Oct 2014 17:32:18 +0000 (13:32 -0400)]
library-level docs for collections

9 years agoReinstate AsSlice impls for Option and Result
Nick Cameron [Tue, 7 Oct 2014 02:55:52 +0000 (15:55 +1300)]
Reinstate AsSlice impls for Option and Result

9 years agoRename slicing methods
Nick Cameron [Sat, 4 Oct 2014 22:59:10 +0000 (11:59 +1300)]
Rename slicing methods

9 years agoRename slice::Slice
Nick Cameron [Sat, 4 Oct 2014 23:22:42 +0000 (12:22 +1300)]
Rename slice::Slice

9 years agoPut slicing syntax behind a feature gate.
Nick Cameron [Fri, 26 Sep 2014 05:48:16 +0000 (17:48 +1200)]
Put slicing syntax behind a feature gate.

[breaking-change]

If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.

9 years agoUse slice syntax instead of slice_to, etc.
Nick Cameron [Wed, 24 Sep 2014 11:41:09 +0000 (23:41 +1200)]
Use slice syntax instead of slice_to, etc.

9 years agoProperly handle cfgs in rustdoc
Steven Fackler [Tue, 7 Oct 2014 02:39:01 +0000 (19:39 -0700)]
Properly handle cfgs in rustdoc

Rustdoc would previously improperly handle key="value" style cfgs, which
are notably used for Cargo features.

9 years agodoc fixups
Alexis Beingessner [Tue, 7 Oct 2014 00:12:58 +0000 (20:12 -0400)]
doc fixups

9 years agoRevise DST test to not require duplicate errors.
Aaron Turon [Mon, 6 Oct 2014 23:31:40 +0000 (16:31 -0700)]
Revise DST test to not require duplicate errors.

9 years agoRemove core::any::AnyPrivate
Aaron Turon [Fri, 3 Oct 2014 17:46:41 +0000 (10:46 -0700)]
Remove core::any::AnyPrivate

[Previously](https://github.com/rust-lang/rust/commit/e5da6a71a6a0b46dd3630fc8326e6d5906a1fde6),
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](https://github.com/rust-lang/rust/commit/e9ad12c0cae5c43ada6641c7dc840a0fbe5010a2)
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]

9 years agodoc: Update output of `rustc --version`
Brian Anderson [Mon, 6 Oct 2014 23:22:44 +0000 (16:22 -0700)]
doc: Update output of `rustc --version`

9 years agoauto merge of #17820 : pnkfelix/rust/fsk-improve-binary_search-doc2, r=alexcrichton
bors [Mon, 6 Oct 2014 20:27:14 +0000 (20:27 +0000)]
auto merge of #17820 : pnkfelix/rust/fsk-improve-binary_search-doc2, r=alexcrichton

Add example to doc for `slice::ImmutableSlice::binary_search`.

Fix #17817.

9 years agoauto merge of #17692 : brson/rust/copywut, r=alexcrichton
bors [Mon, 6 Oct 2014 18:37:10 +0000 (18:37 +0000)]
auto merge of #17692 : brson/rust/copywut, r=alexcrichton

9 years agoUpdate COPYRIGHT to better reflect the current repo
Brian Anderson [Wed, 1 Oct 2014 18:52:18 +0000 (11:52 -0700)]
Update COPYRIGHT to better reflect the current repo

9 years agoauto merge of #17798 : tomjakubowski/rust/rustdoc-fix-bounds, r=alexcrichton
bors [Mon, 6 Oct 2014 16:47:13 +0000 (16:47 +0000)]
auto merge of #17798 : tomjakubowski/rust/rustdoc-fix-bounds, r=alexcrichton

This PR adds support in rustdoc for properly naming lifetimes in bounds, instead of just showing `'static` for everything. It also adds support for unboxed function sugar bounds, which were also previously rendered as `'static`.

9 years agoauto merge of #17796 : tomjakubowski/rust/rustdoc-ice-17736, r=alexcrichton
bors [Mon, 6 Oct 2014 14:57:19 +0000 (14:57 +0000)]
auto merge of #17796 : tomjakubowski/rust/rustdoc-ice-17736, r=alexcrichton

Previously, external code might call `markdown::render()` without having
called `markdown::reset_headers()`, meaning the TLS key
`used_header_map` was unset.  Now `markdown::render()` ensures that
`used_header_map` is set by calling `reset_headers` if necessary.

Fix #17736

9 years agosyntax: Parse outer attributes in quote_method!
Ben Gamari [Mon, 6 Oct 2014 14:53:05 +0000 (10:53 -0400)]
syntax: Parse outer attributes in quote_method!

Fixes #17782.

9 years agoAdd example to doc for `slice::ImmutableSlice::binary_search`.
Felix S. Klock II [Mon, 6 Oct 2014 13:46:09 +0000 (15:46 +0200)]
Add example to doc for `slice::ImmutableSlice::binary_search`.

Fix #17817.

9 years agorustdoc: Include lifetimes in re-exported bounds
Tom Jakubowski [Mon, 6 Oct 2014 13:11:21 +0000 (06:11 -0700)]
rustdoc: Include lifetimes in re-exported bounds

Fix #17818

9 years agoauto merge of #17814 : vhbit/rust/ios-build-fix, r=huonw
bors [Mon, 6 Oct 2014 13:07:19 +0000 (13:07 +0000)]
auto merge of #17814 : vhbit/rust/ios-build-fix, r=huonw

9 years agoauto merge of #17812 : thestinger/rust/jemalloc, r=alexcrichton
bors [Mon, 6 Oct 2014 11:17:16 +0000 (11:17 +0000)]
auto merge of #17812 : thestinger/rust/jemalloc, r=alexcrichton

This includes optimizations to the thread cache and support for
shrinking and expanding huge (>4M) allocations in-place.

9 years agorustdoc: Remove dummy UnknownBound variant
Tom Jakubowski [Mon, 6 Oct 2014 09:22:40 +0000 (02:22 -0700)]
rustdoc: Remove dummy UnknownBound variant

9 years agoauto merge of #17803 : bkoropoff/rust/issue-17021, r=alexcrichton
bors [Mon, 6 Oct 2014 09:27:19 +0000 (09:27 +0000)]
auto merge of #17803 : bkoropoff/rust/issue-17021, r=alexcrichton

This closes issue #17021.

9 years agorustdoc: Support unboxed fn sugar in bounds
Tom Jakubowski [Sun, 5 Oct 2014 15:09:41 +0000 (08:09 -0700)]
rustdoc: Support unboxed fn sugar in bounds

9 years agorustdoc: Correctly name lifetimes in bounds
Tom Jakubowski [Sun, 5 Oct 2014 14:35:04 +0000 (07:35 -0700)]
rustdoc: Correctly name lifetimes in bounds

Fix #16518

9 years agorustdoc: make calls of markdown::render safer
Tom Jakubowski [Sun, 5 Oct 2014 13:00:50 +0000 (06:00 -0700)]
rustdoc: make calls of markdown::render safer

Previously, external code might call `markdown::render()` without having
called `markdown::reset_headers()`, meaning the TLS key
`used_header_map` was unset.  Now `markdown::render()` ensures that
`used_header_map` is set by calling `reset_headers` if necessary.

Fix #17736

9 years agoauto merge of #17781 : P1start/rust/bitflags-lints, r=alexcrichton
bors [Mon, 6 Oct 2014 07:37:19 +0000 (07:37 +0000)]
auto merge of #17781 : P1start/rust/bitflags-lints, r=alexcrichton

Closes #17773.

9 years agoFixed iOS build (statics name lint)
Valerii Hiora [Mon, 6 Oct 2014 06:24:04 +0000 (09:24 +0300)]
Fixed iOS build (statics name lint)

9 years agoRemove the #[allow(non_uppercase_statics)] attr from bitflags!
P1start [Mon, 6 Oct 2014 03:08:35 +0000 (16:08 +1300)]
Remove the #[allow(non_uppercase_statics)] attr from bitflags!

9 years agoRename the file permission statics in std::io to be uppercase
P1start [Mon, 6 Oct 2014 03:08:46 +0000 (16:08 +1300)]
Rename the file permission statics in std::io to be uppercase

For example, this renames `GroupRWX` to `GROUP_RWX`, and deprecates the old
name. Code using these statics should be updated accordingly.

9 years agoauto merge of #17414 : jakub-/rust/issue-17405, r=alexcrichton
bors [Mon, 6 Oct 2014 02:52:22 +0000 (02:52 +0000)]
auto merge of #17414 : jakub-/rust/issue-17405, r=alexcrichton

Fixes #17405.
Fixes #17518.
Fixes #17800.