about summary refs log tree commit diff
path: root/src/librustc_data_structures
AgeCommit message (Collapse)AuthorLines
2019-08-25Rollup merge of #62744 - llogiq:tiny-list-refactor, r=eddybMazdak Farrokhzad-46/+45
Refactor `TinyList::contains` and `len` to iterate instead of recurse None
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-1/+1
2019-08-13refactor `len` and `contains` to iterate instead of recurseAndre Bogus-40/+16
2019-08-13add contains benchmarksAndre Bogus-6/+29
2019-08-08Use associated_type_bounds where applicable - closes #61738Ilija Tovilo-2/+7
2019-08-02Remove some more `cfg(test)`sVadim Petrochenkov-12/+5
2019-08-02librustc_data_structures: Unconfigure tests during normal buildVadim Petrochenkov-1168/+1180
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-1/+1
2019-07-28Auto merge of #63090 - Centril:rollup-xnjwm2h, r=Centrilbors-10/+22
Rollup of 8 pull requests Successful merges: - #61856 (Lint attributes on function arguments) - #62360 (Document that ManuallyDrop::drop should not called more than once) - #62392 (Update minifier-rs version) - #62871 (Explicit error message for async recursion.) - #62995 (Avoid ICE when suggestion span is at Eof) - #63053 (SystemTime docs: recommend Instant for elapsed time) - #63081 (tidy: Cleanup the directory whitelist) - #63088 (Remove anonymous_parameters from unrelated test) Failed merges: r? @ghost
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-0/+5
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-1/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-28tidy: Cleanup the directory whitelistVadim Petrochenkov-10/+22
2019-07-25Rollup merge of #62901 - petrochenkov:serde, r=CentrilMazdak Farrokhzad-29/+18
cleanup: Remove `extern crate serialize as rustc_serialize`s
2019-07-23normalize use of backticks for compiler messages in remaining modulesSamy Kacimi-6/+6
https://github.com/rust-lang/rust/issues/60532
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-29/+18
2019-07-19Use sharded maps for interningJohn Kåre Alsaker-59/+129
2019-07-13Rollup merge of #62651 - matthewjasper:rustc-macro-hygiene, r=petrochenkovMazdak Farrokhzad-16/+17
Make some rustc macros more hygienic
2019-07-13Make `newtype_index` hygienic and use allow_internal_unstableMatthew Jasper-16/+17
2019-07-10Add an AtomicCell abstractionJohn Kåre Alsaker-1/+55
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-6/+1
Now that procedural macros no longer link transitively to libsyntax, this shouldn't be needed any more! This commit is an experiment in removing all dynamic libraries from rustc except for librustc_driver itself. Let's see how far we can get with that!
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-0/+1
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-04Switch master to 1.38Mark Rousskov-3/+1
2019-07-03Add missing lifetime specifierJeremy Stucki-1/+1
2019-07-03Remove needless lifetimesJeremy Stucki-3/+3
2019-07-03Remove needless lifetimesJeremy Stucki-3/+3
2019-07-03Remove needless lifetimesJeremy Stucki-14/+14
2019-07-02more centril nitsNiko Matsakis-1/+1
2019-07-02fix silly bugs in binary_search_util testNiko Matsakis-2/+3
2019-07-02address nits by mattewjasperNiko Matsakis-2/+1
2019-07-02just create a binary search slice helper fnNiko Matsakis-114/+72
2019-07-02add a `VecMap` data structureNiko Matsakis-0/+114
2019-07-02pacify the mercilous tidyNiko Matsakis-1/+0
long lines, trailing newlines
2019-07-02add a `depth_first_search` helper functionNiko Matsakis-1/+49
2019-07-02introduce a `VecGraph` abstraction that cheaply stores graphsNiko Matsakis-3/+197
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-07-02implement the graph traits for SCCNiko Matsakis-1/+26
2019-07-02Auto merge of #61871 - Zoxc:no-lift-branch, r=eddybbors-0/+4
Don't use lift to detect local types This overlaps with https://github.com/rust-lang/rust/pull/61392. r? @eddyb
2019-06-26Fix clippy::precedenceIgor Matuszewski-1/+1
2019-06-26Fix clippy::redundant_closureIgor Matuszewski-1/+1
2019-06-26Fix clippy::cast_loslessIgor Matuszewski-6/+6
2019-06-26Fix clippy::redundant_field_namesIgor Matuszewski-1/+1
2019-06-26Check for local types in writeback with debug assertionsJohn Kåre Alsaker-0/+4
2019-06-24Auto merge of #61787 - ecstatic-morse:dataflow-split-block-sets, r=pnkfelixbors-5/+0
rustc_mir: Hide initial block state when defining transfer functions This PR addresses [this FIXME](https://github.com/rust-lang/rust/blob/2887008e0ce0824be4e0e9562c22ea397b165c97/src/librustc_mir/dataflow/mod.rs#L594-L596). This makes `sets.on_entry` inaccessible in `{before_,}{statement,terminator}_effect`. This field was meant to allow implementors of `BitDenotation` to access the initial state for each block (optionally with the effect of all previous statements applied via `accumulates_intrablock_state`) while defining transfer functions. However, the ability to set the initial value for the entry set of each basic block (except for START_BLOCK) no longer exists. As a result, this functionality is mostly useless, and when it *was* used it was used erroneously (see #62007). Since `on_entry` is now useless, we can also remove `BlockSets`, which held the `gen`, `kill`, and `on_entry` bitvectors and replace it with a `GenKill` struct. Variables of this type are called `trans` since they represent a transfer function. `GenKill`s are stored contiguously in `AllSets`, which reduces the number of bounds checks and may improve cache performance: one is almost never accessed without the other. Replacing `BlockSets` with `GenKill` allows us to define some new helper functions which streamline dataflow iteration and the dataflow-at-location APIs. Notably, `state_for_location` used a subtle side-effect of the `kill`/`kill_all` setters to apply the transfer function, and could be incorrect if a transfer function depended on effects of previous statements in the block on `gen_set`. Additionally, this PR merges `BitSetOperator` and `InitialFlow` into one trait. Since the value of `InitialFlow` defines the semantics of the `join` operation, there's no reason to have seperate traits for each. We can add a default impl of `join` which branches based on `BOTTOM_VALUE`. This should get optimized away.
2019-06-24Turn internal lints into tool lintsflip1995-1/+1
2019-06-24Allow default_hash_types in some cratesflip1995-0/+1
2019-06-23Rollup merge of #62068 - ia0:fix_meta_var, r=petrochenkovMazdak Farrokhzad-1/+1
Fix meta-variable binding errors in macros 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. Found by https://github.com/rust-lang/rust/pull/62008
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-06-22Merge `BitSetOperator` and `InitialFlow` into one trait.Dylan MacKenzie-5/+0
Since the value of `InitialFlow` defines the semantics of the `join` operation, there's no reason to have seperate traits for each. We can add a default impl of `join` which branches based on `BOTTOM_VALUE`. This should get optimized away.
2019-06-22Auto merge of #61020 - HeroicKatora:master, r=matthewjasperbors-4/+143
librustc_data_structures: Speedup union of sparse and dense hybrid set This optimization speeds up the union of a hybrid bitset when that switches it from a sparse representation to a dense bitset. It now clones the dense bitset and integrate only the spare elements instead of densifying the sparse bitset, initializing all elements, and then a union on two dense bitset, touching all words a second time. It's not completely certain if the added complexity is worth it but I would like to hear some feedback in any case. Benchmark results from my machine: ``` Now: bit_set::union_hybrid_sparse_to_dense ... bench: 72 ns/iter (+/- 5) Previous: bit_set::union_hybrid_sparse_to_dense ... bench: 90 ns/iter (+/- 6) ``` This being the second iteration of trying to improve the speed, since I missed the return value in the first, and forgot to run the relevant tests. Oops.
2019-06-16Auto merge of #61347 - Centril:stabilize-underscore_const_names, r=petrochenkovbors-2/+3
Stabilize underscore_const_names in 1.37.0 You are now permitted to write: ```rust const _: $type_expression = $term_expression; ``` That is, we change the [grammar of items](https://github.com/rust-lang-nursery/wg-grammar/blob/9d1984d7ae8d6576f943566539a31a5800644c57/grammar/item.lyg#L3-L42), as written in [the *`.lyg`* notation](https://github.com/rust-lang/gll/tree/263bf161dad903e67aa65fc591ced3cab18afa2a#grammar), from: ```java Item = attrs:OuterAttr* vis:Vis? kind:ItemKind; ItemKind = | ... | Const:{ "const" name:IDENT ":" ty:Type "=" value:Expr ";" } | ... ; ``` into: ```java Item = attrs:OuterAttr* vis:Vis? kind:ItemKind; ItemKind = | ... | Const:{ "const" name:IdentOrUnderscore ":" ty:Type "=" value:Expr ";" } | ... ; IdentOrUnderscore = | Named:IDENT | NoName:"_" ; ``` r? @petrochenkov
2019-06-16Separate librustc_data_structures modulechansuke-915/+913