- 12 5月, 2015 3 次提交
-
-
由 Eduard Burtescu 提交于
Fix ty::populate_implementations_for_trait_if_necessary to load the trait's impls from all the crates.
-
由 Eduard Burtescu 提交于
rustc: rename ty::populate_implementations_for_type_if_necessary to make it clear that it only populates inherent impls.
-
由 Eduard Burtescu 提交于
-
- 30 4月, 2015 2 次提交
-
-
由 Ariel Ben-Yehuda 提交于
Puts implementations in bins hashed by the fast-reject key, and only looks up the relevant impls, reducing O(n^2)-ishness Before: 688.92user 5.08system 8:56.70elapsed 129%CPU (0avgtext+0avgdata 1208164maxresident)k, LLVM 379.142s After: 637.78user 5.11system 8:17.48elapsed 129%CPU (0avgtext+0avgdata 1201448maxresident)k LLVM 375.552s Performance increase is +7%-ish
-
由 Ariel Ben-Yehuda 提交于
The former stopped making sense when we started interning substs and made TraitRef a 2-word copy type, and I'm moving the latter into an arena as they live as long as the type context.
-
- 24 4月, 2015 3 次提交
-
-
由 Sean Patrick Santos 提交于
-
由 Sean Patrick Santos 提交于
Functional changes for associated constants. Cross-crate usage of associated constants is not yet working.
-
由 Sean Patrick Santos 提交于
Introduces new variants and types in syntax::ast, middle::ty, and middle::def.
-
- 22 4月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
This commit removes all the old casting/generic traits from `std::num` that are no longer in use by the standard library. This additionally removes the old `strconv` module which has not seen much use in quite a long time. All generic functionality has been supplanted with traits in the `num` crate and the `strconv` module is supplanted with the [rust-strconv crate][rust-strconv]. [rust-strconv]: https://github.com/lifthrasiir/rust-strconv This is a breaking change due to the removal of these deprecated crates, and the alternative crates are listed above. [breaking-change]
-
- 15 4月, 2015 1 次提交
-
-
由 Tamir Duberstein 提交于
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
-
- 04 4月, 2015 1 次提交
-
-
由 Jonathan S 提交于
-
- 31 3月, 2015 2 次提交
-
-
由 Aaron Turon 提交于
This commit stabilizes the `std::num` module: * The `Int` and `Float` traits are deprecated in favor of (1) the newly-added inherent methods and (2) the generic traits available in rust-lang/num. * The `Zero` and `One` traits are reintroduced in `std::num`, which together with various other traits allow you to recover the most common forms of generic programming. * The `FromStrRadix` trait, and associated free function, is deprecated in favor of inherent implementations. * A wide range of methods and constants for both integers and floating point numbers are now `#[stable]`, having been adjusted for integer guidelines. * `is_positive` and `is_negative` are renamed to `is_sign_positive` and `is_sign_negative`, in order to address #22985 * The `Wrapping` type is moved to `std::num` and stabilized; `WrappingOps` is deprecated in favor of inherent methods on the integer types, and direct implementation of operations on `Wrapping<X>` for each concrete integer type `X`. Closes #22985 Closes #21069 [breaking-change]
-
由 Alex Crichton 提交于
This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes #22890 [breaking-change]
-
- 27 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
Now that support has been removed, all lingering use cases are renamed.
-
- 13 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
This adds a special code path for impls which are listed as default impls to ensure that they're loaded correctly.
-
- 07 3月, 2015 1 次提交
-
-
由 Niko Matsakis 提交于
now have a simple set of trait def-ids. During coherence, we use a separate table to track the default impls for any given trait so that we can report a nice error. This fixes various bugs in the metadata encoding that led to `ty::trait_has_default_impl` yielding the wrong values in the cross-crate case. (In particular, default impl def-ids were not included in the list of all impl def-ids; I debated fixing just that, but this approach seemed cleaner overall, since we usually treat the "defaulted" bit on traits as being a property of the trait, and now iterating over a list of impls doesn't intermingle default impls with normal impls.)
-
- 05 3月, 2015 2 次提交
-
-
由 Alex Crichton 提交于
This commit deprecates the majority of std::old_io::fs in favor of std::fs and its new functionality. Some functions remain non-deprecated but are now behind a feature gate called `old_fs`. These functions will be deprecated once suitable replacements have been implemented. The compiler has been migrated to new `std::fs` and `std::path` APIs where appropriate as part of this change.
-
由 Niko Matsakis 提交于
us to construct trait-references and do other things without forcing a full evaluation of the supertraits. One downside of this scheme is that we must invoke `ensure_super_predicates` before using any construct that might require knowing about the super-predicates.
-
- 04 3月, 2015 1 次提交
-
-
由 Michael Woerister 提交于
This allows to create proper debuginfo line information for items inlined from other crates (e.g. instantiations of generics). Only the codemap's 'metadata' is stored in a crate's metadata. That is, just filename, line-beginnings, etc. but not the actual source code itself. We are thus missing the opportunity of making Rust the first "open-source-only" programming language out there. Pity.
-
- 03 3月, 2015 1 次提交
-
-
由 James Miller 提交于
Many of the core rust libraries have places that rely on integer wrapping behaviour. These places have been altered to use the wrapping_* methods: * core::hash::sip - A number of macros * core::str - The `maximal_suffix` method in `TwoWaySearcher` * rustc::util::nodemap - Implementation of FnvHash * rustc_back::sha2 - A number of macros and other places * rand::isaac - Isaac64Rng, changed to use the Wrapping helper type Some places had "benign" underflow. This is when underflow or overflow occurs, but the unspecified value is not used due to other conditions. * collections::bit::Bitv - underflow when `self.nbits` is zero. * collections::hash::{map,table} - Underflow when searching an empty table. Did cause undefined behaviour in this case due to an out-of-bounds ptr::offset based on the underflowed index. However the resulting pointers would never be read from. * syntax::ext::deriving::encodable - Underflow when calculating the index of the last field in a variant with no fields. These cases were altered to avoid the underflow, often by moving the underflowing operation to a place where underflow could not happen. There was one case that relied on the fact that unsigned arithmetic and two's complement arithmetic are identical with wrapping semantics. This was changed to use the wrapping_* methods. Finally, the calculation of variant discriminants could overflow if the preceeding discriminant was `U64_MAX`. The logic in `rustc::middle::ty` for this was altered to avoid the overflow completely, while the remaining places were changed to use wrapping methods. This is because `rustc::middle::ty::enum_variants` now throws an error when the calculated discriminant value overflows a `u64`. This behaviour can be triggered by the following code: ``` enum Foo { A = U64_MAX, B } ``` This commit also implements the remaining integer operators for Wrapped<T>.
-
- 28 2月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
The `u64_from_be_bytes` and `u64_to_be_bytes` functions are being deprecated with no replacement for now. [breaking-change]
-
- 24 2月, 2015 4 次提交
-
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
- 22 2月, 2015 3 次提交
-
-
由 Flavio Percoco 提交于
-
由 Flavio Percoco 提交于
-
由 Flavio Percoco 提交于
-
- 21 2月, 2015 1 次提交
-
-
由 Niko Matsakis 提交于
-
- 13 2月, 2015 2 次提交
-
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
- 03 2月, 2015 1 次提交
-
-
由 Jorge Aparicio 提交于
-
- 01 2月, 2015 1 次提交
-
-
由 Alfie John 提交于
-
- 31 1月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
This commits adds an associated type to the `FromStr` trait representing an error payload for parses which do not succeed. The previous return value, `Option<Self>` did not allow for this form of payload. After the associated type was added, the following attributes were applied: * `FromStr` is now stable * `FromStr::Err` is now stable * `FromStr::from_str` is now stable * `StrExt::parse` is now stable * `FromStr for bool` is now stable * `FromStr for $float` is now stable * `FromStr for $integral` is now stable * Errors returned from stable `FromStr` implementations are stable * Errors implement `Display` and `Error` (both impl blocks being `#[stable]`) Closes #15138
-
- 30 1月, 2015 1 次提交
-
-
由 Niko Matsakis 提交于
paren sugar is legal.
-
- 29 1月, 2015 1 次提交
-
-
由 Jorge Aparicio 提交于
-
- 28 1月, 2015 1 次提交
-
-
由 Ms2ger 提交于
This matches contemporary Rust style.
-
- 27 1月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
-
- 20 1月, 2015 1 次提交
-
-
由 Jorge Aparicio 提交于
-
- 16 1月, 2015 1 次提交
-
-
由 Flavio Percoco 提交于
-