summary refs log tree commit diff
path: root/src/librustdoc/clean
AgeCommit message (Collapse)AuthorLines
2019-05-20Rollup merge of #60908 - GuillaumeGomez:errors, r=oli-obkMazdak Farrokhzad-0/+7
Fix lints handling in rustdoc Part of #60664: now lints are handled just like any other lints you would setup in rustc. Still remains to handle `missing code examples` and `missing_docs` as part of the same group. r? @oli-obk
2019-05-18Fix display of const generics in rustdocGuillaume Gomez-1/+4
2019-05-18Fix lints handling in rustdocGuillaume Gomez-0/+7
2019-05-17Avoid unnecessary interning in `Ident::from_str()` calls.Nicholas Nethercote-2/+3
A lot of these static symbols are pre-interned.
2019-05-13Remove bitrig support from rustMarcel Hellwig-1/+0
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-4/+4
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-30/+32
2019-05-11Address comments + Fix testsVadim Petrochenkov-0/+2
2019-05-11Simplify conversions between tokens and semantic literalsVadim Petrochenkov-14/+10
2019-05-11Eliminate `comments::Literal`Vadim Petrochenkov-8/+8
2019-05-06Ignore const parameters when constructing type bounds in rustdocvarkor-3/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-03rustc: rename hir::def::Def to Res (short for "resolution").Eduard-Mihai Burtescu-88/+87
2019-05-03rustc: use DefKind instead of Def, where possible.Eduard-Mihai Burtescu-19/+12
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-52/+72
2019-05-01Auto merge of #60137 - eddyb:rustdoc-rm-def-ctor-hax, r=petrochenkovbors-486/+156
rustdoc: remove def_ctor hack. ~~No longer necessary since we have `describe_def`.~~ Turns out `def_ctor` was used in conjunction with abusing `tcx.type_of(def_id)` working on both type definitions and `impl`s (specifically, of builtin types), but also reimplementing a lot of the logic that `Clean` already provides on `Ty` / `ty::TraitRef`. The first commit now does the minimal refactor to keep it working, while the second commit contains the rest of the refactor I started (parts of which I'm not sure we need to keep).
2019-04-30Rollup merge of #60344 - Aaron1011:fix/tower-hyper, r=eddybMazdak Farrokhzad-0/+1
Don't try to render auto-trait bounds with any inference variables Previously, we checked if the target of a projection type was itself an inference variable. However, for Rustdoc rendering purposes, there's no distinction between an inference variable ('_') and a type containing one (e.g. (MyStruct<u8, _>)) - we don't want to render either of them. Fixes #60269 Due to the complexity of the original bug, which spans three different crates (hyper, tower-hyper, and tower), I have been unable to create a minimized reproduction for the issue.
2019-04-30rustdoc: refactor(?) synthetic impl building.Eduard-Mihai Burtescu-140/+79
2019-04-30rustdoc: remove def_ctor hack.Eduard-Mihai Burtescu-387/+118
2019-04-28Fix lint findings in librustdocflip1995-5/+5
2019-04-28Fix lint findings in librustcflip1995-1/+1
2019-04-27Don't try to render auto-trait bounds with any inference variablesAaron Hill-0/+1
Previously, we checked if the target of a projection type was itself an inference variable. However, for Rustdoc rendering purposes, there's no distinction between an inference variable ('_') and a type containing one (e.g. (MyStruct<u8, _>)) - we don't want to render either of them. Fixes #60269 Due to the complexity of the original bug, which spans three different crates (hyper, tower-hyper, and tower), I have been unable to create a minimized reproduction for the issue.
2019-04-26Update handling of Tuplevarkor-3/+5
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+2
2019-04-23Rollup merge of #59823 - davidtwco:issue-54716, r=cramertjMazdak Farrokhzad-1/+1
[wg-async-await] Drop `async fn` arguments in async block Fixes #54716. This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body. ``` async fn foo(<pattern>: <type>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern>: <ty> = __arg0; } // <-- dropped as you "exit" the async block } ``` However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this. r? @cramertj cc @nikomatsakis
2019-04-21Display original pattern in rustdoc.David Wood-1/+1
This commit displays the original pattern in generated documentation for async functions rather than the synthesized pattern.
2019-04-21AST/HIR: Use `Mutability` instead of bool in foreign staticsVadim Petrochenkov-1/+1
2019-04-21Remove mutability from `Def::Static`Vadim Petrochenkov-3/+3
2019-04-14rustdoc: Remove default keyword from re-exported trait methodsOliver Middleton-1/+5
2019-04-06Rollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebankMazdak Farrokhzad-10/+10
Fix invalid bounds string generation in rustdoc Fixes #58737. Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain). Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct... r? @QuietMisdreavus
2019-03-31Fix invalid bounds string generation in rustdocGuillaume Gomez-10/+10
2019-03-30Rollup merge of #59539 - GuillaumeGomez:rustdoc-infinite-recursion, r=eddybMazdak Farrokhzad-5/+9
Fix infinite recursion Temporary fix for #59502. r? @eddyb
2019-03-30Fix infinite recursionGuillaume Gomez-5/+9
2019-03-30Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, ↵Mazdak Farrokhzad-0/+3
r=petrochenkov,QuietMisdreavus RFC 2008: Enum Variants Part of #44109. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion. r? @petrochenkov cc @nikomatsakis
2019-03-29Support non-exhaustive enum variants in rustdoc.David Wood-0/+3
This commit adds support for non-exhaustive enum variants in rustdoc, extending the existing support for non-exhaustive enums and structs.
2019-03-28Rollup merge of #59413 - Zoxc:hirid, r=oli-obkMazdak Farrokhzad-9/+9
HirIdify hir::ItemId Version of https://github.com/rust-lang/rust/pull/59092. r? @oli-obk
2019-03-26Rollup merge of #59004 - GuillaumeGomez:generics-handling, r=QuietMisdreavusGuillaume Gomez-10/+196
[rustdoc] Improve "in parameters" search and search more generally Fixes #58230. r? @QuietMisdreavus
2019-03-25hir: replace NodeId with HirId in ItemIdljedrz-9/+9
2019-03-24Remove `VariantDef::parent_did`Vadim Petrochenkov-6/+5
2019-03-24Remove methods is_struct/is_tuple/is_unit from VariantDataVadim Petrochenkov-6/+5
2019-03-24Separate variant id and variant constructor id.David Wood-9/+8
This commit makes two changes - separating the `NodeId` that identifies an enum variant from the `NodeId` that identifies the variant's constructor; and no longer creating a `NodeId` for `Struct`-style enum variants and structs. Separation of the variant id and variant constructor id will allow the rest of RFC 2008 to be implemented by lowering the visibility of the variant's constructor without lowering the visbility of the variant itself. No longer creating a `NodeId` for `Struct`-style enum variants and structs mostly simplifies logic as previously this `NodeId` wasn't used. There were various cases where the `NodeId` wouldn't be used unless there was an unit or tuple struct or enum variant but not all uses of this `NodeId` had that condition, by removing this `NodeId`, this must be explicitly dealt with. This change mostly applied cleanly, but there were one or two cases in name resolution and one case in type check where the existing logic required a id for `Struct`-style enum variants and structs.
2019-03-23Add testGuillaume Gomez-21/+15
2019-03-23cleanupGuillaume Gomez-10/+18
2019-03-22Rollup merge of #59170 - varkor:const-generics-rustdoc, r=QuietMisdreavus,eddybMazdak Farrokhzad-82/+114
Add const generics to rustdoc Split out from #53645. This work is a collaborative effort with @yodaldevoid. The `FIXME`s are waiting on a refactor to `LazyConst`. I'll address these in a follow up, but I thought it would be better to implement the rest now to avoid bitrot. r? @QuietMisdreavus
2019-03-21Fix invalid returned types generationGuillaume Gomez-40/+40
2019-03-21Add bounds for return types as wellGuillaume Gomez-9/+35
2019-03-21Improve bounds searchGuillaume Gomez-48/+6
2019-03-21Greatly improve generics handling in rustdoc searchGuillaume Gomez-10/+210
2019-03-21Auto merge of #58927 - GuillaumeGomez:default-keyword, r=QuietMisdreavusbors-4/+20
Add default keyword handling in rustdoc Fixes #58898. r? @QuietMisdreavus
2019-03-18Rebase over LazyConst changesvarkor-11/+1
2019-03-18Rename first_ty_sty to ty_styvarkor-4/+4