| Age | Commit message (Collapse) | Author | Lines |
|
Previously it would unconditionally use edition 2015, which was
incorrect.
|
|
Previously, only the raw string and the `is_ignore` field were
preserved, which made it hard to recover anything else.
|
|
|
|
rustdoc: Don't show hidden trait methods
Fix #89186.
By skipping trait items whose attributes include `hidden`, we avoid showing such trait methods.
|
|
rustdoc: Cleanup `clean` part 2
Split out from #88379. This contains the following commits from that PR:
- Remove `Type::ResolvedPath.is_generic`
- Rename `is_generic()` to `is_assoc_ty()`
r? `@jyn514`
|
|
It's adapted from the old documentation for the `is_generic` field.
|
|
Co-authored-by: Joshua Nelson <github@jyn.dev>
|
|
By skipping trait items whose attributes include `hidden`, we void
showing
such trait methods.
|
|
Rollup of 8 pull requests
Successful merges:
- #88893 (Add 1.56.0 release notes)
- #89001 (Be explicit about using Binder::dummy)
- #89072 (Avoid a couple of Symbol::as_str calls in cg_llvm )
- #89104 (Simplify scoped_thread)
- #89208 ([rfc 2229] Drop fully captured upvars in the same order as the regular drop code)
- #89210 (Add missing time complexities to linked_list.rs)
- #89217 (Enable "generate-link-to-definition" option on rust tools docs as well)
- #89221 (Give better error for `macro_rules! name!`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Be explicit about using Binder::dummy
This is somewhat of a late followup to the binder refactor PR. It removes `ToPredicate` and `ToPolyTraitImpls` that hide the use of `Binder::dummy`. While this does make code a bit more verbose, it allows us be more careful about where we create binders.
Another alternative here might be to add a new trait `ToBinder` or something with a `dummy()` fn. Which could still allow grepping but allows doing something like `trait_ref.dummy()` (but I also wonder if longer-term, it would be better to be even more explicit with a `bind_with_vars(ty::List::empty())` *but* that's not clear yet.
r? ``@nikomatsakis``
|
|
The `Option<Module>` version is supported for the case where we don't know whether the `DefId` refers to a module or not.
Non-local traits and enums are also correctly found now.
|
|
declaration
|
|
Document `--show-type-layout` in the rustdoc book
I also made a few small, related changes as separate commits.
r? `@jyn514`
|
|
Revert the rustdoc box syntax removal
Reverts the rustdoc box syntax removal from #87781.
It turned out to cause (minor) perf regressions.
Requested in https://github.com/rust-lang/rust/pull/87781#issuecomment-922589168
|
|
|
|
|
|
All of these were added due to insignificant Drop types being present.
|
|
|
|
It turned out to cause (minor) perf regressions.
|
|
This just applies the suggested fixes from the compatibility warnings,
leaving any that are in practice spurious in. This is primarily intended to
provide a starting point to identify possible fixes to the migrations (e.g., by
avoiding spurious warnings).
A secondary commit cleans these up where they are false positives (as is true in
many of the cases).
|
|
Add initial support for m68k
This patch series adds initial support for m68k making use of the new M68k
backend introduced with LLVM-13. Additional changes will be needed to be
able to actually use the backend for this target.
|
|
|
|
Gather module items after lowering.
This avoids having a non-local analysis inside lowering.
By implementing `hir_module_items` using a visitor, we make sure that iterations and visitors are consistent.
|
|
|
|
|
|
Fixes #81775
|
|
rustdoc: reduce number of copies when using parallel IO
This is Windows-only for now; I was getting really bad slowdowns from this on linux for some reason.
Helps with https://github.com/rust-lang/rust/issues/82741. Follow-up to https://github.com/rust-lang/rust/pull/60971.
|
|
|
|
|
|
Rename "--display-warnings" to "--display-doctest-warnings"
Fixes #41574.
cc `@ollie27`
r? `@kinnison`
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #88033 (Add links for primitives in "jump to definition" feature)
- #88722 (Make `UnsafeCell::get_mut` const)
- #88851 (Fix duplicate bounds for const_trait_impl)
- #88859 (interpreter PointerArithmetic: use new Size helper methods)
- #88885 (Fix jump def background)
- #88894 (Improve error message for missing trait in trait impl)
- #88896 (Reduce possibility of flaky tests)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix jump def background
Fixes #88870.
I somehow badly wrote the color in #88111.
r? ``@camelid``
|
|
Use smaller spans for some structured suggestions
Use more accurate suggestion spans for
* argument parse error
* fully qualified path
* missing code block type
* numeric casts
|
|
|
|
Allow missing code examples in trait impls.
Excludes Trait implementations from the items that need to have doc code examples when using the `rustdoc::missing_doc_code_examples` lint.
For details see #88741
fixes #88741
r? `@jyn514`
|
|
The new name is more accurate than the previous one.
|
|
It can be computed on-demand.
|
|
|
|
|
|
rustdoc: Cleanup `clean` part 1
Split out from #88379.
These commits are completely independent of each other, and each is a fairly
small change (the last few are new commits; they are not from #88379):
- Remove unnecessary `Cache.*_did` fields
- rustdoc: Get symbol for `TyParam` directly
- Create a valid `Res` in `external_path()`
- Remove unused `hir_id` parameter from `resolve_type`
- Fix redundant arguments in `external_path()`
- Remove unnecessary `is_trait` argument
- rustdoc: Cleanup a pattern match in `external_generic_args()`
r? ``@jyn514``
|
|
rustc: Remove local variable IDs from `Export`s
Local variables can never be exported.
|
|
Most of these are because alloc uses `#[lang_item]` to define methods,
but core documents primitives before those methods are available.
- Fix rustdoc-js-std test
For some reason this change made CStr not show up in the results for
`str,u8`. Since it still shows up for str, and since it wasn't a great
match for that query anyway, I think this is ok to let slide.
- Add test that all primitives can be linked to
- Enable `doc(primitive)` in `core` as well
- Add linkcheck exception specifically for Windows
Ideally this would be done automatically by the linkchecker by
replacing `\\` with forward slashes, but this PR is already a ton of
work ...
- Don't forcibly fail linkchecking if there's a broken intra-doc link on Windows
Previously, it would exit with a hard error if a missing file had `::`
in it. This changes it to report a missing file instead, which allows
adding an exception.
|
|
- Fix broken handling of primitive associated items
- Remove fragment hack
Fixes 83083
- more logging
- Update CrateNum hacks
The CrateNum has no relation to where in the dependency tree the crate
is, only when it's loaded. Explicitly special-case core instead of
assuming it will be the first DefId.
- Update and add tests
- Cache calculation of primitive locations
This could possibly be avoided by passing a Cache into
collect_intra_doc_links; but that's a much larger change, and doesn't
seem valuable other than for this.
|
|
|
|
|
|
It was only used for sugaring `Fn` trait bounds, and rustdoc already
checks that the `did` is for a `Fn` (or `FnMut`, `FnOnce`) lang item,
so it's not necessary to also check that the `did` belongs to a trait.
|
|
If the path is for a trait, it is always true that `trait_did ==
Some(did)`, so instead, `external_path()` now takes an `is_trait`
boolean.
|
|
|
|
The order of the `where` bounds on auto trait impls changed because
rustdoc currently sorts auto trait `where` bounds based on the `Debug`
output for the bound. Now that the bounds have an actual `Res`, they are
being unintentionally sorted by their `DefId` rather than their path.
So, I had to update a test for the change in ordering of the rendered
bounds.
|