summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2020-07-09Rollup merge of #74079 - nnethercote:session-globals, r=nikomatsakisManish Goregaokar-8/+8
Eliminate confusing "globals" terminology. There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs` r? @Aaron1011
2020-07-09Rollup merge of #74077 - sethp:docs/fix-intra-doc-primitive-link, r=jyn514Manish Goregaokar-4/+6
Use relative path for local links to primitives Else, links to `char::foo` would point into `/path/to/src/libcore/std/primitive.char.html#method.foo`. Split out from #73804.
2020-07-09Eliminate confusing "globals" terminology.Nicholas Nethercote-8/+8
There are some structures that are called "globals", but are they global to a compilation session, and not truly global. I have always found this highly confusing, so this commit renames them as "session globals" and adds a comment explaining things. Also, the commit fixes an unnecessary nesting of `set()` calls `src/librustc_errors/json/tests.rs`
2020-07-07Revert "Add guard to check for local `core` crate"Seth Pellegrino-6/+4
This reverts commit ee3a0f867e938f469cbbb422a76ed5662be2ecc7.
2020-07-06Add guard to check for local `core` crateSeth Pellegrino-4/+6
2020-07-05Use relative path for local links to primitives in libcoreSeth Pellegrino-4/+6
Else, links to `char::foo` would point into `/path/to/src/libcore/std/primitive.char.html#method.foo`. Split out from #73804.
2020-07-05Shrink ParamEnv to 16 bytesMark Rousskov-2/+2
2020-06-30change `skip_binder` to use T by valueBastian Kauschke-4/+4
2020-06-26Auto merge of #73513 - oli-obk:const_binop_overflow, r=estebankbors-2/+2
Show the values and computation that would overflow a const evaluation or propagation Fixes #71134 In contrast to the example in the issue it doesn't use individual spans for each operand. The effort required to implement that is quite high compared to the little (if at all) benefit it would bring to diagnostics. cc @shepmaster The way this is implemented it is also fairly easy to do the same for overflow panics at runtime, but that should be done in a separate PR since it may have runtime performance implications.
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-2/+2
propagation
2020-06-25Support configurable deny-warnings for all in-tree crates.Eric Huss-3/+3
2020-06-23Rollup merge of #72780 - GuillaumeGomez:enforce-doc-alias-check, r=ollie27Manish Goregaokar-0/+28
Enforce doc alias check Part of #50146. r? @ollie27
2020-06-15make all uses of ty::Error or ConstKind::Error delay a span bugmark-1/+1
2020-06-11Rename `TyKind::Def` to `OpaqueDef`Matthew Jasper-1/+1
2020-06-11Remove associated opaque typesMatthew Jasper-5/+0
They're unused now.
2020-06-10Rollup merge of #73098 - jyn514:rustdoc-is-fake, r=GuillaumeGomezDylan DPC-3/+8
Add Item::is_fake for rustdoc I wasn't aware items _could_ be fake, so I think having a function mentioning it could be helpful. Also, I'd need to make this change for cross-crate intra-doc links anyway, so I figured it's better to make the refactor separate.
2020-06-07Add Item::is_fake for rustdocJoshua Nelson-3/+8
I wasn't aware items _could_ be fake, so I think having a function mentioning it could be helpful. Also, I'd need to make this change for cross-crate intra-doc links anyway, so I figured it's better to make the refactor separate.
2020-06-01Call `skip_binder` or `no_bound_vars` before `self_ty`Dylan MacKenzie-2/+2
2020-05-30Add check for doc alias attribute formatGuillaume Gomez-0/+28
2020-05-30rustdoc: remove calls to `local_def_id_from_node_id`marmeladema-9/+5
2020-05-22Remove ReScopeMatthew Jasper-1/+0
2020-05-20introduce newtype'd `Predicate<'tcx>`Bastian Kauschke-7/+7
2020-05-20make `to_predicate` take a `tcx` argumentNiko Matsakis-1/+1
2020-05-20rename `Predicate` to `PredicateKind`, introduce aliasBastian Kauschke-19/+17
2020-05-17Assume unevaluated consts are equal to the other consts and add ConstEquate ↵Ben Lewis-1/+2
obligation. This delays the need to evaluate consts eagerly and therefore gets around const eval query cycles.
2020-05-16Rollup merge of #71724 - GuillaumeGomez:doc-alias-improvements, r=ollie27Dylan DPC-0/+9
Doc alias improvements After [this message](https://github.com/rust-lang/rust/issues/50146#issuecomment-496601755), I realized that the **doc alias**. So this PR does the followings: * Align the alias discovery on items added into the search-index. It brings a few nice advantages: * Instead of cloning the data between the two (in rustdoc source code), we now have the search-index one and aliases which reference to the first one. So we go from one big map containing a lot of duplicated data to just integers... * In the front-end (main.js), I improved the code around aliases to allow them to go through the same transformation as other items when we show the search results. * Improve the search tester in order to perform multiple requests into one file (I think it's better in this case than having a file for each case considering how many there are...) * I also had to add the new function inside the tester (`handleAliases`) Once this PR is merged, I intend to finally stabilize this feature. r? @ollie27 cc @rust-lang/rustdoc
2020-05-14Move doc alias discovery into the Attributes struct and some code improvementsGuillaume Gomez-0/+9
2020-05-12Remove ty::UnnormalizedProjectionJack Huey-1/+0
2020-05-08Fix testsCamille GILLOT-1/+1
2020-05-08Remove ast::{Ident, Name} reexports.Camille GILLOT-8/+9
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