about summary refs log tree commit diff
path: root/src/librustdoc/core.rs
AgeCommit message (Collapse)AuthorLines
2020-08-03Fix async-std at the price of breaking half the test suiteJoshua Nelson-7/+0
- Don't mark impl trait as an error
2020-07-31Auto merge of #74926 - Manishearth:rename-lint, r=jyn514bors-1/+1
Rename intra_doc_link_resolution_failure It should be plural to follow the conventions in https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#lints
2020-07-30Rename the lint againManish Goregaokar-1/+1
2020-07-30Rename to intra_doc_resolution_failuresManish Goregaokar-1/+1
2020-07-29Rename intra_doc_link_resolution_failure -> intra_doc_link_resolution_failuresManish Goregaokar-1/+1
2020-07-27More requested changesJoseph Ryan-2/+2
2020-07-27Extract `Cache` and other types from `html` moduleJoseph Ryan-2/+2
2020-07-27Move `Error` and `RenderInfo` out of `html` moduleJoseph Ryan-1/+1
2020-07-17Rollup merge of #71670 - GuillaumeGomez:enforce-codeblocks-attribute-check, ↵Manish Goregaokar-3/+3
r=Mark-Simulacrum Enforce even more the code blocks attributes check through rustdoc `rustdoc` now has a lint which allows it to warn if a code block attribute is malformated (which can end up in bad situations, even more in case of testing examples!). Now it'll fail if such a situation is encountered when testing markdown code blocks examples. r? @Mark-Simulacrum
2020-07-17Rename TypeckTables to TypeckResults.Valentin Lazureanu-6/+6
2020-07-16Use the scope of the imported variable for resolution, not the current scopeJoshua Nelson-1/+1
- Accept DefId in resolve_str_path_error This will probably break lots of internal invariants.
2020-07-16Update code to new invalid_codeblock_attributes lint nameGuillaume Gomez-3/+3
2020-07-15Use the default providers in rustc_interface instead of adding our ownJoshua Nelson-8/+2
This avoids duplicating the same struct twice.
2020-07-15Address review commentsJoshua Nelson-19/+22
- Move static variables into the innermost scope in which they are used - Clean up comments - Remove external_providers; rename local_providers -> providers
2020-07-15EMPTY_MAP -> EMPTY_SETJoshua Nelson-4/+4
2020-07-15Don't ICE on infinitely recursive typesJoshua Nelson-0/+15
`evaluate_obligation` can only be run on types that are already valid. So rustdoc still has to run typeck even though it doesn't care about the result.
2020-07-15Remove unnecessary lifetime parameterJoshua Nelson-6/+6
TyCtxt is a reference type and so can be passed by value.
2020-07-15Use tcx as the only context for visitorJoshua Nelson-12/+11
Previously two different parts of the context had to be passed separately; there were two sources of truth.
2020-07-15Mention `cargo check` in help messageJoshua Nelson-1/+1
2020-07-15Don't crash on Vec<DoesNotExist>Joshua Nelson-3/+6
2020-07-15Address review comments about code styleJoshua Nelson-14/+10
2020-07-15Don't make typeck_tables_of publicJoshua Nelson-5/+1
2020-07-15Recurse into function bodies, but don't typeck closuresJoshua Nelson-9/+19
Previously, rustdoc would issue a delay_span_bug ICE on the following code: ```rust pub fn a() -> impl Fn() -> u32 { || content::doesnt::matter() } ``` This wasn't picked up earlier because having `type Alias = impl Trait;` in the same module caused _all closures_ to be typechecked, even if they wouldn't normally. Additionally, if _any_ error was emitted, no delay_span_bug would be emitted. So as part of this commit all of the tests were separated out into different files.
2020-07-15Don't ICE on errors in function returning impl traitJoshua Nelson-0/+78
Instead, report the error. This emits the errors on-demand, without special-casing `impl Trait`, so it should catch all ICEs of this kind, including ones that haven't been found yet. Since the error is emitted during type-checking there is less info about the error; see comments in the code for details. - Add test case for -> impl Trait - Add test for impl trait with alias - Move EmitIgnoredResolutionErrors to rustdoc This makes `fn typeck_item_bodies` public, which is not desired behavior. That change should be removed once https://github.com/rust-lang/rust/pull/74070 is merged. - Don't visit nested closures twice
2020-07-15Don't run analysis pass in rustdocJoshua Nelson-5/+7
- Explicitly check for missing docs - Don't run any lints except those we explicitly specified
2020-07-10Rollup merge of #74127 - tamird:allowlist, r=oli-obkManish Goregaokar-10/+10
Avoid "whitelist" Other terms are more inclusive and precise.
2020-07-10Avoid "whitelist"Tamir Duberstein-10/+10
Other terms are more inclusive and precise.
2020-07-10Change some function names.Nicholas Nethercote-1/+1
A couple of these are quite long, but they do a much better job of explaining what they do, which was non-obvious before.
2020-07-07rustdoc: Rename invalid_codeblock_attribute lint to be pluralOliver Middleton-2/+2
2020-06-27Rollup merge of #73763 - davidtwco:terminal-width-json-emitter, r=estebankManish Goregaokar-2/+9
errors: use `-Z terminal-width` in JSON emitter This PR makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output. r? @estebank
2020-06-26errors: use `-Z terminal-width` in JSON emitterDavid Wood-2/+9
This commit makes the JSON emitter use `-Z terminal-width` in the "rendered" field of the JSON output. Signed-off-by: David Wood <david@davidtw.co>
2020-06-26Generate docs for links to private items when passed --document-privateJoshua Nelson-7/+8
- Pass around document_private a lot more - Add tests + Add tests for intra-doc links to private items + Add ignored tests for warnings in reference links
2020-06-05properly handle feature gated lintsJoey Hain-6/+3
- lint: add `feature_gate` field, allow specifying it in `declare_lint!` - generalize the lint feature gate check - librustdoc: generalize whitelisting of feature-gated lints
2020-05-30Use `LocalDefId` instead of `NodeId` in `resolve_str_path_error`marmeladema-3/+7
2020-05-28Update src/librustdoc/core.rsNiko Matsakis-1/+1
2020-05-28Whitelist `unsafe_op_in_unsafe_fn` in rustdocLeSeulArtichaut-1/+12
2020-05-11Fix clippy warningsMatthias Krüger-1/+1
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-08Rollup merge of #71581 - GuillaumeGomez:unify-lints-handling, r=kinnisonDylan DPC-36/+60
Unify lints handling in rustdoc This is a small cleanup. The goal is to unify a bit things to make the reading simpler. r? @kinnison cc @rust-lang/rustdoc
2020-05-02cleanup: `config::CrateType` -> `CrateType`Vadim Petrochenkov-9/+5
2020-04-27Unify lints handling in rustdocGuillaume Gomez-36/+60
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-1/+1
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-1/+1
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-1/+1
2020-04-23Create new rustdoc lint to check for code blocks tagsGuillaume Gomez-1/+6
2020-04-19Replace uses of `parse_opt_*` with `parse_*` where possible.Nicholas Nethercote-2/+2
This lets us specify the default at the options declaration point, instead of using `.unwrap(default)` or `None | Some(default)` at some use point far away. It also makes the code more concise.
2020-04-10librustc_middle: return LocalDefId instead of DefId in opt_local_def_idmarmeladema-2/+5
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-3/+3
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-3/+3
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1/+1
2020-03-22Update lint name to follow conventionGuillaume Gomez-3/+3