Commit Graph

311 Commits

Author SHA1 Message Date
kennytm
b5f102c7ae
Rollup merge of #48840 - varkor:idxset-cleanup, r=pnkfelix
Remove some unnecessary IdxSet methods

This replaces `IdxSet:: reset_to_empty` with `IdxSet:: clear`, and `IdxSet::elems`/`IdxSet::each_bit` with `IdxSet::iter`. Based on some [comments on #rustc](https://botbot.me/mozilla/rustc/2018-01-23/?msg=96063396).

r? @pnkfelix
2018-03-15 00:15:46 +08:00
Niko Matsakis
993c1488cc add canonicalize method to InferCtxt [VIC] 2018-03-13 11:21:31 -04:00
John Kåre Alsaker
184fd32a03 Move PROFQ_CHAN to a Session field 2018-03-09 08:04:31 +01:00
Manish Goregaokar
457975369b
Rollup merge of #48808 - Zoxc:reg-diag, r=michaelwoerister
Move REGISTERED_DIAGNOSTICS to a ParseSess field

r? @michaelwoerister
2018-03-08 11:26:02 -08:00
Manish Goregaokar
6d0d34336d
Rollup merge of #48699 - frewsxcv:frewsxcv-impl-trait, r=nikomatsakis
Replace iterator structures with `impl Trait`.

Two commits:

* Replace iterator structures with `impl Trait`.
* Run rustfmt on `src/librustc_data_structures/graph/mod.rs`.
2018-03-08 11:25:57 -08:00
Oliver Schneider
918b6d7633
Produce instead of pointers 2018-03-08 08:08:14 +01:00
John Kåre Alsaker
2aa19feeb9 Add with_lock, with_read_lock and with_write_lock 2018-03-08 05:30:43 +01:00
Corey Farwell
08a0182536 Run rustfmt on src/librustc_data_structures/graph/mod.rs. 2018-03-07 20:10:01 -05:00
Corey Farwell
3e60d996a0 Replace iterator structures with impl Trait. 2018-03-07 20:09:32 -05:00
Alex Crichton
5a5e941014 Merge branch 'metadata-send-sync' of https://github.com/Zoxc/rust into update-cargo 2018-03-07 07:13:10 -08:00
John Kåre Alsaker
62089c335f Make metadata references Send + Sync 2018-03-07 01:56:59 +01:00
varkor
f69a0999e7 Remove IdxSet::elems 2018-03-06 01:14:38 +00:00
varkor
89d12478ac Remove IdxSet::each_bit 2018-03-06 01:14:36 +00:00
varkor
6701d9020f Remove IdxSet::reset_to_empty 2018-03-06 00:58:01 +00:00
leonardo.yvens
2e7e68b762 while let all the things 2018-03-05 15:58:54 -03:00
bors
9ff5cb5aea Auto merge of #48587 - Zoxc:transitive-relation, r=nikomatsakis
Make TransitiveRelation thread safe. Avoid locking by using get_mut in some cases

r? @nikomatsakis
2018-03-04 09:41:32 +00:00
Sean Griffin
fec4d3b711 Bump ena 2018-03-01 08:04:26 -07:00
Sean Griffin
c30183873e Remove dead code
These modules were replaced with re-exports from ena
2018-03-01 08:04:26 -07:00
Niko Matsakis
c7953bb6d6 obtain UnificationTable and snapshot_vec from ena instead
The ena version has an improved interface. I suspect
`librustc_data_structures` should start migrating out to crates.io in
general.
2018-03-01 08:04:26 -07:00
John Kåre Alsaker
89e55d108c Make TransitiveRelation thread safe. Avoid locking by using get_mut in some cases. 2018-02-27 19:07:33 +01:00
Manish Goregaokar
6ec5dc399c Rollup merge of #48402 - eddyb:y-u-no-inline, r=nikomatsakis
rustc_data_structures: add missing #[inline].

r? @nikomatsakis
2018-02-24 12:48:02 -08:00
Santiago Pastorino
6a74615fe3
Run rustfmt over bitvec.rs and region_infer/values.rs 2018-02-22 21:27:52 -03:00
Santiago Pastorino
aa3409c898
Fix typo otherwies -> otherwise 2018-02-22 21:27:52 -03:00
Santiago Pastorino
ff9eb56c6e
Use Sparse bitsets instead of dense ones for NLL results
Fixes #48170
2018-02-22 21:27:26 -03:00
Santiago Pastorino
e5d79c4bc7
Move word type and word size usage to constants & make it of 128 bits 2018-02-22 20:15:53 -03:00
Eduard-Mihai Burtescu
713b05f072 rustc_data_structures: add missing #[inline]. 2018-02-21 19:21:26 +02:00
Aaron Hill
6728f21d85
Generate documentation for auto-trait impls
A new section is added to both both struct and trait doc pages.

On struct/enum pages, a new 'Auto Trait Implementations' section displays any
synthetic implementations for auto traits. Currently, this is only done
for Send and Sync.

On trait pages, a new 'Auto Implementors' section displays all types
which automatically implement the trait. Effectively, this is a list of
all public types in the standard library.

Synthesized impls for a particular auto trait ('synthetic impls') take
into account generic bounds. For example, a type 'struct Foo<T>(T)' will
have 'impl<T> Send for Foo<T> where T: Send' generated for it.

Manual implementations of auto traits are also taken into account. If we have
the following types:

'struct Foo<T>(T)'
'struct Wrapper<T>(Foo<T>)'
'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes
this sound somehow

Then Wrapper will have the following impl generated:
'impl<T> Send for Wrapper<T>'
reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send'
to hold

Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are
taken into account by synthetic impls

However, if a type can *never* implement a particular auto trait
(e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be
generated (in this case, 'impl<T> !Send for MyStruct<T>')

All of this means that a user should be able to copy-paste a synthetic
impl into their code, without any observable changes in behavior
(assuming the rest of the program remains unchanged).
2018-02-18 16:29:24 -05:00
Matthias Krüger
4452446292 fix more typos found by codespell. 2018-02-17 17:38:49 +01:00
kennytm
4f8ea49d50
Rollup merge of #47835 - Mark-Simulacrum:remove-data-structs, r=nikomatsakis
Remove unused data structures

Cleanup; as far as I can tell the compiler no longer uses these.
2018-02-10 14:23:54 +08:00
Mark Simulacrum
caa42e11bb Remove VecCell 2018-01-28 16:01:32 -07:00
Mark Simulacrum
505ef7bc06 Remove unused blake2b implementation 2018-01-28 16:01:32 -07:00
Santiago Pastorino
da545cee60 Make region inference use a dirty list
Fixes #47602
2018-01-26 21:56:49 -03:00
Simon Sapin
55c50cd8ac Stabilize std::ptr::NonNull 2018-01-20 11:09:23 +01:00
Simon Sapin
f19baf0977 Rename std::ptr::Shared to NonNull
`Shared` is now a deprecated `type` alias.

CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2018-01-20 10:55:16 +01:00
Michael Woerister
94f3037f4b Shorten names of some compiler generated artifacts. 2018-01-08 12:30:52 +01:00
Malo Jaffré
3f073c409a Try to fix a perf regression by updating log
Upgrade `log` to `0.4` in multiple crates.
2018-01-07 16:54:05 +01:00
Malo Jaffré
cbb32a9418 Fix docs for future pulldown migration 2018-01-01 14:44:12 +01:00
bors
a6fc84440f Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1
Convert warning about `*const _` to a future-compat lint

#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.

fixes #46837
tracking issue for the future-compatibility lint: #46906

r? @arielb1
2017-12-25 04:55:57 +00:00
Christopher Durham
056370167a Annotate raw pointer target types
cc https://github.com/rust-lang/rust/issues/46906
cc https://github.com/rust-lang/rust/pull/46914
2017-12-23 03:47:13 -05:00
Michael Hewson
1e2bd7021a fix errors in rustc_data_structures 2017-12-22 18:16:19 -05:00
John Kåre Alsaker
30a39ac5ce Make IndexVec implement Send and Sync 2017-12-21 19:21:40 +01:00
John Kåre Alsaker
970c613e4a Add sync module to rustc_data_structures 2017-12-17 14:14:51 +01:00
bors
b3392f8ae4 Auto merge of #46560 - Yoric:incr, r=michaelwoerister
Loading the dependency graph in the background

Patch is a bit longer than I expected, due to the fact that most of this code relies upon a `Session` value, which is not `Sync`.
2017-12-16 03:54:10 +00:00
Felix S. Klock II
e437e499d1 Implement Borrow/BorrowMut/ToOwned relationships betweed IdxSetBuf and IdxSet. 2017-12-13 13:50:40 -06:00
Matt Brubeck
3024c1434a Use Try syntax for Option in place of macros or match 2017-12-09 14:18:33 -08:00
David Teller
8500fb9c69 Issue #46555 - Making IndexVec Send if its contents are Send 2017-12-07 16:04:59 +01:00
Niko Matsakis
271616088f transtive_relation: fix typo in comment for parents 2017-12-04 10:46:35 -05:00
Niko Matsakis
4de7336862 extend TransitiveRelation with parents function 2017-12-04 08:51:14 -05:00
Niko Matsakis
fb4b06ab3b rename greater_than to reachable_from 2017-12-04 08:51:13 -05:00
Michael Woerister
687e099b44 incr.comp.: Make a bunch of query results encodable. 2017-11-28 13:03:39 +01:00