- 18 11月, 2014 1 次提交
-
-
由 bors 提交于
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
-
- 17 11月, 2014 10 次提交
-
-
由 Steven Fackler 提交于
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
-
由 bors 提交于
Useful for #[deriving].
-
由 bors 提交于
The forwards compatible parts of #18645, rebased. Converts implicit coercions from `[T, ..n]` to `&[T]` into explicit references.
-
由 Nick Cameron 提交于
-
由 bors 提交于
Part of #18424. r? @aturon [breaking-change]
-
由 bors 提交于
**match** are much more easy to read when it's not in 1 single line
-
由 bors 提交于
Fix for task in Metabug #18009 (Rebased version of https://github.com/rust-lang/rust/pull/18170) This changes much of about how RingBuf functions. `lo`, `nelts` are replaced by a more traditional `head` and`tail`. The `Vec<Option<T>>` is replaced by a bare pointer that is managed by the `RingBuf` itself. This also expects the ring buffer to always be size that is a power of 2. This change also includes a number of new tests to cover the some areas that could be of concern with manual memory management. The benchmarks have been reworked since the old ones were benchmarking of the Ring buffers growth rather then the actual test. The unit test suite have been expanded, and exposed some bugs in `fn get()` and `fn get_mut()` ## Benchmark **Before:** ``` test ring_buf::tests::bench_grow_1025 ... bench: 8919 ns/iter (+/- 87) test ring_buf::tests::bench_iter_1000 ... bench: 924 ns/iter (+/- 28) test ring_buf::tests::bench_mut_iter_1000 ... bench: 918 ns/iter (+/- 6) test ring_buf::tests::bench_new ... bench: 15 ns/iter (+/- 0) test ring_buf::tests::bench_pop_100 ... bench: 294 ns/iter (+/- 9) test ring_buf::tests::bench_pop_front_100 ... bench: 948 ns/iter (+/- 32) test ring_buf::tests::bench_push_back_100 ... bench: 291 ns/iter (+/- 16) test ring_buf::tests::bench_push_front_100 ... bench: 311 ns/iter (+/- 27 ``` **After:** ``` test ring_buf::tests::bench_grow_1025 ... bench: 2209 ns/iter (+/- 169) test ring_buf::tests::bench_iter_1000 ... bench: 534 ns/iter (+/- 27) test ring_buf::tests::bench_mut_iter_1000 ... bench: 515 ns/iter (+/- 28) test ring_buf::tests::bench_new ... bench: 11 ns/iter (+/- 0) test ring_buf::tests::bench_pop_100 ... bench: 170 ns/iter (+/- 5) test ring_buf::tests::bench_pop_front_100 ... bench: 171 ns/iter (+/- 11) test ring_buf::tests::bench_push_back_100 ... bench: 172 ns/iter (+/- 13) test ring_buf::tests::bench_push_front_100 ... bench: 158 ns/iter (+/- 12) ```
-
由 Huon Wilson 提交于
-
由 bors 提交于
Start comment is a string literal while end comment is made up of two character literals. This change is to make them consistent.
-
由 bors 提交于
Struct variant field visibility is now inherited. Remove `pub` keywords from declarations. Closes #18641 [breaking-change] r? @alexcrichton
-
- 16 11月, 2014 29 次提交
-
-
由 Alexis Beingessner 提交于
-
由 Alexis Beingessner 提交于
-
由 Alexis Beingessner 提交于
-
由 bors 提交于
Closes https://github.com/rust-lang/rust/issues/18614.
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
[breaking-change] This will break any uses of macros that assumed () being a valid literal.
-
由 Niko Matsakis 提交于
-
由 bors 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
-
由 bors 提交于
This moves chars() and lines() out of Buffer and into separate traits (CharsBuffer and LinesBuffer respectively) - this matches the pattern used for bytes() on Reader (with BytesReader). (I came across this when I wanted a trait object of a Buffer, so that I could use read_line(); rustc errors about std::io::Buffer not being object-safe.) [breaking-change] Any uses of Buffer::lines() will need to use the new trait std::io::LinesBuffer. The same is true for Buffer::chars() with std::io::CharsBuffer.
-
由 Alfie John 提交于
-
由 Steven Fackler 提交于
Struct variant field visibility is now inherited. Remove `pub` keywords from declarations. Closes #18641 [breaking-change]
-