| Age | Commit message (Collapse) | Author | Lines |
|
rustdoc: add new CLI flag to load static files from a different location
This PR adds a new CLI flag to rustdoc, `--static-root-path`, which controls how rustdoc links pages to the CSS/JS/font static files bundled with the output. By default, these files are linked with a series of `../` which is calculated per-page to link it to the documentation root - i.e. a relative link to the directory given by `-o`. This is causing problems for docs.rs, because even though docs.rs has saved one copy of these files and is dispatching them dynamically, browsers have no way of knowing that these are the same files and can cache them. This can allow it to link these files as, for example, `/rustdoc.css` instead of `../../rustdoc.css`, creating a single location that the files are loaded from.
I made sure to only change links for the *static* files, those that don't change between crates. Files like the search index, aliases, the source files listing, etc, are still linked with relative links.
r? @GuillaumeGomez
cc @onur
|
|
rustdoc: display rustc_private APIs as "Internal"
This PR updates the display of `rustc_private` APIs to be "Internal" instead of "Experimental", and changes the colors appropriately. It also updates the copy of the `rustc_private` feature to sound more informative and less like a compiler suggestion.
The PR additionally contains a significant refactor of the `short_stability` function to remove duplication and fix a few rendering bugs due to extra or missing spaces.
Before:

After:

|
|
r=QuietMisdreavus
Add version display for associated consts
Fixes #54030.
<img width="1440" alt="screenshot 2018-11-08 at 23 57 29" src="https://user-images.githubusercontent.com/3050060/48232648-99decf00-e3b2-11e8-9f41-6bd12a161c7d.png">
r? @QuietMisdreavus
|
|
Don't render const keyword on stable
Fixes #55246.
Continuation of #55327.
r? @oli-obk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rustdoc: look for comments when scraping attributes/crates from doctests
Fixes https://github.com/rust-lang/rust/issues/56727
When scraping out crate-level attributes and `extern crate` statements, we wouldn't look for comments, so any presence of comments would shunt it and everything after it into "everything else". This could cause parsing issues when looking for `fn main` and `extern crate my_crate` later on, which would in turn cause rustdoc to incorrectly wrap a test with `fn main` when it already had one declared.
I took the opportunity to clean up the logic a little bit, but it would still benefit from a libsyntax-based loop like the `fn main` detection.
|
|
Commit f57247c48cb59 (Ensure that Rusdoc discovers all necessary auto
trait bounds) added a check to ensure that we only attempt to unify a
projection predicatre with inference variables. However, the check it
added was too strict - instead of checking that a type *contains* an
inference variable (e.g. '&_', 'MyType<_>'), it required the type to
*be* an inference variable (i.e. only '_' would match).
This commit relaxes the check to use 'ty.has_infer_types', ensuring that
we perform unification wherever possible.
Fixes #56822
|
|
|
|
|
|
Filter out `ProcMacroStub`s to avoid an ICE during cleaning.
Also add proc macros to `cache().paths` so it can generate links.
|
|
Ensure that Rustdoc discovers all necessary auto trait bounds
Fixes #50159
This commit makes several improvements to AutoTraitFinder:
* Call infcx.resolve_type_vars_if_possible before processing new
predicates. This ensures that we eliminate inference variables wherever
possible.
* Process all nested obligations we get from a vtable, not just ones
with depth=1.
* The 'depth=1' check was a hack to work around issues processing
certain predicates. The other changes in this commit allow us to
properly process all predicates that we encounter, so the check is no
longer necessary,
* Ensure that we only display predicates *without* inference variables
to the user, and only attempt to unify predicates that *have* an
inference variable as their type.
Additionally, the internal helper method is_of_param now operates
directly on a type, rather than taking a Substs. This allows us to use
the 'self_ty' method, rather than directly dealing with Substs.
|
|
r=QuietMisdreavus
Rustdoc inline macro reexport
Fixes #56173
I assume this needs to have tests? Any pointers where these need to be added?
|
|
|
|
Add source file sidebar
This is just a start currently but that gives a good overview of what it'll look like:
<img width="1440" alt="screenshot 2018-11-06 at 01 39 15" src="https://user-images.githubusercontent.com/3050060/48035592-05336180-e165-11e8-82e1-5ead0c345eb9.png">
r? @QuietMisdreavus
|
|
r=QuietMisdreavus
Fixes primitive sidebar link generation
Fixes #50746.
Fixes #55656.
r? @QuietMisdreavus
|
|
|
|
|
|
|
|
If we end up with a projection predicate that equates a type with
itself (e.g. <T as MyType>::Value == <T as MyType>::Value), we can
run into issues if we try to add it to our ParamEnv.
|
|
Fixes #50159
This commit makes several improvements to AutoTraitFinder:
* Call infcx.resolve_type_vars_if_possible before processing new
predicates. This ensures that we eliminate inference variables wherever
possible.
* Process all nested obligations we get from a vtable, not just ones
with depth=1.
* The 'depth=1' check was a hack to work around issues processing
certain predicates. The other changes in this commit allow us to
properly process all predicates that we encounter, so the check is no
longer necessary,
* Ensure that we only display predicates *without* inference variables
to the user, and only attempt to unify predicates that *have* an
inference variable as their type.
Additionally, the internal helper method is_of_param now operates
directly on a type, rather than taking a Substs. This allows us to use
the 'self_ty' method, rather than directly dealing with Substs.
|
|
|
|
|
|
Rollup of 20 pull requests
Successful merges:
- #55136 (Remove short doc where it starts with a codeblock)
- #55711 (Format BtreeMap::range_mut example)
- #55722 (impl_stable_hash_for: support enums and tuple structs with generic parameters)
- #55754 (Avoid converting bytes to UTF-8 strings to print, just pass bytes to stdout/err)
- #55804 (rustdoc: don't inline `pub use some_crate` unless directly asked to)
- #55805 (Move `static_assert!` into librustc_data_structures)
- #55837 (Make PhantomData #[structural_match])
- #55840 (Fix TLS errors when downloading stage0)
- #55843 (add FromIterator<A> to Box<[A]>)
- #55858 (Small fixes on code blocks in rustdoc)
- #55863 (Fix a typo in std::panic)
- #55870 (Fix typos.)
- #55874 (string: Add documentation for `From` impls)
- #55879 (save-analysis: Don't panic for macro-generated use globs)
- #55882 (Reference count `crate_inherent_impls`s return value.)
- #55888 (miri: for uniformity, also move memory_deallocated to AllocationExtra)
- #55889 (global allocators: add a few comments)
- #55896 (Document optimizations enabled by FusedIterator)
- #55905 (Change `Lit::short_name` to `Lit::literal_name`.)
- #55908 (Fix their/there grammar nit)
|
|
Check for negative impls when finding auto traits
Fixes #55321
When AutoTraitFinder begins examining a type, it checks for an explicit
negative impl. However, it wasn't checking for negative impls found when
calling 'select' on predicates found from nested obligations.
This commit makes AutoTraitFinder check for negative impls whenever it
makes a call to 'select'. If a negative impl is found, it immediately
bails out.
Normal users of SelectioContext don't need to worry about this, since
they stop as soon as an Unimplemented error is encountered. However, we
add predicates to our ParamEnv when we encounter this error, so we need
to handle negative impls specially (so that we don't try adding them to
our ParamEnv).
|
|
Remove short doc where it starts with a codeblock
Fixes #54975.
|
|
|
|
|
|
Choose predicates without inference variables over those with them
Fixes #54705
When constructing synthetic auto trait impls, we may come across
multiple predicates involving the same type, trait, and substitutions.
Since we can only display one of these, we pick the one with the 'most
strict' lifetime paramters. This ensures that the impl we render the
user is actually valid (that is, a struct matching that impl will
actually implement the auto trait in question).
This commit exapnds the definition of 'more strict' to take into account
inference variables. We always choose a predicate without inference
variables over a predicate with inference variables.
|
|
test that rustdoc doesn't overflow on a big enum
Adds a test to close #25295. The test case depended on `enum_primitive` so I just basically pulled its source into an auxiliary file, is that the right way to do it?
|
|
r=QuietMisdreavus
Hide default impls items
Follow up of #51885.
Fixes #54025.
cc @Mark-Simulacrum
r? @QuietMisdreavus
And screenshots of course:
<img width="1440" alt="screen shot 2018-09-12 at 23 30 35" src="https://user-images.githubusercontent.com/3050060/45454424-1ff8d500-b6e4-11e8-9257-030322495d58.png">
<img width="1440" alt="screen shot 2018-09-12 at 23 30 42" src="https://user-images.githubusercontent.com/3050060/45454431-2424f280-b6e4-11e8-8d65-db0d85ac18f0.png">
|
|
|
|
Add index page argument
@Mark-Simulacrum: I might need some help from you: in bootstrap, I want to add an argument (a new flag added into `rustdoc`) in order to generate the current index directly when `rustdoc` is documenting the `std` lib. However, my change in `bootstrap` didn't do it and I assume it must be moved inside the `Std` struct. But there, I don't see how to pass it to `rustdoc` through `cargo`. Did I miss anything?
r? @QuietMisdreavus
|
|
|
|
|
|
Fixes #54705
When constructing synthetic auto trait impls, we may come across
multiple predicates involving the same type, trait, and substitutions.
Since we can only display one of these, we pick the one with the 'most
strict' lifetime paramters. This ensures that the impl we render the
user is actually valid (that is, a struct matching that impl will
actually implement the auto trait in question).
This commit exapnds the definition of 'more strict' to take into account
inference variables. We always choose a predicate without inference
variables over a predicate with inference variables.
|
|
Rollup of 21 pull requests
Successful merges:
- #54816 (Don't try to promote already promoted out temporaries)
- #54824 (Cleanup rustdoc tests with `@!has` and `@!matches`)
- #54921 (Add line numbers option to rustdoc)
- #55167 (Add a "cheap" mode for `compute_missing_ctors`.)
- #55258 (Fix Rustdoc ICE when checking blanket impls)
- #55264 (Compile the libstd we distribute with -Ccodegen-unit=1)
- #55271 (Unimplement ExactSizeIterator for MIR traversing iterators)
- #55292 (Macro diagnostics tweaks)
- #55298 (Point at macro definition when no rules expect token)
- #55301 (List allowed tokens after macro fragments)
- #55302 (Extend the impl_stable_hash_for! macro for miri.)
- #55325 (Fix link to macros chapter)
- #55343 (rustbuild: fix remap-debuginfo when building a release)
- #55346 (Shrink `Statement`.)
- #55358 (Remove redundant clone (2))
- #55370 (Update mailmap for estebank)
- #55375 (Typo fixes in configure_cmake comments)
- #55378 (rustbuild: use configured linker to build boostrap)
- #55379 (validity: assert that unions are non-empty)
- #55383 (Use `SmallVec` for the queue in `coerce_unsized`.)
- #55391 (bootstrap: clean up a few clippy findings)
|
|
Report const eval error inside the query
Functional changes: We no longer warn about bad constants embedded in unused types. This relied on being able to report just a warning, not a hard error on that case, which we cannot do any more now that error reporting is consistently centralized.
r? @RalfJung
fixes #53561
|
|
Fix Rustdoc ICE when checking blanket impls
Fixes #55001, #54744
Previously, SelectionContext would unconditionally cache the selection
result for an obligation. This worked fine for most users of
SelectionContext, but it caused an issue when used by Rustdoc's blanket
impl finder.
The issue occured when SelectionContext chose a ParamCandidate which
contained inference variables. Since inference variables can change
between calls to select(), it's not safe to cache the selection result -
the chosen candidate might not be applicable for future results, leading
to an ICE when we try to run confirmation.
This commit prevents SelectionContext from caching any ParamCandidate
that contains inference variables. This should always be completely
safe, as trait selection should never depend on a particular result
being cached.
I've also added some extra debug!() statements, which I found helpful in
tracking down this bug.
|
|
Cleanup rustdoc tests with `@!has` and `@!matches`
Fixes #49713
Here's a _long_ list of all the places that include `@!has`. I have marked the ones I have looked at so far.
- [x] search-index.rs: fn priv_method() {} // @!has - priv_method
- [x] search-index.rs: fn trait_method(&self) {} // @!has - priv_method
- [x] search-index.rs: // @!has search-index.js Target
- [x] short-dockblock.rs:// @!has foo/index.html '//*[@class="docblock-short"]/p/h1' 'fooo'
- [x] short-dockblock.rs:// @!has foo/index.html '//*[@class="docblock-short"]/p/h2' 'mooood'
- [x] keyword.rs:// @!has foo/index.html '//a/@href' 'foo/index.html'
- [x] keyword.rs:// @!has foo/foo/index.html
- [x] keyword.rs:// @!has-dir foo/foo
- [x] issue-46380-2.rs:// @!has - '//*[@class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'
- [x] escape-rust-expr.rs:// @!has escape_rust_expr/constant.CONST_S.html '//pre[@class="rust const"]' '"<script>"'
- [x] issue-33069.rs:// @!has - '//code' 'impl Bar for Foo'
- [x] playground-empty.rs:// @!has foo/index.html '//a[@class="test-arrow"]' "Run"
- [x] issue-34473.rs:// @!has - SomeTypeWithLongName
- [x] issue-34473.rs:// @!has - SomeTypeWithLongName
- [x] issue-34473.rs:// @!has foo/struct.SomeTypeWithLongName.html
- [x] issue-29584.rs:// @!has - 'impl Bar for'
- [x] hidden-line.rs:// @!has hidden_line/fn.foo.html invisible
- [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
- [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'There is another line'
- [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'Docs associated with the trait a_method definition.'
- [x] manual_impl.rs:// @!has - '//*[@class="docblock"]' 'Docs associated with the trait c_method definition.'
- [x] issue-19190-2.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
- [x] unneeded-trait-implementations-title.rs:// @!has foo/struct.Bar.html '//*[@id="implementations"]'
- [x] masked.rs:// @!has 'search-index.js' 'masked_method'
- [x] masked.rs:// @!has 'foo/struct.String.html' 'MaskedTrait'
- [x] masked.rs:// @!has 'foo/struct.String.html' 'masked_method'
- [x] masked.rs:// @!has 'foo/trait.Clone.html' 'MaskedStruct'
- [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'MaskedTrait'
- [x] masked.rs:// @!has 'foo/struct.MyStruct.html' 'masked_method'
- [x] masked.rs:// @!has 'foo/trait.MyTrait.html' 'MaskedStruct'
- [x] redirect.rs:// @!has - '//code/a' 'Qux'
- [x] issue-43701.rs:// @!has implementors/core/clone/trait.Clone.js
- [x] union.rs: // @!has - //pre "b: u16"
- [x] prim-title.rs:// @!has - '//head/title' 'foo'
- [x] empty-section.rs:// @!has - '//*[@class="synthetic-implementations"]' 'Auto Trait Implementations'
- [x] traits-in-bodies-private.rs:// @!has - '//code' 'impl HiddenTrait for SomeStruct'
- [x] playground-none.rs:// @!has foo/index.html '//a[@class="test-arrow"]' "Run"
- [x] issue-34025.rs:// @!has 'foo/sys/index.html'
- [x] issue-34025.rs:// @!has 'foo/sys/sidebar-items.js'
- [x] issue-34025.rs: // @!has 'foo/sys/fn.foo.html'
- [x] issue-23812.rs:// @!has - '/// Outer comment'
- [x] issue-23812.rs:// @!has - '//! Inner comment'
- [x] issue-23812.rs:// @!has - '/** Outer block comment */'
- [x] issue-23812.rs:// @!has - '/*! Inner block comment */'
- [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::bar;'
- [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::baz;'
- [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/macro.quux.html
- [x] pub-use-extern-macros.rs:// @!has pub_use_extern_macros/index.html '//code' 'pub use macros::quux;'
- [x] issue-26606.rs:// @!has - '//a/@href' '../src/'
- [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/foreigntype.X4.html
- [x] foreigntype-reexport.rs:// @!has foreigntype_reexport/index.html '//a[@class="foreigntype"]' 'X4'
- [x] issue-31899.rs:// @!has - 'rust rust-example-rendered'
- [x] issue-31899.rs:// @!has - 'use ndarray::arr2'
- [x] issue-31899.rs:// @!has - 'prohibited'
- [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Foo"]' 'impl Foo for Bar'
- [x] hidden-trait-struct-impls.rs:// @!has foo/struct.Bar.html '//*[@id="impl-Dark"]' 'impl Dark for Bar'
- [x] hidden-trait-struct-impls.rs:// @!has foo/trait.Bam.html '//*[@id="implementors-list"]' 'impl Bam for Hidden'
- [x] hidden-impls.rs:// @!has - 'Foo'
- [x] hidden-impls.rs:// @!has - 'Foo'
- [x] module-impls.rs:// @!has foo/index.html 'Implementations'
- [x] issue-35169.rs:// @!has - '//*[@id="by_mut_ref.v"]' 'fn by_mut_ref(&mut self)'
- [x] issue-35169.rs:// @!has - '//*[@id="method.by_mut_ref"]' 'fn by_mut_ref(&mut self)'
- [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_mut_ref.v"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
- [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_mut_ref"]' 'fn by_explicit_mut_ref(self: &mut Foo)'
- [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
- [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
- [x] issue-35169.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
- [x] issue-35169.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
- [x] issue-35169.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
- [x] issue-35169.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
- [x] extern-links.rs:// @!has foo/index.html '//a' 'extern_links'
- [x] extern-links.rs:// @!has foo/index.html '//a' 'Foo'
- [x] extern-links.rs: // @!has foo/hidden/extern_links/index.html
- [x] extern-links.rs: // @!has foo/hidden/extern_links/struct.Foo.html
- [x] issue-33178-1.rs:// @!has - //a/@title empty
- [x] issue-33178-1.rs:// @!has - //a/@title variant_struct
- [x] issue-47038.rs:// @!has - '//*[@id="macros"]' 'Macros'
- [x] issue-47038.rs:// @!has - '//a/@href' 'macro.vec.html'
- [x] issue-47038.rs:// @!has 'foo/macro.vec.html'
- [x] issue-46766.rs:// @!has foo/index.html '//a/@href' './Enum/index.html'
- [x] issue-32395.rs:// @!has - 'pub qux'
- [x] issue-32395.rs:// @!has - 'pub Bar'
- [x] issue-32395.rs:// @!has - 'pub qux'
- [x] issue-32395.rs:// @!has - 'pub Bar'
- [x] hidden-methods.rs:// @!has - 'Methods'
- [x] hidden-methods.rs:// @!has - 'impl Foo'
- [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
- [x] hidden-methods.rs:// @!has - 'Methods'
- [x] hidden-methods.rs:// @!has - 'impl Bar'
- [x] hidden-methods.rs:// @!has - 'this_should_be_hidden'
- [x] structfields.rs: // @!has - //pre "b: ()"
- [x] structfields.rs: // @!has - //pre "c: usize"
- [x] structfields.rs: // @!has - //pre "// some fields omitted"
- [x] structfields.rs: // @!has - //pre "b: ()"
- [x] issue-46767.rs:// @!has foo/index.html '//a/@href' './private/index.html'
- [x] assoc-consts.rs: // @!has - FOO_HIDDEN
- [x] assoc-consts.rs: // @!has - FOO_HIDDEN
- [x] assoc-consts.rs: // @!has assoc_consts/struct.Bar.html 'BAR_PRIVATE'
- [x] assoc-consts.rs: // @!has assoc_consts/struct.Bar.html 'BAR_HIDDEN'
- [x] issue-53689.rs:// @!has - 'MyStruct'
- [x] search-index-summaries.rs:// @!has - 'www.example.com'
- [x] search-index-summaries.rs:// @!has - 'More Foo.'
- [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
- [x] impl-everywhere.rs:// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &\'x impl Foo {"
- [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
- [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
- [x] impl-everywhere.rs:// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
- [x] impl-everywhere.rs:// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
- [x] issue-19190.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
- [x] issue-19190.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
- [x] deprecated-impls.rs: // @!has - 'fn_def_def_with_doc full'
- [x] deprecated-impls.rs: // @!has - 'fn_empty_with_doc full'
- [x] deprecated-impls.rs: // @!has - 'fn_def_with full'
- [x] deprecated-impls.rs: // @!has - 'fn_def_def_with_doc full'
- [x] issue-19190-3.rs:// @!has - '//*[@id="method.new"]' 'fn new() -> String'
- [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
- [x] issue-19190-3.rs:// @!has - '//*[@id="method.static_baz"]' 'fn static_baz()'
- [x] sidebar-items.rs:// @!has - '//*[@class="sidebar-links"]/a' 'waza'
- [x] sidebar-items.rs:// @!has - '//*[@class="sidebar-links"]/a' 'waza'
- [x] issue-27104.rs:// @!has - 'extern crate std'
- [x] issue-27104.rs:// @!has - 'use std::prelude::'
- [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo'
- [x] issue-13698.rs:// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar'
- [x] issue-41783.rs:// @!has - 'space'
- [x] issue-41783.rs:// @!has - 'comment'
- [x] trait-self-link.rs:// @!has trait_self_link/trait.Foo.html //a/@href ../trait_self_link/trait.Foo.html
- [x] generic-impl.rs:// @!has foo/struct.Bar.html '//h3[@id="impl-ToString"]//code' 'impl<T> ToString for T'
- [x] all.rs:// @!has foo/all.html 'private_module'
- [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_box.v"]' 'fn by_explicit_box(self: Box<Foo>)'
- [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_box"]' 'fn by_explicit_box(self: Box<Foo>)'
- [x] issue-35169-2.rs:// @!has - '//*[@id="by_explicit_self_box.v"]' 'fn by_explicit_self_box(self: Box<Self>)'
- [x] issue-35169-2.rs:// @!has - '//*[@id="method.by_explicit_self_box"]' 'fn by_explicit_self_box(self: Box<Self>)'
- [x] issue-35169-2.rs:// @!has - '//*[@id="static_foo.v"]' 'fn static_foo()'
- [x] issue-35169-2.rs:// @!has - '//*[@id="method.static_foo"]' 'fn static_foo()'
- [x] doc-cfg.rs:// @!has - '//*[@id="main"]/*[@class="stability"]/*[@class="stab portability"]' ''
- [x] inline_local/glob-private.rs:// @!has - "mod1"
- [x] inline_local/glob-private.rs:// @!has - "Mod1Private"
- [x] inline_local/glob-private.rs:// @!has - "mod2"
- [x] inline_local/glob-private.rs:// @!has - "Mod2Private"
- [x] inline_local/glob-private.rs:// @!has foo/struct.Mod1Private.html
- [x] inline_local/glob-private.rs:// @!has foo/struct.Mod2Private.html
- [x] inline_local/glob-private.rs:// @!has foo/mod1/index.html
- [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod1Private.html
- [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Public.html
- [x] inline_local/glob-private.rs:// @!has foo/mod1/struct.Mod2Private.html
- [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/index.html
- [x] inline_local/glob-private.rs:// @!has foo/mod1/mod2/struct.Mod2Private.html
- [x] inline_local/glob-private.rs:// @!has-dir foo/mod2
- [x] inline_local/glob-private.rs:// @!has foo/mod2/index.html
- [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Public.html
- [x] inline_local/glob-private.rs:// @!has foo/mod2/struct.Mod2Private.html
- [x] inline_local/hidden-use.rs:// @!has - 'private'
- [x] inline_local/hidden-use.rs:// @!has - 'Foo'
- [x] inline_local/hidden-use.rs:// @!has hidden_use/struct.Foo.html
- [x] inline_local/glob-extern-no-defaults.rs:// @!has - "private_fn"
- [x] inline_local/glob-extern-no-defaults.rs:// @!has foo/fn.private_fn.html
- [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Foo.html
- [x] inline_local/issue-32343.rs:// @!has - '//code/a' 'Foo'
- [x] inline_local/issue-32343.rs:// @!has issue_32343/struct.Bar.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod1Private"
- [x] inline_local/glob-private-no-defaults.rs:// @!has - "mod2"
- [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod1Private.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/struct.Mod2Private.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Public"
- [x] inline_local/glob-private-no-defaults.rs:// @!has - "Mod2Private"
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Public.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod1/struct.Mod2Private.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/index.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Public.html
- [x] inline_local/glob-private-no-defaults.rs:// @!has foo/mod2/struct.Mod2Private.html
- [x] inline_local/glob-extern.rs:// @!has - "mod1"
- [x] inline_local/glob-extern.rs:// @!has - "private_fn"
- [x] inline_local/glob-extern.rs:// @!has foo/fn.private_fn.html
- [x] inline_local/glob-extern.rs:// @!has foo/mod1/index.html
- [x] inline_local/glob-extern.rs:// @!has foo/mod1/fn.private_fn.html
- [x] inline_local/please_inline.rs: // @!has - 'pub use foo::'
- [x] inline_local/please_inline.rs: // @!has please_inline/b/struct.Foo.html
- [x] inline_cross/hidden-use.rs:// @!has - 'rustdoc_hidden'
- [x] inline_cross/hidden-use.rs:// @!has - 'Bar'
- [x] inline_cross/hidden-use.rs:// @!has hidden_use/struct.Bar.html
- [x] inline_cross/inline_hidden.rs:// @!has - '//a/@title' 'Foo'
- [x] inline_cross/assoc-items.rs:// @!has - 'PrivateConst'
- [x] inline_cross/assoc-items.rs:// @!has - 'private_method'
- [x] inline_cross/cross-glob.rs:// @!has cross_glob/index.html '//code' 'pub use inner::*;'
- [x] inline_cross/macro-vis.rs:// @!has - '//pre' 'some_macro'
- [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.other_macro.html
- [x] inline_cross/macro-vis.rs:// @!has macro_vis/index.html '//a/@href' 'macro.other_macro.html'
- [x] inline_cross/macro-vis.rs:// @!has - '//code' 'pub use qwop::other_macro;'
- [x] inline_cross/macro-vis.rs:// @!has macro_vis/macro.super_macro.html
- [x] inline_cross/issue-31948.rs:// @!has - '//*[@class="impl"]//code' 'Bar for'
- [x] inline_cross/issue-31948.rs:// @!has - '//*[@class="impl"]//code' 'Qux for'
- [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
- [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
- [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wibble'
- [x] inline_cross/issue-31948.rs:// @!has - '//code' 'for Wobble'
- [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Bar.html
- [x] inline_cross/issue-31948.rs:// @!has issue_31948/trait.Qux.html
- [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wibble.html
- [x] inline_cross/issue-31948.rs:// @!has issue_31948/struct.Wobble.html
- [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@class="impl"]//code' 'Bar for'
- [x] inline_cross/issue-31948-1.rs:// @!has - '//*[@class="impl"]//code' 'Qux for'
- [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
- [x] inline_cross/issue-31948-1.rs:// @!has - '//code' 'for Wibble'
- [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Bar.html
- [x] inline_cross/issue-31948-1.rs:// @!has issue_31948_1/trait.Qux.html
- [x] inline_cross/issue-28480.rs:// @!has - '//a/@title' 'Hidden'
- [x] inline_cross/issue-28480.rs:// @!has - '//a/@title' 'Hidden'
- [x] inline_cross/issue-31948-2.rs:// @!has - '//*[@class="impl"]//code' 'Bar for'
- [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bar.html
- [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Woof.html
- [x] inline_cross/issue-31948-2.rs:// @!has issue_31948_2/trait.Bark.html
It doesn't look like `@!matches` is used anywhere.
|
|
Fixes #55321
When AutoTraitFinder begins examining a type, it checks for an explicit
negative impl. However, it wasn't checking for negative impls found when
calling 'select' on predicates found from nested obligations.
This commit makes AutoTraitFinder check for negative impls whenever it
makes a call to 'select'. If a negative impl is found, it immediately
bails out.
Normal users of SelectioContext don't need to worry about this, since
they stop as soon as an Unimplemented error is encountered. However, we
add predicates to our ParamEnv when we encounter this error, so we need
to handle negative impls specially (so that we don't try adding them to
our ParamEnv).
|
|
|
|
|
|
|
|
I confirmed that it fails on:
rustdoc 1.30.0-beta.12 (96a229824 2018-10-04)
and passes on:
rustdoc 1.31.0-nightly (f99911a4a 2018-10-23)
|