about summary refs log tree commit diff
path: root/src/libarena
AgeCommit message (Collapse)AuthorLines
2016-01-06Deprecate reflection-based ArenaPiotr Czarnecki-0/+6
2016-01-05Add tests for dropsPiotr Czarnecki-1/+126
2016-01-05Ran rustfmtPiotr Czarnecki-35/+19
2016-01-05Move tests aroundPiotr Czarnecki-66/+64
2016-01-05Implement fn alloc_bytes for Arena and fn clear for both arena typesPiotr Czarnecki-18/+143
Closes #18471 Closes #18261
2016-01-05Rework Arena codePiotr Czarnecki-85/+82
2016-01-05Rework Arena structurePiotr Czarnecki-34/+36
Implements in-place growth. Removes the use of Rc within Arena. Closes #22847
2016-01-05TypedArena implements SendPiotr Czarnecki-5/+7
2016-01-05Improve TypedArena's chunk allocation schemePiotr Czarnecki-75/+90
Closes #17931 Fixes #18037
2015-12-21Register new snapshotsAlex Crichton-8/+0
Lots of cruft to remove!
2015-11-26Auto merge of #30015 - petrochenkov:staged, r=brsonbors-1/+1
Closes https://github.com/rust-lang/rust/issues/30008 `#[stable]`, `#[unstable]` and `#[rustc_deprecated]` are now guarded by `#[feature(staged_api)]` r? @brson
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-24rustfmt: liballoc, liballoc_*, libarenaNick Cameron-8/+11
2015-11-12libarena: deny warnings in doctestsKevin Butler-1/+2
2015-10-16Auto merge of #29020 - goyox86:goyox86/rustfmting-libarena, r=nrcbors-3/+9
Hi Rustaceans! This is the result of running latest rustfmt on libarena! //cc @nrc
2015-10-15Fixed comment.Jose Narvaez-1/+2
2015-10-14Manual fixups.Jose Narvaez-5/+4
2015-10-13Rustfmt-ing libarena.Jose Narvaez-77/+62
2015-10-11Run rustfmt on libarena.Ahmed Charles-70/+50
2015-10-06Add RFC 1238's `unsafe_destructor_blind_to_params` (UGEH) where needed.Felix S. Klock II-0/+7
I needed it in `RawVec`, `Vec`, and `TypedArena` for `rustc` to bootstrap; but of course that alone was not sufficient for `make check`. Later I added `unsafe_destructor_blind_to_params` to collections, in particular `LinkedList` and `RawTable` (the backing representation for `HashMap` and `HashSet`), to get the regression tests exercising cyclic structure from PR #27185 building. ---- Note that the feature is `dropck_parametricity` (which is not the same as the attribute's name). We will almost certainly vary our strategy here in the future, so it makes some sense to have a not-as-ugly name for the feature gate. (The attribute name was deliberately selected to be ugly looking.)
2015-09-11std: Internalize almost all of `std::rt`Alex Crichton-1/+2
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
2015-09-08some more clippy-based improvementsAndre Bogus-9/+7
2015-08-15Add issue for the rustc_private feature everywhereAlex Crichton-1/+1
2015-08-11rollup merge of #27622: eefriedman/https-urlAlex Crichton-2/+2
Also fixes a few outdated links.
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-2/+2
Also fixes a few outdated links.
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-5/+4
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.
2015-06-24Make `align_of` behave like `min_align_of`.Huon Wilson-6/+6
This removes a footgun, since it is a reasonable assumption to make that pointers to `T` will be aligned to `align_of::<T>()`. This also matches the behaviour of C/C++. `min_align_of` is now deprecated. Closes #21611.
2015-06-17alloc: Split apart the global `alloc` featureAlex Crichton-1/+2
2015-06-17core: Split apart the global `core` featureAlex Crichton-1/+3
This commit shards the broad `core` feature of the libcore library into finer grained features. This split groups together similar APIs and enables tracking each API separately, giving a better sense of where each feature is within the stabilization process. A few minor APIs were deprecated along the way: * Iterator::reverse_in_place * marker::NoCopy
2015-06-11Conver reborrows to .iter() calls where appropriateJoshua Landau-1/+1
2015-05-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
2015-04-28Register new snapshotsTamir Duberstein-3/+0
2015-04-10Doc: remove a "safety note" made obsolete by dropck for TypedArenaSimon Sapin-4/+0
https://botbot.me/mozilla/rust-internals/2015-04-10/?msg=36316959&page=6
2015-04-02Deprecate MarkerTrait and PhantomFn.Niko Matsakis-1/+4
2015-03-25Add trivial cast lints.Nick Cameron-1/+2
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; ```
2015-03-18Register new snapshotsAlex Crichton-6/+0
2015-03-17Replace TyDesc and its uses with trait vtables and a type_name intrinsic.Eduard Burtescu-1/+23
2015-03-16impl {i,u}{8,16,32,64,size}Jorge Aparicio-0/+1
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-1/+1
2015-03-06Rollup merge of #23056 - awlnx:master, r=nrcManish Goregaokar-0/+2
2015-03-05fix for new attributes failing. issue #22964awlnx-0/+2
2015-03-03Add `: Box<_>` or `::Box<_>` type annotations to various places.Felix S. Klock II-4/+4
This is the kind of change that one is expected to need to make to accommodate overloaded-`box`. ---- Note that this is not *all* of the changes necessary to accommodate Issue 22181. It is merely the subset of those cases where there was already a let-binding in place that made it easy to add the necesasry type ascription. (For unnamed intermediate `Box` values, one must go down a different route; `Box::new` is the option that maximizes portability, but has potential inefficiency depending on whether the call is inlined.) ---- There is one place worth note, `run-pass/coerce-match.rs`, where I used an ugly form of `Box<_>` type ascription where I would have preferred to use `Box::new` to accommodate overloaded-`box`. I deliberately did not use `Box::new` here, because that is already done in coerce-match-calls.rs. ---- Precursor for overloaded-`box` and placement-`in`; see Issue 22181.
2015-02-18Fallout: arena needs to use phantomdata since invariantlifetime is goneNiko Matsakis-2/+4
2015-02-11Added lifetime param to Arena.Felix S. Klock II-21/+44
It (1.) is invariant, (2.) must strictly outlive the arena itself, (3.) constrains the inputs to the arena so that their borrows must also strictly outlive the arena itself. This implies that, for now, one can no longer have cross-references between data allocated via the same `Arena` (even when the data is not subject to the Drop Check rule). Instead one must carry multiple `Arena` instances, or (more commonly), use one or more `TypedArena` instances with enums encoding the different variants of allocated data.
2015-02-11Add core::marker::PhantomData.Felix S. Klock II-0/+6
Port `core::ptr::Unique` to have `PhantomData`. Add `PhantomData` to `TypedArena` and `Vec` as well. As a drive-by, switch `ptr::Unique` from a tuple-struct to a struct with fields.
2015-02-09int/uint => isize/usize in liblibc/liballoc/libarenawe-38/+37
2015-02-03Auto merge of #21613 - alfie:suffix-small, r=alexcrichtonbors-8/+8
2015-02-02More deprecating of i/u suffixesAlfie John-8/+8
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-1/+1
2015-01-30Test fixes and rebase conflictsAlex Crichton-8/+5
Also some tidying up of a bunch of crate attributes