134 Commits

Author SHA1 Message Date
Oliver Middleton
6fe7786db6 rustdoc: Fix some local inlining issues
* Only inline public items when inlining glob imports.
* Never inline while in a private module or a child of a private module.
* Never inline impls. This allowed the removal of a workaround in the
rendering code.
2016-11-14 18:24:47 +00:00
Jeffrey Seyfried
0a998b86e9 Support #[macro_reexport]ing custom derives. 2016-11-10 11:19:34 +00:00
Jeffrey Seyfried
a0a9f8ca1b Fix fallout in librustdoc. 2016-11-10 10:04:43 +00:00
Nicholas Nethercote
00e48affde Replace FnvHasher use with FxHasher.
This speeds up compilation by 3--6% across most of rustc-benchmarks.
2016-11-08 15:14:59 +11:00
Corey Farwell
a400cccd54 Cleanup return statements. 2016-10-02 21:58:20 -04:00
Eduard Burtescu
fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
Vadim Petrochenkov
6792bd99fe Support unions in rustdoc 2016-09-03 13:39:34 +03:00
Vadim Petrochenkov
4001c039de Add unions to HIR 2016-09-03 13:37:25 +03:00
bors
71ee82a8aa Auto merge of - jseyfried:rollup, r=Manishearth
Batch up libsyntax breaking changes

Batch of the following syntax-[breaking-change] changes:
 - : Add a field `span: Span` to `ast::Generics`.
 - : Remove variant `Mod` of `ast::PathListItemKind` and refactor the remaining variant `ast::PathListKind::Ident` to a struct `ast::PathListKind_`.
 - : Change uses of `Constness` in the AST to `Spanned<Constness>`.
  - c.f. `MethodSig`, `ItemKind`
 - : Refactor `cx.pat_enum()` into `cx.pat_tuple_struct()` and `cx.pat_path()`.
 - : Generalize the elements of lists in attributes from `MetaItem` to a new type `NestedMetaItem` that can represent a `MetaItem` or a literal.
 - : 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. ).
 - 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
Jeffrey Seyfried
c14ff2884d Rollup merge of - 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 - SergioBenitez:master, r=nrc
Implement RFC#1559: allow all literals in attributes

Implemented rust-lang/rfcs#1559, tracked by .
2016-08-28 10:38:19 +00:00
Jonas Schievink
5adf003b99 Use deterministic FnvHash{Map,Set} in rustdoc 2016-08-27 15:20:45 +02:00
Jeffrey Seyfried
bfb01bbb26 Refactor away AttrMetaMethods. 2016-08-25 20:41:40 +00:00
Jeffrey Seyfried
4eb08bb2ab Refactor away AttrNestedMetaItemMethods. 2016-08-25 20:41:32 +00:00
Sergio Benitez
8250a26b5b Implement RFC#1559: allow all literals in attributes. 2016-08-25 13:25:22 -07:00
Jeffrey Seyfried
9d99fe98ad Fix fallout in rustdoc. 2016-08-21 22:59:40 +00:00
Guillaume Gomez
890e3a7a1a Rollup merge of - ollie27:rustdoc_renamed_reexport_list, r=GuillaumeGomez
rustdoc: Fix inlined renamed reexports in import lists

Fixes 
2016-06-28 16:05:15 +02:00
Oliver Middleton
ec7da3dbd7 rustdoc: Fix inlined renamed reexports in import lists 2016-06-26 03:08:10 +01:00
Jonathan Turner
6ae3502134 Move errors from libsyntax to its own crate 2016-06-23 08:07:35 -04:00
bors
2940eb54bd Auto merge of - ollie27:rustdoc_inline, r=alexcrichton
rustdoc: Don't inline #[doc(hidden)] pub use

Currently if a `#[doc(hidden)] pub use` item is inlined the `hidden`
attribute is ignored so the item can appear in the docs. By never inlining
such imports, they can be stripped.

An example in `std` is [`__OsLocalKeyInner`](https://doc.rust-lang.org/nightly/std/thread/struct.__OsLocalKeyInner.html) which clearly should not be documented.
2016-06-14 05:04:38 -07:00
Oliver Middleton
a7c467418f rustdoc: Don't inline #[doc(hidden)] pub use
Currently if a `#[doc(hidden)] pub use` item is inlined the `hidden`
attribute is ignored so the item can appear in the docs. By never inlining
such imports, they can be stripped.
2016-06-11 23:00:42 +01:00
Vadim Petrochenkov
ee4e55398b Introduce TyCtxt::expect_def/expect_resolution helpers and use them where possible 2016-06-10 01:03:54 +03:00
Eduard Burtescu
f8ea24edc8 rustc: Avoid free functions taking &TyCtxt and &InferCtxt. 2016-05-11 04:14:58 +03:00
mitaa
0b5b782e39 Linkify extern crates on rustdoc pages 2016-04-25 11:26:33 +02:00
mitaa
cfad7ad947 Perform doc-reachability check for inlined impls
This changes the current rule that impls within `doc(hidden)` modules
aren't inlined, to only inlining impls where the implemented
trait and type are reachable in documentation.
2016-04-18 01:55:54 +02:00
mitaa
ea83349c9f Retire rustdocs ANALYSISKEY
The thread-local isn't needed and consists of mostly empty fields which
were just used to move the data into `html::render::CACHE_KEY`.
2016-04-13 19:39:17 +02:00
Jeffrey Seyfried
bb66d91c98 Make hir::Visibility non-copyable and add ty::Visibility 2016-04-07 04:31:45 +00:00
Eduard Burtescu
8b0937293b rustc: move rustc_front to rustc::hir. 2016-04-06 09:01:55 +03:00
mitaa
4c71347e94 Consider doc(no_inline) in crate-local inlining 2016-03-22 21:11:00 +01:00
mitaa
a20e6bb162 Consider doc(hidden) for crate-local inlining 2016-03-10 03:29:46 +01:00
mitaa
ae7fca1e1f Check for doc(inline) instead of .*(inline) 2016-03-09 02:05:39 +01:00
mitaa
8f6e09a956 Simplify if let/match expressions 2016-03-04 19:07:35 +01:00
Vadim Petrochenkov
6c87b19158 Abstract away differences between Vec and ptr::P in HIR 2015-12-18 00:52:56 +03:00
Vadim Petrochenkov
67a978411a Support #[deprecated] in rustdoc 2015-12-12 23:01:27 +03:00
Vadim Petrochenkov
e3ed7b0501 Implement #[deprecated] attribute (RFC 1270) 2015-12-12 19:39:37 +03:00
Jonas Schievink
ce97479a15 rustdoc: only show macro arm's lhs 2015-11-26 19:14:36 +01:00
Vadim Petrochenkov
c1ad5af4a6 Changes to data produced by privacy pass 2015-11-19 14:16:35 +03:00
Niko Matsakis
e4ff9f71db Port a bunch of code new-visitor; all of these ports were
straightforward uses of `visit_all_items`. In some cases I had to remove
empty `visit_item` calls that were just to suppress visiting nested
items.
2015-11-18 19:22:18 -05:00
Vadim Petrochenkov
e8ddbba2ed syntax/rustc_front: Simplify VariantData::fields
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-25 18:33:51 +03:00
Vadim Petrochenkov
46750d0409 Merge VariantData and VariantData_ 2015-10-13 15:19:27 +03:00
Vadim Petrochenkov
40aa09e4c9 Merge struct fields and struct kind 2015-10-13 15:19:25 +03:00
Vadim Petrochenkov
30af54dede Dict -> Struct, StructDef -> VariantData, def -> data 2015-10-13 15:19:24 +03:00
Vadim Petrochenkov
877c35e8a2 Remove now redundant NodeId from Variant 2015-10-13 15:19:18 +03:00
Vadim Petrochenkov
2314ab29c2 Unify structures and enum variants in HIR 2015-10-13 15:19:16 +03:00
Niko Matsakis
d7b0eb0f39 build up a set of node-ids that we can construct def-ids from 2015-10-01 10:42:37 -04:00
Niko Matsakis
5600c6282e move direct accesses of node to go through as_local_node_id, unless
they are being used as an opaque "position identifier"
2015-10-01 10:37:19 -04:00
Niko Matsakis
9ff4f57cd0 move job of creating local-def-ids to ast-map (with a few stragglers) 2015-10-01 10:28:28 -04:00
Vadim Petrochenkov
a636a83caa Use Names in path fragments and MacroDef 2015-09-22 19:57:43 +03:00
Vadim Petrochenkov
a4af958786 Use Names in HIR Items 2015-09-22 19:53:52 +03:00
Simonas Kazlauskas
f5a99ae7fb Remove Visibility field from enum variants
Followup on 
2015-09-17 10:02:59 +03:00