about summary refs log tree commit diff
path: root/src/librustc_data_structures/indexed_vec.rs
AgeCommit message (Collapse)AuthorLines
2019-09-29move index_vec into rustc_indexcsmoe-830/+0
2019-09-16Redefine `NodeIndex` as a `newtype_index!`.Nicholas Nethercote-1/+1
This commit removes the custom index implementation of `NodeIndex`, which probably predates `newtype_index!`. As well as eliminating code, it improves the debugging experience, because the custom implementation had the property of being incremented by 1 (so it could use `NonZeroU32`), which was incredibly confusing if you didn't expect it. For some reason, I also had to remove an `unsafe` block marker from `from_u32_unchecked()` that the compiler said was now unnecessary.
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-19/+11
2019-07-13Make `newtype_index` hygienic and use allow_internal_unstableMatthew Jasper-16/+17
2019-07-02introduce a `VecGraph` abstraction that cheaply stores graphsNiko Matsakis-2/+13
This is perhaps better than the linked list approach I was using before. Lower memory overhead, Theta(N+E) storage. Does require a sort. =)
2019-06-23Fix meta-variable binding errors in macrosJulien Cretin-1/+1
The errors are either: - The meta-variable used in the right-hand side is not bound (or defined) in the left-hand side. - The meta-variable used in the right-hand side does not repeat with the same kleene operator as its binder in the left-hand side. Either it does not repeat enough, or it uses a different operator somewhere. This change should have no semantic impact.
2019-05-25Add Step::sub_usizeTim Vermeulen-0/+5
2019-03-13Fix newtype_indexJohn Kåre Alsaker-2/+6
2019-03-08expand unused doc comment diagnosticAndy Russell-5/+25
Report the diagnostic on macro expansions, and add a label indicating why the comment is unused.
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5
2019-02-09librustc_data_structures => 2018Taiki Endo-4/+4
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-04Automatically generate imports for newtype_index `Deserialize` implsOliver Scherer-8/+16
2018-12-04Make `newtype_index` safeOliver Scherer-4/+20
2018-09-26make NLL handle `IfEq` bounds by using SCC normalizationNiko Matsakis-0/+7
2018-09-11Simplify Scope/ScopeData to have less chance of introducing UB or size increasesOliver Schneider-2/+4
2018-09-11Address attribute naming and use `Bound` enumOliver Schneider-1/+1
2018-09-11Forbid the upper indices of `IndexVec` indices to allow for niche optimizationsOliver Schneider-2/+3
2018-09-07add `const_fn` featureNiko Matsakis-3/+3
2018-09-07switch back to using a plain `u32`, not `NonZeroU32`Niko Matsakis-5/+5
This reverts (part of) commit cb9a336ae2cf6a75fdcc130853286349cb424c96.
2018-09-07remove use of `from_u32_unchecked`Niko Matsakis-2/+20
2018-09-07switch to using `NonZeroU32` to represent indicesNiko Matsakis-5/+5
2018-09-07rewrite constants to use NewType::MAX instead of u32::MAXNiko Matsakis-5/+9
Also, adjust the MAX to be `u32::MAX - 1`, leaving room for `u32::MAX` to become a sentinel value in the future.
2018-09-07add various `#[inline]` directivesNiko Matsakis-0/+10
2018-09-07remove all references to `private` from outside the macroNiko Matsakis-12/+44
2018-09-07change from tuple struct to brace structNiko Matsakis-7/+9
2018-09-07make field always private, add `From` implsNiko Matsakis-64/+52
2018-09-07add a commentNiko Matsakis-0/+7
2018-09-07change syntax of `newtype_index` to look like a struct declNiko Matsakis-3/+30
2018-07-25parameterize `BitVector` and `BitMatrix` by their index typesNiko Matsakis-2/+8
2018-07-25implement `Step` for `Idx` typesNiko Matsakis-0/+29
This way, we can iterate over a `Range<T>` where `T: Idx`
2018-07-16Generate region values directly to reduce memory usage.David Wood-0/+18
Also modify `SparseBitMatrix` so that it does not require knowing the dimensions in advance, but instead grows on demand.
2018-07-12strengthen `Idx` to require `Ord + Hash`Niko Matsakis-1/+2
You should always be able to know that any `T` where `T: Idx` can be used in a `BTreeMap` and a `FxHashMap`.
2018-06-09convert type-check constraints into NLL constraints on the flyNiko Matsakis-0/+5
We used to accumulate a vector of type-check constraints, but now we generate them as we go, and just store the NLL-style `OutlivesConstraint` and `TypeTest` information.
2018-03-29Move RangeArguments to {core::std}::ops and rename to RangeBoundsSimon Sapin-4/+3
These unstable items are deprecated: * The `std::collections::range::RangeArgument` reexport * The `std::collections::range` module.
2018-03-19Convert SerializedDepGraph to be a struct-of-arraysWesley Wiser-0/+7
Fixes #47326
2018-03-13add `canonicalize` method to `InferCtxt` [VIC]Niko Matsakis-1/+1
2018-02-24Rollup merge of #48402 - eddyb:y-u-no-inline, r=nikomatsakisManish Goregaokar-0/+6
rustc_data_structures: add missing #[inline]. r? @nikomatsakis
2018-02-22Use Sparse bitsets instead of dense ones for NLL resultsSantiago Pastorino-0/+15
Fixes #48170
2018-02-21rustc_data_structures: add missing #[inline].Eduard-Mihai Burtescu-0/+6
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2017-12-21Make IndexVec implement Send and SyncJohn Kåre Alsaker-1/+1
2017-12-07Issue #46555 - Making IndexVec Send if its contents are SendDavid Teller-0/+4
2017-11-16IndexVec: add `'_` to make clear where borrowing is happeningNiko Matsakis-2/+2
2017-11-16make `RegionVid` implement `Idx` and use `IndexVec`Niko Matsakis-0/+5
2017-11-04Make DEBUG_FORMAT = custom workSantiago Pastorino-17/+17
Fixes #45763, ht by @durka
2017-11-01newindex_type macro: make index private by default and allow pub through configPaul Daniel Faria-48/+53
2017-11-01newtype_index: Support simpler serializable override, custom derive, and fix ↵Paul Daniel Faria-115/+202
mir_opt tests
2017-11-01Clean up macro argument matches so they satisfy tidy checksPaul Daniel Faria-14/+51
2017-11-01Add derive and doc comment capabilities to newtype_index macroPaul Daniel Faria-30/+106