about summary refs log tree commit diff
path: root/src/test/bench
AgeCommit message (Collapse)AuthorLines
2014-07-24librustc: Stop desugaring `for` expressions and translate them directly.Patrick Walton-3/+4
This makes edge cases in which the `Iterator` trait was not in scope and/or `Option` or its variants were not in scope work properly. This breaks code that looks like: struct MyStruct { ... } impl MyStruct { fn next(&mut self) -> Option<int> { ... } } for x in MyStruct { ... } { ... } Change ad-hoc `next` methods like the above to implementations of the `Iterator` trait. For example: impl Iterator<int> for MyStruct { fn next(&mut self) -> Option<int> { ... } } Closes #15392. [breaking-change]
2014-07-24auto merge of #15424 : TeXitoi/rust/relicense-shootout-threadring, r=brsonbors-8/+38
Everyone agreed. Related to #14248, close #15328 @brson OK?
2014-07-22auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichtonbors-0/+4
2014-07-21Add a ton of ignore-lexer-testCorey Richardson-0/+4
2014-07-19librustc: Implement lifetime elision.Patrick Walton-1/+1
This implements RFC 39. Omitted lifetimes in return values will now be inferred to more useful defaults, and an error is reported if a lifetime in a return type is omitted and one of the two lifetime elision rules does not specify what it should be. This primarily breaks two uncommon code patterns. The first is this: unsafe fn get_foo_out_of_thin_air() -> &Foo { ... } This should be changed to: unsafe fn get_foo_out_of_thin_air() -> &'static Foo { ... } The second pattern that needs to be changed is this: enum MaybeBorrowed<'a> { Borrowed(&'a str), Owned(String), } fn foo() -> MaybeBorrowed { Owned(format!("hello world")) } Change code like this to: enum MaybeBorrowed<'a> { Borrowed(&'a str), Owned(String), } fn foo() -> MaybeBorrowed<'static> { Owned(format!("hello world")) } Closes #15552. [breaking-change]
2014-07-18auto merge of #15743 : Ryman/rust/mandelbrot_fix, r=alexcrichtonbors-3/+3
Matches the official sample output (N=200) again. cc #15408
2014-07-17Rename functions in the CloneableVector traitAdolfo OchagavĂ­a-3/+3
* Deprecated `to_owned` in favor of `to_vec` * Deprecated `into_owned` in favor of `into_vec` [breaking-change]
2014-07-13mandelbrot: fix overlapping buffersKevin Butler-3/+3
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-12/+12
[breaking-change]
2014-07-04Relicense shootout-threadring.rsGuillaume Pinot-8/+38
Everyone agreed. Related to #14248, close #15328
2014-07-02auto merge of #15085 : brson/rust/stridx, r=alexcrichtonbors-1/+1
Being able to index into the bytes of a string encourages poor UTF-8 hygiene. To get a view of `&[u8]` from either a `String` or `&str` slice, use the `as_bytes()` method. Closes #12710. [breaking-change] If the diffstat is any indication this shouldn't have a huge impact but it will have some. Most changes in the `str` and `path` module. A lot of the existing usages were in tests where ascii is expected. There are a number of other legit uses where the characters are known to be ascii.
2014-07-01rustc: Remove `&str` indexing from the language.Brian Anderson-1/+1
Being able to index into the bytes of a string encourages poor UTF-8 hygiene. To get a view of `&[u8]` from either a `String` or `&str` slice, use the `as_bytes()` method. Closes #12710. [breaking-change]
2014-07-01relicense shootout-mandelbrot.rsGuillaume Pinot-8/+39
Part of #14248 Main authors: - @Ryman: OK - @TeXitoi: OK - @pcwalton: OK Minor authors: - @brson: OK - @alexcrichton: OK - @kballard: OK Remark: @tedhorst was a main contributor, but its contribution disapear with @pcwalton rewrite at af4ea11
2014-06-28auto merge of #15208 : alexcrichton/rust/snapshots, r=pcwaltonbors-2/+2
This change registers new snapshots, allowing `*T` to be removed from the language. This is a large breaking change, and it is recommended that if compiler errors are seen that any FFI calls are audited to determine whether they should be actually taking `*mut T`.
2014-06-28Rename all raw pointers as necessaryAlex Crichton-2/+2
2014-06-28auto merge of #15233 : jbclements/rust/match-var-hygiene-etc, r=cmrbors-4/+4
This PR includes two big things and a bunch of little ones. 1) It enables hygiene for variables bound by 'match' expressions. 2) It fixes a bug discovered indirectly (#15221), wherein fold traversal failed to visit nonterminal nodes. 3) It fixes a small bug in the macro tutorial. It also adds tests for the first two, and makes a bunch of small comment improvements and cleanup.
2014-06-27replaced ignore-pretty with no-pretty-expandedJohn Clements-4/+4
Per @acrichto's suggestion, use the more narrowly focused exclusion.
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-1/+1
This commit removes superfluous to_string calls from various places
2014-06-26auto merge of #15184 : jbclements/rust/for-loop-hygiene-etc, r=jbclementsbors-13/+21
It turns out that bindings introduced by 'for' loops were not treated hygienically. The fix for this is to make the 'for' expansion more like a macro; rather than expanding sub-pieces and then assembling them, we need to rewrite the for and then call expand again on the whole thing. This PR includes a test and the fix. It also contains a number of other things: - unit tests for other forms of hygiene (currently ignored) - a fix for the isaac.rs macro that (it turned out) was relying on capturing - other miscellaneous cleanup and comments
2014-06-25more loops to be ignored by pretty-rpassJohn Clements-0/+8
2014-06-25tidy macro just a bitJohn Clements-13/+13
2014-06-24librustc: Remove cross borrowing from mutable `Box`es to `&mut`.Patrick Walton-7/+7
This will break code like: fn f(x: &mut int) {} let mut a = box 1i; f(a); Change it to: fn f(x: &mut int) {} let mut a = box 1i; f(&mut *a); RFC 33; issue #10504. [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-29/+29
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-20librustc: Put `#[unsafe_destructor]` behind a feature gate.Patrick Walton-1/+1
Closes #8142. This is not the semantics we want long-term. You can continue to use `#[unsafe_destructor]`, but you'll need to add `#![feature(unsafe_destructor)]` to the crate attributes. [breaking-change]
2014-06-18Fallout from TaskBuilder changesAaron Turon-25/+14
This commit brings code downstream of libstd up to date with the new TaskBuilder API.
2014-06-18Merge the Bitwise and ByteOrder traits into the Int traitBrendan Zabarauskas-1/+0
This reduces the complexity of the trait hierarchy.
2014-06-17auto merge of #14855 : TeXitoi/rust/relicense-shootout-binarytrees, r=brsonbors-8/+38
Everyone agreed. Related to #14248, close #14720 @brson OK?
2014-06-16auto merge of #14852 : TeXitoi/rust/relicense-shootout-pidigits, r=brsonbors-8/+38
Everyone agreed. Related to #14248, close #14718 @brson OK?
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-4/+4
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-12Relicense shootout-binarytrees.rsGuillaume Pinot-8/+38
Everyone agreed. Related to #14248, close #14720
2014-06-12Relicense shootout-pidigits.rsGuillaume Pinot-8/+38
Everyone agreed. Related to #14248, close #14718
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-2/+2
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-11auto merge of #14746 : alexcrichton/rust/libsync, r=brsonbors-23/+10
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-11sync: Move underneath libstdAlex Crichton-23/+10
This commit is the final step in the libstd facade, #13851. The purpose of this commit is to move libsync underneath the standard library, behind the facade. This will allow core primitives like channels, queues, and atomics to all live in the same location. There were a few notable changes and a few breaking changes as part of this movement: * The `Vec` and `String` types are reexported at the top level of libcollections * The `unreachable!()` macro was copied to libcore * The `std::rt::thread` module was moved to librustrt, but it is still reexported at the same location. * The `std::comm` module was moved to libsync * The `sync::comm` module was moved under `sync::comm`, and renamed to `duplex`. It is now a private module with types/functions being reexported under `sync::comm`. This is a breaking change for any existing users of duplex streams. * All concurrent queues/deques were moved directly under libsync. They are also all marked with #![experimental] for now if they are public. * The `task_pool` and `future` modules no longer live in libsync, but rather live under `std::sync`. They will forever live at this location, but they may move to libsync if the `std::task` module moves as well. [breaking-change]
2014-06-11rustc: Move the AST from @T to Gc<T>Alex Crichton-13/+15
2014-06-09Use phase(plugin) in testsKeegan McAllister-5/+5
2014-06-08relicense shootout-fannkuch-redux.rsGuillaume Pinot-8/+38
Part of #14248 Main contributors are @pcwalton, @alexcrichton and me. Only @dguenther appear in git blame as a minor contribution, but it is only adding the rust license, so removed by this relicensing.
2014-06-07relicense shootout-regex-dna.rsGuillaume Pinot-8/+38
Part of #14248 The authors are @pcwalton and @BurntSushi, and we have their agreement.
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-5/+5
2014-06-06Change to_str().to_string() to just to_str()Adolfo OchagavĂ­a-5/+5
2014-06-05auto merge of #14669 : TeXitoi/rust/relicense-shootout-meteor, r=brsonbors-10/+40
part of #14248, fix #14420 Removed @richo's contribution (outdated comment) Quoting @brson: let's move forward with this one. The only statement I'm missing is @richo's and it sounds like his was a minor patch.
2014-06-05Fallout from the libcollections movementAlex Crichton-9/+7
2014-06-05relicense shootout-meteor.rsGuillaume Pinot-10/+40
part of #14248, fix #14420 Removed @richo's contribution (outdated comment) Quoting @brson: let's move forward with this one. The only statement I'm missing is @richo's and it sounds like his was a minor patch.
2014-06-01std: Drop Total from Total{Eq,Ord}Alex Crichton-1/+1
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-1/+1
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-30windows: Allow snake_case errors for now.Kevin Butler-0/+2
2014-05-29std: Recreate a `rand` moduleAlex Crichton-5/+3
This commit shuffles around some of the `rand` code, along with some reorganization. The new state of the world is as follows: * The librand crate now only depends on libcore. This interface is experimental. * The standard library has a new module, `std::rand`. This interface will eventually become stable. Unfortunately, this entailed more of a breaking change than just shuffling some names around. The following breaking changes were made to the rand library: * Rng::gen_vec() was removed. This has been replaced with Rng::gen_iter() which will return an infinite stream of random values. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` * Rng::gen_ascii_str() was removed. This has been replaced with Rng::gen_ascii_chars() which will return an infinite stream of random ascii characters. Similarly to gen_iter(), previous behavior can be emulated with `rng.gen_ascii_chars().take(n).collect()` * {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. * Rand implementations for `Box<T>` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc<T> and Arc<T> were not supported. If this is undesirable, librand can depend on liballoc and regain these implementations. * The WeightedChoice structure is no longer built with a `Vec<Weighted<T>>`, but rather a `&mut [Weighted<T>]`. This means that the WeightedChoice structure now has a lifetime associated with it. * The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. cc #13851 [breaking-change]
2014-05-28std: Remove format_strbuf!()Alex Crichton-10/+8
This was only ever a transitionary macro.
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-0/+3
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27std: Rename strbuf operations to stringRicho Healey-24/+24
[breaking-change]