- 14 2月, 2015 3 次提交
-
-
由 bors 提交于
Replaced outdated use of the `range(start, end)` function where appropriate with `start..end`, and tweaked the examples to compile and run with the latest rust. I also fixed two periphery compile issues in reference.md which were occluding whether there were any new errors created by these changes.
-
由 bors 提交于
This PR adds a dedicated regression test for #15881 as @cmr suggested.
-
由 bors 提交于
This PR is an optimization of the `FromIterator` implementation of `Vec` Benchmark: https://gist.github.com/alexcrichton/03d666159a28a80e7c70 Before: test macro_repeat1 ... bench: 57 ns/iter (+/- 1) test macro_repeat2 ... bench: 56 ns/iter (+/- 1) test map_clone1 ... bench: 828 ns/iter (+/- 13) test map_clone2 ... bench: 828 ns/iter (+/- 8) test repeat1 ... bench: 1104 ns/iter (+/- 10) test repeat2 ... bench: 1106 ns/iter (+/- 11) After: test macro_repeat1 ... bench: 75 ns/iter (+/- 21) test macro_repeat2 ... bench: 59 ns/iter (+/- 31) test map_clone1 ... bench: 34 ns/iter (+/- 22) test map_clone2 ... bench: 52 ns/iter (+/- 21) test repeat1 ... bench: 34 ns/iter (+/- 11) test repeat2 ... bench: 33 ns/iter (+/- 12) The idea behind this optimization is to avoid all bounds checks for space already allocated into the vector. This may involve running the iterator twice, but the first run of the iterator should be optimizable to a memcpy or memset if possible. The same treatment can in theory be applied to `Vec::extend` but the benchmarks for that currently get *worse* if the change is applied. This appears to be some LLVM optimizations going awry but it's seems prudent to land at least the `collect` portion beforehand.
-
- 13 2月, 2015 17 次提交
-
-
由 bors 提交于
Names of structs, enums, traits, type aliases and type parameters (i.e. all identifiers that can be used as full paths in type position) are not allowed to match the names of primitive types. See #20427 for more information. This is a minor [breaking-change]
-
由 bors 提交于
borrowck: Prevent partial reinitialization of uninitialized structures This is a pnkfelix-swiped squash of #22079, which was a rebase and revision of #18963 Fixes #18571.
-
由 bors 提交于
This resolves a number of bugs that trigger stack overflows or other cyclic errors. r? @nick29581 (it is based on work that you started) f? @jroesch (also based on your branch)
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
and the type appearing in the trait would (previously) trigger an error message. The code is now accepted. No reported issue that I am aware of.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
fetch trait definitions. This allows is to be used early in the compiler without triggering ICEs. Also make -Z verbose less horrifyingly ugly.
-
由 Niko Matsakis 提交于
predicates and renaming some things.
-
由 Alex Crichton 提交于
This PR is an optimization of the `FromIterator` implementation of `Vec` Benchmark: https://gist.github.com/alexcrichton/03d666159a28a80e7c70 Before: test macro_repeat1 ... bench: 57 ns/iter (+/- 1) test macro_repeat2 ... bench: 56 ns/iter (+/- 1) test map_clone1 ... bench: 828 ns/iter (+/- 13) test map_clone2 ... bench: 828 ns/iter (+/- 8) test repeat1 ... bench: 1104 ns/iter (+/- 10) test repeat2 ... bench: 1106 ns/iter (+/- 11) After: test macro_repeat1 ... bench: 75 ns/iter (+/- 21) test macro_repeat2 ... bench: 59 ns/iter (+/- 31) test map_clone1 ... bench: 34 ns/iter (+/- 22) test map_clone2 ... bench: 52 ns/iter (+/- 21) test repeat1 ... bench: 34 ns/iter (+/- 11) test repeat2 ... bench: 33 ns/iter (+/- 12) The idea behind this optimization is to avoid all bounds checks for space already allocated into the vector. This may involve running the iterator twice, but the first run of the iterator should be optimizable to a memcpy or memset if possible. The same treatment can in theory be applied to `Vec::extend` but the benchmarks for that currently get *worse* if the change is applied. This appears to be some LLVM optimizations going awry but it's seems prudent to land at least the `collect` portion beforehand.
-
由 Niko Matsakis 提交于
and predicates. Try to document how things work. More cleanup is needed here but I had to draw the line somewhere gosh darn it.
-
由 Niko Matsakis 提交于
Split the predicates listing out of `TraitDef` and `TypeScheme` and into a separate map, `tcx.predicates`, that is used for both traits and other kinds of items. Also use two newtypes to distinguish instantiated predicates from the raw, unsubstituted predicates extracted from the map.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Vadim Petrochenkov 提交于
-
- 12 2月, 2015 20 次提交
-
-
由 bors 提交于
-
由 Felix S. Klock II 提交于
-
由 Kevin Butler 提交于
enumerations that implement the `Drop` trait. This breaks code like: struct Struct { f: String, g: String, } impl Drop for Struct { ... } fn main() { let x = Struct { ... }; drop(x); x.f = ...; } Change this code to not create partially-initialized structures. For example: struct Struct { f: String, g: String, } impl Drop for Struct { ... } fn main() { let x = Struct { ... }; drop(x); x = Struct { f: ..., g: ..., } } Closes #18571. [breaking-change] ---- (Joint authorship by pcwalton and Ryman; thanks all!)
-
由 bors 提交于
There are two dots at the end of a line in the documentation of std::char.
-
由 Mátyás Mustoha 提交于
-
由 Nick Sarten 提交于
-
由 Nick Sarten 提交于
-
由 Nick Sarten 提交于
Replaced outdated use of the `range(start, end)` function where approriate with `start..end`, and tweaked the examples to compile and run with the latest rust. I also fixed two periphery compile issues in reference.md which were occluding whether there were any new errors created by these changes, so I fixed them.
-
由 bors 提交于
PR #22012 followup: clean up vtable::check_object_cast by reusing `fresh_ty` (hat tip to nikomatsakis, who was the one who pointed out this simplification to the logic.)
-
由 bors 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
This flag seems to have erroneously been set to `true`.
-
由 Alex Crichton 提交于
-
由 Felix S. Klock II 提交于
(hat tip to nikomatsakis who was the one who pointed out this simplification to the logic.)
-
由 Alex Crichton 提交于
- DoubleEndedIterator - ExactSizeIterator - RandomAccessIterator
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 807][rfc] which adds a `std::net` module for basic neworking based on top of `std::io`. This module serves as a replacement for the `std::old_io::net` module and networking primitives in `old_io`. [rfc]: fillmein The major focus of this redesign is to cut back on the level of abstraction to the point that each of the networking types is just a bare socket. To this end functionality such as timeouts and cloning has been removed (although cloning can be done through `duplicate`, it may just yield an error). With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`. This work is entirely based on #20785 and the only changes were to alter the in-memory representation to match the `libc`-expected variants and to move from public fields to accessors.
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 807][rfc] which adds a `std::net` module for basic neworking based on top of `std::io`. This module serves as a replacement for the `std::old_io::net` module and networking primitives in `old_io`. [rfc]: fillmein The major focus of this redesign is to cut back on the level of abstraction to the point that each of the networking types is just a bare socket. To this end functionality such as timeouts and cloning has been removed (although cloning can be done through `duplicate`, it may just yield an error). With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`. This work is entirely based on #20785 and the only changes were to alter the in-memory representation to match the `libc`-expected variants and to move from public fields to accessors.
-
由 Alex Crichton 提交于
-
由 David Creswick 提交于
- DoubleEndedIterator - ExactSizeIterator - RandomAccessIterator
-