summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2017-06-01rustdoc: Rename `Vector` and `FixedVector` to `Slice` and `Array`Oliver Middleton-11/+8
Also store the array length as a usize rather than a String. This is just a minor refactor.
2017-06-01Rollup merge of #42297 - tschottdorf:proj-ty, r=nikomatsakisCorey Farwell-1/+1
Upgrade ProjectionTy's Name to a DefId Part of #42171, in preparation for downgrading the contained `TraitRef` to only its `substs`. Some inline questions in the diff. Look for `FIXME(tschottdorf)`. These comments should be addressed before merging.
2017-05-31rustdoc: Cleanup associated const value renderingOliver Middleton-1/+1
Rather than (ab)using Debug for outputting the type in plain text use the alternate format parameter which already does exactly that. This fixes type parameters for example which would output raw HTML. Also cleans up adding parens around references to trait objects.
2017-05-31Upgrade ProjectionTy's Name to a DefIdTobias Schottdorf-1/+1
Part of #42171, in preparation for downgrading the contained `TraitRef` to only its `substs`.
2017-05-28fix RUST_LOG ICE caused by printing a default impl's DefIdAriel Ben-Yehuda-1/+1
2017-05-25Fix merge conflicts.Jeffrey Seyfried-1/+1
2017-05-22rustdoc: Fix names of items in cross crate reexported modulesOliver Middleton-23/+7
For renamed reexports the new name should be used.
2017-05-13rustc: stop interning CodeExtent, it's small enough.Eduard-Mihai Burtescu-1/+1
2017-05-09resolved merge conflictsachernyak-4/+4
2017-05-03remove use of `ast_ty_to_ty_cache` from librustdocNiko Matsakis-4/+4
2017-05-03fn_arg_namesachernyak-1/+1
2017-05-02Rollup merge of #41693 - est31:anon_params_removal, r=eddybCorey Farwell-2/+2
Removal pass for anonymous parameters Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685. r? @frewsxcv
2017-05-02Rollup merge of #41662 - nikomatsakis:on-demandify-region-mapping, r=eddybCorey Farwell-4/+4
On demandify region mapping This is an adaptation of @cramertj's PR. I am sort of tempted to keep simplifying it, but also tempted to land it so and we can refactor more in follow-up PRs. As is, it does the following things: - makes the region-maps an on-demand query, per function `tcx.region_maps(def_id)` - interns code extents instead of of having them be integers - remove the "root region extent" and (to some extent) item extents; instead we use `Option<CodeExtent<'tcx>>` in a few places (no space inefficiency since `CodeExtent<'tcx>` is now a pointer). I'm not entirely happy with the way I have it setup though. Here are some of the changes I was considering (I'm not sure if they would work out well): 1. Removing `item_extents` entirely -- they are rarely used now, because most of the relevant places now accept an `Option<Region<'tcx>>` or an `Option<CodeExtent<'tcx>>`, but I think still used in a few places. 2. Merging `RegionMaps` into the typeck tables, instead of having it be its own query. 3. Change `CodeExtent<'tcx>` to store the parent pointer. This would mean that fewer places in the code actually *need* a `RegionMaps` anyhow, since most of them just want to be able to walk "up the tree". On the other hand, you wouldn't be able to intern a `CodeExtent<'tcx>` for some random node-id, you'd need to look it up in the table (since there'd be more information). Most of this code is semi-temporary -- I expect it to largely go away as we move to NLL -- so I'm also not *that* concerned with making it perfect. r? @eddyb
2017-05-02Removal pass for anonymous parametersest31-2/+2
Removes occurences of anonymous parameters from the rustc codebase, as they are to be deprecated. See issue #41686 and RFC 1685.
2017-05-01Queryify item_body_nested_bodiesTaylor Cramer-2/+3
2017-04-30intern CodeExtentsNiko Matsakis-4/+4
Make a `CodeExtent<'tcx>` be something allocated in an arena instead of an index into the `RegionMaps`.
2017-04-24rustc: expose the common DUMMY_SP query case as tcx methods.Eduard-Mihai Burtescu-2/+1
2017-04-24rustc: rename some of the queries to match tcx methods.Eduard-Mihai Burtescu-41/+41
2017-04-23rustc: make the const-eval cache polymorphic.Eduard-Mihai Burtescu-1/+1
2017-04-17Rollup merge of #41310 - eddyb:demand-const-eval, r=nikomatsakisCorey Farwell-1/+1
[on-demand] Turn monomorphic_const_eval into a proper query, not just a cache. The error definitions and reporting logic, alongside with `eval_length` were moved to `librustc`. Both local and cross-crate constant evaluation is on-demand now, but the latter is only used for `enum` discriminants, to replace the manual insertion into the cache which was done when decoding variants. r? @nikomatsakis
2017-04-17Rollup merge of #41280 - QuietMisdreavus:rustdoc-toc, r=GuillaumeGomezCorey Farwell-1/+4
rustdoc: add a list of headings to the sidebar It's another misdreavus rustdoc PR, which means it's time for Bikeshed City once again! `:3` In an effort to aid navigation in long documentation pages, this PR adds a listing of headings to the sidebars of pages where such headings exist. For example, for structs, links to their fields, inherent methods, and trait implementations are available where applicable. Examples: * Modules/Crate roots ![image](https://cloud.githubusercontent.com/assets/5217170/25019930/1000fa3a-2052-11e7-98ff-ddf5af18b3e6.png) * Enums ![image](https://cloud.githubusercontent.com/assets/5217170/25019954/33497f9e-2052-11e7-88cf-df46f1b3b8a3.png) * Primitives ![image](https://cloud.githubusercontent.com/assets/5217170/25019978/4820bbc6-2052-11e7-8b5a-96a864eb2a5b.png) * Traits ![image](https://cloud.githubusercontent.com/assets/5217170/25020093/bd1bc9f2-2052-11e7-9cd1-00a0ad8007bc.png) * Structs ![image](https://cloud.githubusercontent.com/assets/5217170/25020145/d75206b0-2052-11e7-88cc-9e9525084775.png) Open questions: * Right now, these kinds of pages (and also unions) are the only pages that will receive the name header - pages for functions, constants, macros, etc, won't have the corresponding name in their sidebar. Should I print the name regardless and only add table-of-contents links for pages that have them? This would make them match, for example, a struct with no public fields, no methods, and no trait implementations. The latter would still have a "Struct MyStruct" line above the module contents, with no header links to speak of, whereas a function wouldn't even have "Function my\_function". * This is only a header listing, but there has been requests to include a more-complete listing of fields/methods/traits/etc, for example in #41123.
2017-04-17rustdoc: add a list of headings to the sidebarQuietMisdreavus-1/+4
2017-04-16rustc: expose monomorphic const_eval through on-demand.Eduard-Mihai Burtescu-1/+1
2017-04-14Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcvCorey Farwell-1/+1
Fix invalid associated type rendering in rustdoc Fixes #41036. r? @rust-lang/docs
2017-04-12Fix invalid associated type rendering in rustdocGuillaume Gomez-1/+1
2017-04-11just panic in rustdoc if we encounter a subtype predicateNiko Matsakis-7/+4
These are not user expressible anyhow.
2017-04-11add Subtype predicateNiko Matsakis-0/+11
2017-04-02Introduce `TyErr` independent from `TyInfer`Esteban Küber-1/+1
Add a `TyErr` type to represent unknown types in places where parse errors have happened, while still able to build the AST. Initially only used to represent incorrectly written fn arguments and avoid "expected X parameters, found Y" errors when called with the appropriate amount of parameters. We cannot use `TyInfer` for this as `_` is not allowed as a valid argument type. Example output: ```rust error: expected one of `:` or `@`, found `,` --> file.rs:12:9 | 12 | fn bar(x, y: usize) {} | ^ error[E0061]: this function takes 2 parameters but 3 parameters were supplied --> file.rs:19:9 | 12 | fn bar(x, y) {} | --------------- defined here ... 19 | bar(1, 2, 3); | ^^^^^^^ expected 2 parameters ```
2017-03-23convert inherent-impl-related things to on-demand queriesNiko Matsakis-5/+3
There are now 3 queries: - inherent_impls(def-id): for a given type, get a `Rc<Vec<DefId>>` with all its inherent impls. This internally uses `crate_inherent_impls`, doing some hacks to keep the current deps (which, btw, are not clearly correct). - crate_inherent_impls(crate): gathers up a map from types to `Rc<Vec<DefId>>`, touching the entire krate, possibly generating errors. - crate_inherent_impls_overlap_check(crate): performs overlap checks between the inherent impls for a given type, generating errors.
2017-03-19Rollup merge of #40587 - GuillaumeGomez:rustdoc-const-display, r=frewsxcvCorey Farwell-4/+4
Fix invalid debug display for associated consts Fixes #40568. r? @rust-lang/docs cc @SergioBenitez
2017-03-19Rollup merge of #40564 - GuillaumeGomez:rustdoc-const, r=frewsxcvCorey Farwell-1/+1
Fix const not displayed in rustdoc Fixes #40331. r? @rust-lang/docs
2017-03-17Fix invalid debug display for associated constsGuillaume Gomez-4/+4
2017-03-16Fix const not displayed in rustdocGuillaume Gomez-1/+1
2017-03-14Refactor `Attribute` to use `Path` and `TokenStream` instead of `MetaItem`.Jeffrey Seyfried-11/+10
2017-02-28Rollup merge of #39944 - GuillaumeGomez:associated-consts, r=frewsxcvCorey Farwell-1/+1
Improve associated constant rendering in rustdoc Before: <img width="1440" alt="screen shot 2017-02-19 at 00 30 51" src="https://cloud.githubusercontent.com/assets/3050060/23097697/caeed80e-f63a-11e6-98c2-5d27e4efd76d.png"> After: <img width="1440" alt="screen shot 2017-02-19 at 00 30 39" src="https://cloud.githubusercontent.com/assets/3050060/23097698/cfb4874e-f63a-11e6-80cf-ffbf5c5c6162.png"> cc @SergioBenitez r? @rust-lang/docs
2017-02-26Put the const type and value into <code>Guillaume Gomez-1/+1
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-1/+2
2017-02-25rustc: combine BareFnTy and ClosureTy into FnSig.Eduard-Mihai Burtescu-24/+17
2017-02-25rustc_typeck: lift CrateCtxt to TyCtxt.Eduard Burtescu-1/+1
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-1/+1
2017-02-25rustc: store type parameter defaults outside of ty::Generics.Eduard-Mihai Burtescu-3/+7
2017-02-11Use functional transformations on the option instead of matching.Jimmy Cuadra-16/+13
2017-02-11rustdoc: Only include a stability span if needed.Jimmy Cuadra-10/+20
2017-02-05make lifetimes that only appear in return type early-boundNiko Matsakis-1/+1
This is the full and proper fix for #32330. This also makes some effort to give a nice error message (as evidenced by the `ui` test), sending users over to the tracking issue for a full explanation.
2017-02-05Rollup merge of #39009 - canndrew:default-unit-warnings, r=nikomatsakisCorey Farwell-4/+4
Add warning for () to ! switch With feature(never_type) enabled diverging type variables will default to `!` instead of `()`. This can cause breakages where a trait is resolved on such a type. This PR emits a future-compatibility warning when it sees this happen.
2017-02-03Add warning for () to ! switchAndrew Cann-4/+4
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-2/+8
2017-01-30Merge ty::TyBox into ty::TyAdtVadim Petrochenkov-31/+0
2017-01-28rustc: remove unused `bounds` field from `RegionParameterDef`.Eduard-Mihai Burtescu-7/+2
2017-01-28rustc: always keep an explicit lifetime in trait objects.Eduard-Mihai Burtescu-14/+14