Commit Graph

2452 Commits

Author SHA1 Message Date
Eduard Burtescu
a96abca2a4 rustc_metadata: replace RBML with a simple and type-safe scheme. 2016-09-20 20:08:05 +03:00
Eduard Burtescu
24aef24e1a rustc_metadata: split the Def description of a DefId from item_children. 2016-09-20 20:08:05 +03:00
Eduard Burtescu
adddfccf2b rustc_metadata: move all encoding/decoding helpers to methods. 2016-09-20 20:08:05 +03:00
Eduard Burtescu
ef4352fba6 rustc_metadata: group information into less tags. 2016-09-20 20:08:04 +03:00
Eduard Burtescu
89736e8671 rustc: remove ImplOrTraitItemId and TraitDef's associated_type_names. 2016-09-20 20:08:03 +03:00
Eduard Burtescu
8734aaa33e rustc_metadata: move more RBML tags to auto-serialization. 2016-09-20 20:08:02 +03:00
Eduard Burtescu
02c4155d2c rustc: remove hir::fold. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
903ec52ba9 rustc: replace uses of NodeId in Def, other than closures and labels. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
bors
1265cbf4e0 Auto merge of #36393 - petrochenkov:ancient, r=eddyb
Remove some obsolete code from the compiler
2016-09-15 13:34:11 -07:00
bors
6ffdda1ba1 Auto merge of #36293 - liigo:docblock-short, r=steveklabnik
rustdoc: don't collapse `docblock-short`

![docblock-short](https://cloud.githubusercontent.com/assets/346530/18267298/137d2542-7451-11e6-9c8e-dd4e1f1fea29.png)
2016-09-14 15:39:23 -07:00
bors
5a5736db91 Auto merge of #36472 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 5 pull requests

- Successful merges: #36334, #36335, #36363, #36374, #36467
- Failed merges:
2016-09-14 08:28:05 -07:00
Guillaume Gomez
d939cbeefe Rollup merge of #36334 - GuillaumeGomez:run_but, r=steveklabnik
Set run button transparent instead of invisible

r? @steveklabnik

And of course a screenshot:

![screenshot from 2016-09-08 01-15-45](https://cloud.githubusercontent.com/assets/3050060/18331849/31fe1f8c-7562-11e6-9ae9-1dab44089ec6.png)
2016-09-14 17:15:36 +02:00
bors
97b561a094 Auto merge of #35667 - ollie27:rustdoc_opaque_structs, r=steveklabnik
rustdoc: Don't add extra newlines for fully opaque structs

Changes the definition for braced structs with only private or hidden fields to save space on the page.

Before:
```
pub struct Vec<T> {
    // some fields omitted
}
```
After:
```
pub struct Vec<T> { /* fields omitted */ }
```

This also cleans up empty braced structs.

Before:
```
pub struct Foo {
}
```
After:
```
pub struct Foo {}
```

[before](https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html) [after](https://ollie27.github.io/rust_doc_test/std/vec/struct.Vec.html)

cc #34713
2016-09-14 04:57:47 -07:00
Vadim Petrochenkov
4b6c4c08df Remove some ancient code providing special support for newtypes 2016-09-13 23:33:50 +03:00
Guillaume Gomez
26315bf015 Rollup merge of #36045 - ollie27:rustdoc_titles3, r=steveklabnik
rustdoc: Add missing item types to page titles

Most pages include the item type in the title such as "Struct std::vec::Vec". However it is missing from the pages for foreign functions, type definitions, macros, statics and constants. This adds them so for example, instead of a title of "std::u32::MAX" it is "Constant std::u32::MAX" to match the others.

[before](https://doc.rust-lang.org/nightly/std/u32/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/u32/constant.MAX.html)
[before](https://doc.rust-lang.org/nightly/std/io/type.Result.html) [after](https://ollie27.github.io/rust_doc_test/std/io/type.Result.html)

Previous discussions: #34345, #35003
2016-09-10 15:57:50 +02:00
Liigo
26d5f99ec0 rustdoc: more docblock-short styles 2016-09-09 12:28:53 +08:00
Liigo
93cdce4cf3 rustdoc: don't collapse docblock-short 2016-09-09 12:28:37 +08:00
Oliver Middleton
8154a6bc69 rustdoc: Don't add extra newlines for fully opaque structs
Changes the definition for opaque structs to look like `pub struct Vec<T>
{ /* fields omitted */ }` to save space on the page.

Also only use one line for empty braced structs.
2016-09-09 01:41:42 +01:00
Vadim Petrochenkov
f2b672d556 Refactor TyStruct/TyEnum/TyUnion into TyAdt 2016-09-08 22:17:53 +03:00
Guillaume Gomez
a2faf5477c Set run button transparent instead of invisible 2016-09-08 01:16:06 +02:00
bors
9627e9ef6e Auto merge of #36266 - Sawyer47:issue-35169, r=alexcrichton
rustdoc: Filter more incorrect methods inherited through Deref

Old code filtered out only static methods. This code also excludes &mut self methods if there is no DerefMut implementation.

Fixes #35169
2016-09-07 12:30:03 -07:00
bors
1d04201565 Auto merge of #36078 - ollie27:rustdoc_search_assocconst, r=alexcrichton
rustdoc: Fix associated consts in search results

Associated consts can appear in none trait impls so need to be treated
like methods when generating the search index.

Fixes #36031
2016-09-05 22:32:36 -07:00
Piotr Jawniak
915bbdac58 rustdoc: Filter more incorrect methods inherited through Deref
Old code filtered out only static methods. This code also excludes
&mut self methods if there is no DerefMut implementation
2016-09-05 20:24:55 +02:00
bors
86995dc8c5 Auto merge of #36240 - leeopop:master, r=jseyfried
Allow CompilerControllers to access rustc_plugin::registry::Registry

fixes #36064

I chose to put ructc_plugin::registry::Registry structure
into CompilerState structure, instead of Session structure.
This will preserve dependencies among librustc, libructc_driver, and libructc_plugin.

@jseyfried @sanxiyn
2016-09-04 18:36:42 -07:00
Vadim Petrochenkov
e05e74ac83 Replace _, _ with .. 2016-09-04 12:30:33 +03:00
Keunhong Lee
ca5dfd0c97 Allow CompilerControllers to access rustc_plugin::registry::Registry structure. 2016-09-04 03:22:56 +00:00
Vadim Petrochenkov
c2ca1530db Fix rebase + address comments 2016-09-03 13:39:34 +03:00
Vadim Petrochenkov
6792bd99fe Support unions in rustdoc 2016-09-03 13:39:34 +03:00
Vadim Petrochenkov
cbd912baba Add union types 2016-09-03 13:37:25 +03:00
Vadim Petrochenkov
4001c039de Add unions to HIR 2016-09-03 13:37:25 +03:00
bors
147371f58f Auto merge of #34982 - arielb1:bad-tuples-and-objects, r=nikomatsakis
Turn the RFC1592 warnings into hard errors

The warnings have already reached stable, and I want to improve the trait error reporting code.

Turning warnings into errors, this is obviously a [breaking-change].

r? @nikomatsakis

cc @rust-lang/compiler
2016-09-01 06:05:04 -07:00
Ariel Ben-Yehuda
7b92d05804 turn the RFC1592 warnings into hard errors
The warnings have already reached stable

The test rfc1592_deprecated is covered by `bad_sized` and
`unsized6`.

Fixes #33242
Fixes #33243
2016-09-01 13:34:56 +03:00
bors
2c01bb8851 Auto merge of #35718 - michaelwoerister:incr-comp-dir-locking, r=alexcrichton
Implement synchronization scheme for incr. comp. directory

This PR implements a copy-on-write-based synchronization scheme for the incremental compilation cache directory. For technical details, see the documentation at the beginning of `rustc_incremental/persist/fs.rs`.

The PR contains unit tests for some functions but for testing whether the scheme properly handles races, a more elaborate test setup would be needed. It would probably involve a small tool that allows to manipulate the incremental compilation directory in a controlled way and then letting a compiler instance run against directories in different states. I don't know if it's worth the trouble of adding another test category to `compiletest`, but I'd be happy to do so.

Fixes #32754
Fixes #34957
2016-08-31 12:56:15 -07:00
bors
71ee82a8aa Auto merge of #36066 - jseyfried:rollup, r=Manishearth
Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - #35591: Add a field `span: Span` to `ast::Generics`.
 - #35618: Remove variant `Mod` of `ast::PathListItemKind` and refactor the remaining variant `ast::PathListKind::Ident` to a struct `ast::PathListKind_`.
 - #35480: Change uses of `Constness` in the AST to `Spanned<Constness>`.
  - c.f. `MethodSig`, `ItemKind`
 - #35728: Refactor `cx.pat_enum()` into `cx.pat_tuple_struct()` and `cx.pat_path()`.
 - #35850: Generalize the elements of lists in attributes from `MetaItem` to a new type `NestedMetaItem` that can represent a `MetaItem` or a literal.
 - #35917: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`.
  - Besides removing imports of these traits, this won't cause fallout.
 - Add a variant `Union` to `ItemKind` to future proof for `union` (c.f. #36016).
 - Remove inherent methods `attrs` and `fold_attrs` of `Annotatable`.
  - Use methods `attrs` and `map_attrs` of `HasAttrs` instead.

r? @Manishearth
2016-08-30 00:36:19 -07:00
Michael Woerister
004a7eb127 Fix rustbuild 2016-08-29 14:27:40 -04:00
Michael Woerister
206e7b6fc7 Add some features to flock. 2016-08-29 14:27:40 -04:00
Michael Woerister
6ef8198406 Move flock.rs from librustdoc to librustc_data_structures. 2016-08-29 14:27:40 -04:00
Oliver Middleton
b56d61cfd7 rustdoc: Fix associated consts in search results
Associated consts can appear in none trait impls so need to be treated
like methods when generating the search index.
2016-08-29 18:36:57 +01:00
Jeffrey Seyfried
c14ff2884d Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrc
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28 10:40:04 +00:00
Jeffrey Seyfried
6303640e85 Rollup merge of #35850 - SergioBenitez:master, r=nrc
Implement RFC#1559: allow all literals in attributes

Implemented rust-lang/rfcs#1559, tracked by #34981.
2016-08-28 10:38:19 +00:00
Jeffrey Seyfried
37f30173a0 Rollup merge of #35618 - jseyfried:ast_view_path_refactor, r=eddyb
Refactor `PathListItem`s

This refactors away variant `Mod` of `ast::PathListItemKind` and refactors the remaining variant `Ident` to a struct `ast::PathListItem_`.
2016-08-28 10:31:24 +00:00
Oliver Middleton
a7c671bb90 rustdoc: Add missing item types to page titles
Most pages include the item type in the title such as "Struct
std::vec::Vec". However it is missing from the pages for foreign
functions, type definitions, macros, statics and constants. This adds them
so for example, instead of a title of "std::u32::MAX" it is "Constant
std::u32::MAX" to match the others.
2016-08-27 17:00:36 +01:00
Jonas Schievink
5adf003b99 Use deterministic FnvHash{Map,Set} in rustdoc 2016-08-27 15:20:45 +02:00
Eduard Burtescu
7a8d4822d8 rustc: use Vec<Kind> in Substs, where Kind is a &TyS | &Region tagged pointer. 2016-08-27 01:15:07 +03:00
Eduard Burtescu
dffd238f8b rustc: pass ty::Region behind an interned 'tcx reference. 2016-08-27 01:15:06 +03:00
Eduard Burtescu
5222fa58a1 rustc: use accessors for Substs::{types,regions}. 2016-08-27 00:25:04 +03:00
Jeffrey Seyfried
bfb01bbb26 Refactor away AttrMetaMethods. 2016-08-25 20:41:40 +00:00
Jeffrey Seyfried
e264828b27 Refactor away AttributeMethods. 2016-08-25 20:41:39 +00:00
Jeffrey Seyfried
4eb08bb2ab Refactor away AttrNestedMetaItemMethods. 2016-08-25 20:41:32 +00:00