about summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2020-04-26Rollup merge of #70043 - mark-i-m:def-kind-more, r=eddybDylan DPC-14/+8
Add all remaining `DefKind`s. r? @eddyb or @Centril ~~I'm not sure if this is what you were thinking of. There are also a few places where I'm not sure what the correct choice is because I don't fully understand the meaning of some variants.~~ ~~In general, it feels a bit odd to add some of these as `DefKind`s (e.g. `Arm`) because they don't feel like definitions. Are there things that it makes sense not to add?~~
2020-04-24Avoid unused Option::map resultsJosh Stone-5/+6
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
2020-04-24Remove `Option` from the return type of `def_kind`.Eduard-Mihai Burtescu-14/+8
2020-04-23Address comments from reviewmarmeladema-12/+11
2020-04-23Modify `as_local_hir_id` to return a bare `HirId`marmeladema-16/+14
2020-04-23Modify `as_local_hir_id` to accept a `LocalDefId` instead of a `DefId`marmeladema-23/+24
2020-04-23librustc_middle: return LocalDefId instead of DefId in local_def_idmarmeladema-41/+45
2020-04-16Rollup merge of #71221 - cuviper:rustdoc_or_patterns, r=Mark-SimulacrumDylan DPC-4/+6
Dogfood or_patterns in rustdoc We can start using `or_patterns` in `rustdoc` as a step toward stabilization. cc #54883 @Centril
2020-04-16Dogfood or_patterns in rustdocJosh Stone-4/+6
2020-04-16Rollup merge of #71179 - matthiaskrgr:cl6ppy, r=Dylan-DPCDylan DPC-3/+3
fix more clippy warnings
2020-04-16Rollup merge of #71145 - pfmooney:illumos-triple, r=nagisaDylan DPC-0/+1
Add illumos triple This fixes rust-lang/rust#55553 and adds support for `illumos` as a `target_os` on `x86_64`. In addition to the compile spec and libstd additions, several library dependencies have been bumped in order to permit working builds of cargo and rustup for the new target. Work originally started by @jasonbking, with subsequent additions by @pfmooney and @jclulow.
2020-04-16Rollup merge of #70990 - GuillaumeGomez:rustdoc-cleanup, r=ollie27Dylan DPC-24/+20
Improve rustdoc source code a bit Very small clean up. I realized that there were too many nested conditions whereas we could just use `and_then`. r? @kinnison cc @ollie27
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-3/+3
2020-04-14Add illumos triplePatrick Mooney-0/+1
Co-Authored-By: Jason King <jason.brian.king@gmail.com> Co-Authored-By: Joshua M. Clulow <jmc@oxide.computer>
2020-04-14Remove `DUMMY_HIR_ID`marmeladema-15/+9
2020-04-14Rename AssocKind::Method to AssocKind::FnRustin-Liu-2/+2
Rename fn_has_self_argument to fn_has_self_parameter Rename AssocItemKind::Method to AssocItemKind::Fn Refine has_no_input_arg Refine has_no_input_arg Revert has_no_input_arg Refine suggestion_descr Move as_def_kind into AssocKind Signed-off-by: Rustin-Liu <rustin.liu@gmail.com> Fix tidy check issue Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-04-11Auto merge of #70161 - cjgillot:query-arena, r=nikomatsakisbors-17/+10
Allocate some query results on an arena This avoids a cloning few `Lrc` and `Vec`s in the queries.
2020-04-10Improve rustdoc source code a bitGuillaume Gomez-24/+20
2020-04-10librustc_middle: return LocalDefId instead of DefId in local_def_id_from_node_idmarmeladema-3/+7
2020-04-10librustc_middle: return LocalDefId instead of DefId in body_owner_def_idmarmeladema-1/+4
2020-04-08Rollup merge of #70828 - ollie27:rustdoc_external_macro_src, r=eddybDylan DPC-1/+4
rustdoc: Don't try to load source files from external crates Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead. Part of #70757 r? @GuillaumeGomez cc @eddyb
2020-04-08rustdoc: Don't try to load source files from external cratesOliver Middleton-1/+4
Local items defined in external macros shouldn't generate rendered source files and should link to the external crate's docs instead.
2020-04-06ty: remove `{Existential,}Trait{Ref,Predicate}::input_types`.Eduard-Mihai Burtescu-52/+52
2020-04-06ty: remove unnecessary `Predicate::walk_tys` and `collect_regions`.Eduard-Mihai Burtescu-19/+22
2020-04-05Retire rustc::ty::Attributes enum.Camille GILLOT-14/+6
2020-04-05Allocate query Vecs on the arena.Camille GILLOT-3/+4
2020-04-05Stop importing int modules in librustdocLinus Färnstrand-1/+0
2020-04-02direct imports for langitem stuffMazdak Farrokhzad-2/+2
2020-04-02nix rustc_target::abi::* reexport in ty::layoutMazdak Farrokhzad-1/+1
2020-03-31more clippy fixesMatthias Krüger-42/+28
use is_empty() instead of len comparison (clippy::len_zero) use if let instead of while let loop that never loops (clippy::never_loop) remove redundant returns (clippy::needless_return) remove redundant closures (clippy::redundant_closure) use if let instead of match and wildcard pattern (clippy::single_match) don't repeat field names redundantly (clippy::redundant_field_names)
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-9/+9
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-22/+22
2020-03-24rustc: remove rustc_hir_pretty dependency.Mazdak Farrokhzad-3/+3
2020-03-24Rollup merge of #70277 - matthewjasper:remove-closurebound, r=nikomatsakisMazdak Farrokhzad-1/+0
Remove `ReClosureBound` We now substitute external names for regions in the query response. r? @nikomatsakis
2020-03-23Remove `ReClosureBound`Matthew Jasper-1/+0
2020-03-22don't create variable bindings just to return the bound value immediately ↵Matthias Krüger-4/+2
(clippy::let_and_return)
2020-03-16Support type search for arguments and returned typesGuillaume Gomez-16/+58
2020-03-15More Method->Fn renamingMark Mansi-3/+3
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-0/+2
2020-03-14Make downstream crates compile.Camille GILLOT-1/+2
2020-03-14Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPCYuki Okushi-6/+2
fix more clippy findings * reduce references on match patterns (clippy::match_ref_pats) * Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline) * libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string) * remove unneeded mutable references (cippy::unnecessary_mut_passed) * libtest: declare variables as floats instead of casting them (clippy::unnecessary_cast) * rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes) * call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref) * iterate over a maps values directly. (clippy::for_kv_map) * rustdoc: simplify boolean condition (clippy::nonminimal_bool) * Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently) * rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is_some) * rustdoc: don't call into_iter() on iterator. (clippy::identity_conversion)
2020-03-12Rollup merge of #69921 - matthiaskrgr:rustdoc_import, r=CentrilMazdak Farrokhzad-1/+0
rustdoc: remove unused import ``` Checking rustdoc v0.0.0 (/home/matthias/vcs/github/rust/src/librustdoc) warning: unused import: `rustc_span::symbol::sym` --> src/librustdoc/clean/inline.rs:15:5 | 15 | use rustc_span::symbol::sym; | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default ```
2020-03-12Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasperMazdak Farrokhzad-2/+2
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc #69498 #60163
2020-03-11rustdoc: remove unused importMatthias Krüger-1/+0
2020-03-10Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnisonMazdak Farrokhzad-5/+0
Remove spotlight I had a few comments saying that this feature was at best misunderstood or not even used so I decided to organize a poll about on [twitter](https://twitter.com/imperioworld_/status/1232769353503956994). After 87 votes, the result is very clear: it's not useful. Considering the amount of code we have just to run it, I think it's definitely worth it to remove it. r? @kinnison cc @ollie27
2020-03-07rustdoc: simplify boolean condition (clippy::nonminimal_bool)Matthias Krüger-1/+1
2020-03-07Use ?-operator in more places (clippy::question_mark, had some false ↵Matthias Krüger-5/+1
negatives fixed recently)
2020-03-06fix various typosMatthias Krüger-1/+1
2020-03-05Rollup merge of #69736 - matthiaskrgr:even_more_clippy, r=Dylan-DPCDylan DPC-1/+1
even more clippy cleanups * Don't pass &mut where immutable reference (&) is sufficient (clippy::unnecessary_mut_passed) * Use more efficient &&str to String conversion (clippy::inefficient_to_string) * Don't always eval arguments inside .expect(), use unwrap_or_else and closure. (clippy::expect_fun_call) * Use righthand '&' instead of lefthand "ref". (clippy::toplevel_ref_arg) * Use simple 'for i in x' loops instead of 'while let Some(i) = x.next()' loops on iterators. (clippy::while_let_on_iterator) * Const items have by default a static lifetime, there's no need to annotate it. (clippy::redundant_static_lifetimes) * Remove redundant patterns when matching ( x @ _ to x) (clippy::redundant_pattern)
2020-03-05Const items have by default a static lifetime, there's no need to annotate ↵Matthias Krüger-1/+1
it. (clippy::redundant_static_lifetimes)