about summary refs log tree commit diff
path: root/src/librustc_data_structures
AgeCommit message (Collapse)AuthorLines
2019-01-06flock: Use fcntl constants directly from libc crate on Unix targetsJohn Paul Adrian Glaubitz-41/+5
Since the values for the fcntl constants can vary from architecture to architecture, it is better to use the values defined in the libc crate instead of assigning literals in the flock code which would make the assumption that all architectures use the same values. Fixes #57007
2018-12-25Remove licensesMark Rousskov-391/+0
2018-12-23Rollup merge of #57034 - Zoxc:query-perf8, r=michaelwoeristerkennytm-0/+2
Inline tweaks r? @michaelwoerister
2018-12-21Inline tweaksJohn Kåre Alsaker-0/+2
2018-12-19Stabilize Vec(Deque)::resize_withScott McMurray-1/+0
Closes #41758
2018-12-17Tweak query code for performanceJohn Kåre Alsaker-0/+23
2018-12-10sorted_map: add contains_key functionljedrz-0/+8
2018-12-10sorted_map: readability/whitespace fixesljedrz-4/+6
2018-12-10sorted_map: add is_emptyljedrz-0/+5
2018-12-10sorted_map: make the impls of Index and get match ones from BTreeMapljedrz-12/+26
2018-12-10sorted_map: change From<Iterator<I>> to FromIterator<I>ljedrz-4/+4
2018-12-10Upgrade `smallvec` to 0.6.7 and use the new `may_dangle` feature.Nicholas Nethercote-1/+1
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-8/+8
2018-12-06Auto merge of #55635 - oli-obk:min_const_unsafe_fn, r=nikomatsakisbors-4/+28
Allow calling `const unsafe fn` in `const fn` behind a feature gate cc #55607 r? @Centril
2018-12-04Automatically generate imports for newtype_index `Deserialize` implsOliver Scherer-8/+16
2018-12-04Make `newtype_index` safeOliver Scherer-4/+20
2018-12-03data_structures: remove tuple_sliceljedrz-71/+0
2018-11-29Use raw_entry for more efficient interningJohn Kåre Alsaker-0/+70
2018-11-25Remove `OpenSnapshot` and `CommittedSnapshot` markers from `SnapshotMap`.Nicholas Nethercote-34/+25
They're not strictly necessary, and they result in the `Vec` being allocated even for the trivial (and common) case where a `start_snapshot` is immediately followed by a `commit` or `rollback_to`.
2018-11-25Introduce `in_snapshot` and `assert_open_snapshot` methods.Nicholas Nethercote-3/+7
This makes the two snapshot implementations more consistent with each other and with crate `ena`.
2018-11-25Make `commit` and `rollback_to` methods take ownership of the snapshots.Nicholas Nethercote-8/+8
Because they shouldn't be reused. This provides consistency with the `ena` crate.
2018-11-25Replace a `.truncate(0)` call with `.clear()`.Nicholas Nethercote-1/+1
2018-11-25Remove `insert_noop`.Nicholas Nethercote-10/+4
Because it's as useless as its name suggests. This commit also renames `UndoLog::Noop` as `UndoLog::Purged`, because (a) that's a more descriptive name and (b) it matches the name used in similar code in `librustc/infer/region_constraints/mod.rs`.
2018-11-25Update to `ena` 0.11.0.Nicholas Nethercote-1/+1
This version has some significant speed-ups relating to snapshotting.
2018-11-24Rollup merge of #55945 - oli-obk:static_assert_arg_type, r=michaelwoeristerkennytm-1/+2
Ensure that the argument to `static_assert` is a `bool` cc @eddyb
2018-11-21rustc: implement and use Default on more types.Eduard-Mihai Burtescu-23/+25
2018-11-21rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.Eduard-Mihai Burtescu-3/+1
2018-11-16Ensure that the `static_assert!` argument is a `bool`Oliver Scherer-1/+2
2018-11-16remove unused dependencyAndreas Jonson-1/+0
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-4/+4
fix various typos in doc comments
2018-11-13fix various typos in doc commentsAndy Russell-4/+4
2018-11-13Move `static_assert!` into librustc_data_structures.Nicholas Nethercote-0/+22
This means it can be used by more crates.
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-2/+2
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-07Rollup merge of #55501 - nnethercote:DoCompleted, r=pnkfelixkennytm-69/+84
Make `process_obligations`' computation of `completed` optional. It's only used in tests. This reduces instruction counts on several benchmarks by 0.5--1%.
2018-11-06refactor: use shorthand fieldsteresy-2/+2
2018-10-31Bump nightly to 1.32.0Alex Crichton-1/+0
* Also update the bootstrap compiler * Update cargo to 1.32.0 * Clean out stage0 annotations
2018-10-30Make `process_obligations`' computation of `completed` optional.Nicholas Nethercote-69/+84
It's only used in tests. This reduces instruction counts on several benchmarks by 0.5--1%.
2018-10-29Use opt.take() instead of mem::replace(opt, None)ljedrz-5/+3
2018-10-23Auto merge of #54778 - scottmcm:stabilize-ihle, r=pnkfelixbors-1/+1
Stabilize impl_header_lifetime_elision in 2015 ~~This is currently blocked on https://github.com/rust-lang/rust/issues/54902; it should be good after that~~ It's already stable in 2018; this finishes the stabilization. FCP completed (https://github.com/rust-lang/rust/issues/15872#issuecomment-417953153), proposal (https://github.com/rust-lang/rust/issues/15872#issuecomment-412759783). Tracking issue: https://github.com/rust-lang/rust/issues/15872 Usage examples (from libcore): https://github.com/rust-lang/rust/pull/54687
2018-10-19Stabilize impl_header_lifetime_elision in 2015Scott McMurray-1/+1
It's already stable in 2018; this finishes the stabilization.
2018-10-19Update unit testsOliver Scherer-19/+19
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-11/+17
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-21/+6
2018-10-18Rollup merge of #55127 - ljedrz:simplify_hybridbitset, r=matthewjasperkennytm-36/+14
Remove HybridBitSet::dummy This simplifies some of the `HybridBitSet` code. cc @nnethercote
2018-10-16Remove HybridBitSet::dummyljedrz-36/+14
2018-10-14Added graphviz visualization for obligation forests.Diogo Sousa-0/+105
This can be a big help when debugging the trait resolver.
2018-10-01Rollup merge of #54656 - nieksand:workqueue_doc, r=varkorkennytm-1/+1
Correct doc for WorkQueue<T>::pop(). The old function doc looks like copy-pasta from WorkQueue::insert(). WorkQueue::pop() does not enqueue nor does it return a boolean false. Doc corrected accordingly.
2018-09-30Auto merge of #53255 - orium:fix-bug-overflow-send, r=arielb1bors-25/+76
Add a per-tree error cache to the obligation forest This implements part of what @nikomatsakis mentioned in https://github.com/rust-lang/rust/pull/30533#issuecomment-170705871: > 1. If you find that a new obligation is a duplicate of one already in the tree, the proper processing is: > * if that other location is your parent, you should abort with a cycle error (or accept it, if coinductive) > * if that other location is not an ancestor, you can safely ignore the new obligation In particular it implements the "if that other location is your parent accept it, if coinductive" part. This fixes #40827. I have to say that I'm not 100% confident that this is rock solid. This is my first pull request :tada:, and I didn't know anything about the trait resolver before this. In particular I'm not totally sure that comparing predicates is enough (for instance, do we need to compare `param_env` as well?). Also, I'm not sure what @nikomatsakis mentions [here](https://github.com/rust-lang/rust/issues/30977#issue-127091096), but it might be something that affects this PR: > In particular, I am wary of getting things wrong around inference variables! We can always add things to the set in their current state, and if unifications occur then the obligation is just kind of out-of-date, but I want to be sure we don't accidentally fail to notice that something is our ancestor. I decided this was subtle enough to merit its own PR. Anyway, go ahead and review :slightly_smiling_face:. Ref #30977. # Performance We are now copying vectors around, so I decided to do some benchmarking. A simple benchmark shows that this does not seem to affect performance in a measurable way: I ran `cargo clean && cargo build` 20 times on actix-web (84b27db) and these are the results: ```text rustc master: Mean Std.Dev. Min Median Max real 66.637 2.996 57.220 67.714 69.314 user 307.293 14.741 258.093 312.209 320.702 sys 12.524 0.653 10.499 12.726 13.193 rustc fix-bug-overflow-send: Mean Std.Dev. Min Median Max real 66.297 4.310 53.532 67.516 70.348 user 306.812 22.371 236.917 314.748 326.229 sys 12.757 0.952 9.671 13.125 13.544 ``` I will do a more comprehensive benchmark (compiling rustc stage1) and post the results. r? @nikomatsakis, @nnethercote PS: It is better to review this commit-by-commit.
2018-09-30Deduplicate errors in the obligation forest.Diogo Sousa-19/+72
Fixes #40827.
2018-09-30Typos and style fixes.Diogo Sousa-8/+6