- 18 11月, 2014 40 次提交
-
-
由 Daniel Micay 提交于
The trait has an obvious, sensible implementation directly on vectors so the MemWriter wrapper is unnecessary. This will halt the trend towards providing all of the vector methods on MemWriter along with eliminating the noise caused by conversions between the two types. It also provides the useful default Writer methods on Vec<u8>. After the type is removed and code has been migrated, it would make sense to add a new implementation of MemWriter with seeking support. The simple use cases can be covered with vectors alone, and ones with the need for seeks can use a new MemWriter implementation.
-
由 bors 提交于
r? @alexcrichton
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
- CFG_CFLAGS is only used for jemalloc - We grew an extra set of flags for jemalloc (CFG_JEMALLOC_CFLAGS) in addition to CFG_CFLAGS - This kills of CFG_CFLAGS and keeps the more specific and less confusing CFG_JEMALLOC_CFLAGS - Additionally, pass CFG_JEMALLOC_CFLAGS to jemalloc's configure slightly differently so things work when people use --sysroot in their CFLAGS.
-
由 Jakub Bukaj 提交于
Closes #19037 cc #16918 r? @aturon
-
由 Jakub Bukaj 提交于
Baby steps here... Fixed some comments in liblog, libregex, librustc, libstd.
-
由 Jakub Bukaj 提交于
Items defined in the body of a function has no visibility outside it, and thus have no reason to inherit its stability. Closes #17488
-
由 Jakub Bukaj 提交于
Updated all the adjacent character literals in the BCNF that cannot have an optional space between them
-
由 Jakub Bukaj 提交于
Came up on IRC that this was a bit unhelpful as to what should actually be *done*. I am new to changing compiler messages, please let me know if there's anything else that needs to be done to accomadate this change. (My build system is still constantly crashing [Is bors contagious?], so this hasn't been formally `check`ed. I figure it's a simple enough change that any consequences [like compile-fail expected messages?] can be eyeballed by someone more experienced.)
-
由 Jakub Bukaj 提交于
Make struct variant syntax more consistent with struct syntax and fix an assert in middle::typeck. Fix #19003
-
由 Jakub Bukaj 提交于
This code is identical to io::util::copy()
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
Fixes #18986.
-
由 Jakub Bukaj 提交于
-
由 Jakub Bukaj 提交于
Hello, `dylib` [seems][1] to be no longer an option for the `kind` key of the `link` attribute. UPDATE: It should be the other way around: It [seems][1] `dylib` has been lost as a possible variant of the `kind` key of the `link` attribute. See the comment below. Regards, Ivan [1]: https://github.com/rust-lang/rust/blob/8f8753878644b0bfb38d24781edb9ef2028730f2/src/librustc/metadata/creader.rs#L237
-
由 Jakub Bukaj 提交于
Due to not being able to parametrize over array sizes, `Clone` is only implemented for element types that are `Copy`able.
-
由 Jakub Bukaj 提交于
creating a new Id object requires the format to match a subset of `ID` format defined by the DOT language. When the format did not match, the function called assert. This was not mentioned in the docs or the spec. I made the failure explicit by returning an Result<Id, ()>.
-
由 Jakub Bukaj 提交于
`slice_shift_char` splits a `str` into it's leading `char` and the remainder of the `str`. Currently, it returns a `(Option<char>, &str)` such that: "bar".slice_shift_char() => (Some('b'), "ar") "ar".slice_shift_char() => (Some('a'), "r") "r".slice_shift_char() => (Some('r'), "") "".slice_shift_char() => (None, "") This is a little odd. Either a `str` can be split into both a head and a tail or it cannot. So the return type should be `Option<(char, &str)>`. With the current behaviour, in the case of the empty string, the `str` returned is meaningless - it is always the empty string. This PR changes `slice_shift_char` so that: "bar".slice_shift_char() => Some(('b', "ar")) "ar".slice_shift_char() => Some(('a', "r")) "r".slice_shift_char() => Some(('r', "")) "".slice_shift_char() => None
-
由 Jakub Bukaj 提交于
Following [the collections reform RFC](https://github.com/rust-lang/rfcs/pull/235), this PR: * Adds a new `borrow` module to libcore. The module contains traits for borrowing data (`BorrowFrom` and `BorrowFromMut`), generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`). * Deprecates the `_equiv` family of methods on `HashMap` and `HashSet` by instead generalizing the "normal" methods like `get` and `remove` to use the new `std::borrow` infrastructure. * Generalizes `TreeMap`, `TreeSet`, `BTreeMap` and `BTreeSet` to use the new `std::borrow` infrastructure for lookups. [breaking-change]
-
由 Jakub Bukaj 提交于
This is especially useful for declaring a static with external linkage in an executable. There isn't any way to do that currently since we mark everything in an executable as internal by default. Also, a quick fix to have the no-compiler-rt target option respected when building staticlibs as well.
-
由 Cody P Schafer 提交于
- CFG_CFLAGS is gone (it was previously only used by jemalloc anyhow). - CFG_JEMALLOC_CFLAGS may contain flags needed for the compiler to function (produce a binary output). - jemalloc's configure runs $(CC) without EXTRA_CFLAGS, and (without this change) will fail if any flags are required for CC to work.
-
由 Cody P Schafer 提交于
i386-apple-ios already used CFG_JEMALLOC_CFLAGS, so merge that one
-
由 Jakub Bukaj 提交于
Fixes #18986.
-
由 bors 提交于
This is a pretty major refactoring of the method dispatch infrastructure. It is intended to avoid gross inefficiencies and enable caching and other optimizations (e.g. #17995), though it itself doesn't seem to execute particularly faster yet. It also solves some cases where we were failing to resolve methods that we theoretically should have succeeded with. Fixes #18674. cc #18208
-
由 Niko Matsakis 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
由 jmu303 提交于
liblog, libregex, librustc, libstd
-
由 Jorge Aparicio 提交于
Closes #19037
-
由 Aaron Turon 提交于
-
由 Aaron Turon 提交于
-
由 Aaron Turon 提交于
Generalizes the BTree-based collections to use the new BorrowFrom infrastructure for more flexible lookups and removals.
-
由 Aaron Turon 提交于
This commit handles the fallout from deprecating `_with` and `_equiv` methods.
-
由 Aaron Turon 提交于
This commit deprecates the `_equiv` family of methods on `HashMap` and `HashSet` by instead generalizing the "normal" methods like `get` and `remove` to use the new `std::borrow` infrastructure. [breaking-change]
-
由 Aaron Turon 提交于
This commit generalizes methods like `get` and `remove` for `TreeMap` and `TreeSet` to use the new `std::borrow` infrastructure. [breaking-change]
-
由 Aaron Turon 提交于
Following [the collections reform RFC](https://github.com/rust-lang/rfcs/pull/235), this commit adds a new `borrow` module to libcore. The module contains traits for borrowing data (`BorrowFrom` and `BorrowFromMut`), generalized cloning (`ToOwned`), and a clone-on-write smartpointer (`Cow`).
-
由 Niko Matsakis 提交于
yield an incremental improvement (type-checking rustc drops from ~9s to ~8s).
-
由 Niko Matsakis 提交于
Port a simplified versions of pcwalton's "quick reject" mechanism for quickly throwing out method candidates. Yields a 40%-50% improvement in typechecking time as well as lowering peak memory use from 2.2GB to 1.8GB (due to creating fewer types). Conflicts: src/librustc/driver/config.rs src/librustc/middle/ty.rs src/librustc/middle/typeck/check/method.rs src/librustc/middle/typeck/check/mod.rs src/librustc/middle/typeck/coherence/mod.rs
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-