about summary refs log tree commit diff
path: root/src/test/rustdoc/inline_cross/impl_trait.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-47/+0
2022-11-04rustdoc: render unnamed arguments as underscores in cross-crate functions & ↵León Orell Valerian Liehr-1/+1
function pointers for consistency with the way we display local definitions (cleaned from HIR, not from rustc_middle).
2022-10-05rustdoc: render more cross-crate hrtbs properlyLeón Orell Valerian Liehr-0/+7
2021-07-25Rustdoc accessibility: use real headers for doc itemsbors-2/+2
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-04-03Remove redundant `ignore-tidy-linelength` annotationsSimon Jakobi-1/+0
This is step 2 towards fixing #77548. In the codegen and codegen-units test suites, the `//` comment markers were kept in order not to affect any source locations. This is because these tests cannot be automatically `--bless`ed.
2021-03-13Avoid sorting predicates by `DefId`Aaron Hill-1/+1
Fixes issue #82920 Even if an item does not change between compilation sessions, it may end up with a different `DefId`, since inserting/deleting an item affects the `DefId`s of all subsequent items. Therefore, we use a `DefPathHash` in the incremental compilation system, which is stable in the face of changes to unrelated items. In particular, the query system will consider the inputs to a query to be unchanged if any `DefId`s in the inputs have their `DefPathHash`es unchanged. Queries are pure functions, so the query result should be unchanged if the query inputs are unchanged. Unfortunately, it's possible to inadvertantly make a query result incorrectly change across compilations, by relying on the specific value of a `DefId`. Specifically, if the query result is a slice that gets sorted by `DefId`, the precise order will depend on how the `DefId`s got assigned in a particular compilation session. If some definitions end up with different `DefId`s (but the same `DefPathHash`es) in a subsequent compilation session, we will end up re-computing a *different* value for the query, even though the query system expects the result to unchanged due to the unchanged inputs. It turns out that we have been sorting the predicates computed during `astconv` by their `DefId`. These predicates make their way into the `super_predicates_that_define_assoc_type`, which ends up getting used to compute the vtables of trait objects. This, re-ordering these predicates between compilation sessions can lead to undefined behavior at runtime - the query system will re-use code built with a *differently ordered* vtable, resulting in the wrong method being invoked at runtime. This PR avoids sorting by `DefId` in `astconv`, fixing the miscompilation. However, it's possible that other instances of this issue exist - they could also be easily introduced in the future. To fully fix this issue, we should 1. Turn on `-Z incremental-verify-ich` by default. This will cause the compiler to ICE whenver an 'unchanged' query result changes between compilation sessions, instead of causing a miscompilation. 2. Remove the `Ord` impls for `CrateNum` and `DefId`. This will make it difficult to introduce ICEs in the first place.
2020-11-18Add support for custom allocators in `Vec`Tim Diekmann-2/+3
2020-07-02Update rustdoc testsGuillaume Gomez-2/+2
2019-09-21add rustdoc test for async fn reexportcsmoe-1/+9
2019-08-19Fix ICE with `impl Trait` in type boundsShotaro Yamada-0/+6
2019-08-19Fix tidyShotaro Yamada-1/+2
2019-08-19Support nested `impl Trait`Shotaro Yamada-0/+6
2019-08-19Associated type bound for inlined impl Trait docShotaro Yamada-0/+6
2019-08-19Support `impl Trait` in inlined documentationShotaro Yamada-0/+13