about summary refs log tree commit diff
path: root/src/test/run-pass/realloc-16687.rs
AgeCommit message (Collapse)AuthorLines
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-183/+0
2019-07-27tests: Add missing run-pass annotationsVadim Petrochenkov-0/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-4/+4
2018-08-05Fix test/run-passvarkor-1/+1
2018-06-18Rename OOM to allocation errorSimon Sapin-3/+5
The acronym is not descriptive unless one has seen it before. * Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle. * Rename `set_oom_hook` to `set_alloc_error_hook` * Rename `take_oom_hook` to `take_alloc_error_hook` Bikeshed: `alloc` v.s. `allocator`, `error` v.s. `failure`
2018-06-11Remove some unneeded castsSimon Sapin-2/+2
2018-06-11Remove alloc::Opaque and use *mut u8 as pointer type for GlobalAllocMike Hommey-2/+2
2018-05-30Pass a `Layout` to `oom`Mike Hommey-3/+3
As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent, there are use-cases where the OOM handler needs to know the size of the allocation that failed. The alignment might also be a cause for allocation failure, so providing it as well can be useful.
2018-04-22Replace GlobalAlloc::oom with a lang itemSteven Fackler-3/+3
2018-04-17stabilize `nonnull_cast` featuretinaun-1/+1
2018-04-12Rename alloc::Void to alloc::OpaqueSimon Sapin-2/+2
2018-04-12Use NonNull<Void> instead of *mut u8 in the Alloc traitMike Hommey-9/+9
Fixes #49608
2018-04-12Remove the now-unit-struct AllocErr parameter of oom()Simon Sapin-2/+2
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-34/+41
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2015-07-09Use vec![elt; n] where possibleUlrik Sverdrup-2/+1
The common pattern `iter::repeat(elt).take(n).collect::<Vec<_>>()` is exactly equivalent to `vec![elt; n]`, do this replacement in the whole tree. (Actually, vec![] is smart enough to only call clone n - 1 times, while the former solution would call clone n times, and this fact is virtually irrelevant in practice.)
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-1/+1
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-14/+14
Now that support has been removed, all lingering use cases are renamed.
2015-03-23Require feature attributes, and add them where necessaryBrian Anderson-0/+2
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-9/+9
2015-02-18Update suffixes en masse in tests using `perl -p -i -e`Niko Matsakis-9/+9
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-10/+10
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-8/+8
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-2/+2
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-03Remove deprecated functionalityAlex Crichton-1/+2
This removes a large array of deprecated functionality, regardless of how recently it was deprecated. The purpose of this commit is to clean out the standard libraries and compiler for the upcoming alpha release. Some notable compiler changes were to enable warnings for all now-deprecated command line arguments (previously the deprecated versions were silently accepted) as well as removing deriving(Zero) entirely (the trait was removed). The distribution no longer contains the libtime or libregex_macros crates. Both of these have been deprecated for some time and are available externally.
2014-11-18std: Stabilize std::fmtAlex Crichton-5/+5
This commit applies the stabilization of std::fmt as outlined in [RFC 380][rfc]. There are a number of breaking changes as a part of this commit which will need to be handled to migrated old code: * A number of formatting traits have been removed: String, Bool, Char, Unsigned, Signed, and Float. It is recommended to instead use Show wherever possible or to use adaptor structs to implement other methods of formatting. * The format specifier for Boolean has changed from `t` to `b`. * The enum `FormatError` has been renamed to `Error` as well as becoming a unit struct instead of an enum. The `WriteError` variant no longer exists. * The `format_args_method!` macro has been removed with no replacement. Alter code to use the `format_args!` macro instead. * The public fields of a `Formatter` have become read-only with no replacement. Use a new formatting string to alter the formatting flags in combination with the `write!` macro. The fields can be accessed through accessor methods on the `Formatter` structure. Other than these breaking changes, the contents of std::fmt should now also all contain stability markers. Most of them are still #[unstable] or #[experimental] [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0380-stabilize-std-fmt.md [breaking-change] Closes #18904
2014-11-01bubble up out-of-memory errors from liballocDaniel Micay-0/+2
This makes the low-level allocation API suitable for use cases where out-of-memory conditions need to be handled. Closes #18292 [breaking-change]
2014-10-25Fix spelling mistakes in comments.Joseph Crail-1/+1
2014-10-08saner parameter order for reallocation functionsDaniel Micay-15/+14
Using reallocate(old_ptr, old_size, new_size, align) makes a lot more sense than reallocate(old_ptr, new_size, align, old_size) and matches up with the order used by existing platform APIs like mremap. Closes #17837 [breaking-change]
2014-09-23Add deallocate calls to the realloc-16687.rs test.Felix S. Klock II-4/+17
Fix #17303.
2014-09-16Fallout from renamingAaron Turon-1/+1
2014-08-23Test case to illustate/reproduce bug.Felix S. Klock II-0/+167