- 08 5月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
This commit is an implementation of [RFC 1066][rfc] where the conclusion was that leaking a value is a safe operation in Rust code, so updating the signature of this function follows suit. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1066-safe-mem-forget.md Closes #25186
-
- 14 4月, 2015 1 次提交
-
-
由 Andrew Paseltiner 提交于
-
- 01 4月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
-
- 31 3月, 2015 1 次提交
-
-
由 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]
-
- 26 3月, 2015 4 次提交
-
-
由 Felix S. Klock II 提交于
(Reviewed rest of code; did not see other `pub` items that needed such treatment.) Driveby: fix typo in comment in ptr.rs.
-
由 Felix S. Klock II 提交于
-
由 Felix S. Klock II 提交于
-
由 Felix S. Klock II 提交于
Refactored code so that the drop-flag values for initialized (`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names. Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the same as `mem::zeroed`, but the point is that it abstracts away from the particular choice of value for `DTOR_DONE`). Filling-drop needs to use something other than `ptr::read_and_zero`, so I added such a function: `ptr::read_and_drop`. But, libraries should not use it if they can otherwise avoid it. Fixes to tests to accommodate filling-drop.
-
- 25 3月, 2015 2 次提交
-
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
-
- 14 3月, 2015 1 次提交
-
-
由 Joseph Crail 提交于
-
- 25 2月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
Specifically, the following actions were taken: * The `copy_memory` and `copy_nonoverlapping_memory` functions to drop the `_memory` suffix (as it's implied by the functionality). Both functions are now marked as `#[stable]`. * The `set_memory` function was renamed to `write_bytes` and is now stable. * The `zero_memory` function is now deprecated in favor of `write_bytes` directly. * The `Unique` pointer type is now behind its own feature gate called `unique` to facilitate future stabilization. * All type parameters now are `T: ?Sized` wherever possible and new clauses were added to the `offset` functions to require that the type is sized. [breaking-change]
-
- 16 2月, 2015 1 次提交
-
-
由 Felix S. Klock II 提交于
-
- 06 2月, 2015 1 次提交
-
-
由 Mikhail Zabaluev 提交于
Only the second reference's mutability is relevant to the mutability of the returned reference.
-
- 25 1月, 2015 1 次提交
-
-
由 Alfie John 提交于
-
- 24 1月, 2015 2 次提交
-
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
-
- 22 1月, 2015 2 次提交
-
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
-
- 07 1月, 2015 2 次提交
-
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
[breaking-change]
-
- 06 1月, 2015 3 次提交
-
-
由 Alex Crichton 提交于
This reverts commit f031671c. Conflicts: src/libcollections/slice.rs src/libcore/iter.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/rwlock.rs
-
由 Nick Cameron 提交于
-
由 Steve Klabnik 提交于
-
- 17 12月, 2014 1 次提交
-
-
由 Steve Klabnik 提交于
-
- 16 12月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
This commit takes a second pass through the `std::mem` module for stabilization. The only remaining non-stable items in this module were `forget`, `transmute`, `copy_lifetime`, and `copy_lifetime_mut`. The `forget` and `transmute` intrinsics themselves were marked `#[stable]` to propgate into the `core::mem` module so they would be marked stable. The `copy_lifetime` functions were left `unstable`, but `Sized?` annotations were added to the parameters to allow more general use with DSTs. The `size_of_val`, `min_align_of_val`, and `align_of_val` functions would like to grow `Sized?` bounds, but this is a backwards compatible change that currently ICEs the compiler, so this change was not made at this time. Finally, the module itself was declared `#![stable]` in this pass.
-
- 17 11月, 2014 1 次提交
-
-
由 Alex Gaynor 提交于
-
- 20 10月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
-
- 28 8月, 2014 1 次提交
-
-
由 Niko Matsakis 提交于
-
- 26 8月, 2014 1 次提交
-
-
由 Nick Cameron 提交于
-
- 15 8月, 2014 1 次提交
-
-
由 Luqman Aden 提交于
-
- 30 6月, 2014 2 次提交
-
-
由 Steven Fackler 提交于
Libcore's test infrastructure is complicated by the fact that many lang items are defined in the crate. The current approach (realcore/realstd imports) is hacky and hard to work with (tests inside of core::cmp haven't been run for months!). Moving tests to a separate crate does mean that they can only test the public API of libcore, but I don't feel that that is too much of an issue. The only tests that I had to get rid of were some checking the various numeric formatters, but those are also exercised through normal format! calls in other tests.
-
由 Patrick Walton 提交于
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
-
- 29 6月, 2014 1 次提交
-
-
由 Alex Crichton 提交于
-
- 25 6月, 2014 1 次提交
-
-
由 Niko Matsakis 提交于
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]
-
- 24 6月, 2014 1 次提交
-
-
由 Pawel Olzacki 提交于
-
- 19 6月, 2014 4 次提交
-
-
由 Brendan Zabarauskas 提交于
The consensus on #14917 was that the proposed names were too long.
-
由 Brendan Zabarauskas 提交于
-
由 Brendan Zabarauskas 提交于
This reduces the complexity of the trait hierarchy.
-
由 Brendan Zabarauskas 提交于
-