about summary refs log tree commit diff
path: root/src/test/rustdoc/synthetic_auto
AgeCommit message (Collapse)AuthorLines
2019-04-22Remove double trailing newlinesvarkor-1/+0
2018-12-27Simplify foreign type rendering.John Heitmann-14/+14
Simplified foreign type rendering by switching from tables to flexbox. Also, removed some seemingly extraneous elements like “ghost” spans. Reduces element count on std::iter::Iterator by 30%.
2018-12-25Remove licensesMark Rousskov-98/+0
2018-11-28Fix Tidy errorAaron Hill-1/+1
2018-11-28Filter out self-referential projection predicatesAaron Hill-0/+40
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.
2018-08-02Fix rustdoc crash when 'static bound appears in struct declarationAaron Hill-0/+20
2018-03-28Fix text overlapGuillaume Gomez-12/+12
2018-03-19Fix ordering of auto-generated trait bounds in rustdoc outputPhlosioneer-2/+0
While the order of the where clauses was deterministic, the ordering of bounds and lifetimes was not. This made the order flip- flop randomly when new traits and impls were added to libstd. This PR makes the ordering of bounds and lifetimes deterministic, and re-enables the test that was causing the issue. Fixes #49123
2018-03-19Okay this is the right way.boats-3/+1
2018-03-19Comment out entire test.boats-1/+3
2018-03-19Ignore properly.boats-3/+1
2018-03-19Comment out flakey test.boats-0/+4
2018-02-19Sort synthetic impls bounds before renderingAaron Hill-5/+5
This removes the implicit dependency on the iteration order of FxHashMap
2018-02-18Remove extra space in testAaron Hill-2/+2
2018-02-18Generate documentation for auto-trait implsAaron Hill-0/+242
A new section is added to both both struct and trait doc pages. On struct/enum pages, a new 'Auto Trait Implementations' section displays any synthetic implementations for auto traits. Currently, this is only done for Send and Sync. On trait pages, a new 'Auto Implementors' section displays all types which automatically implement the trait. Effectively, this is a list of all public types in the standard library. Synthesized impls for a particular auto trait ('synthetic impls') take into account generic bounds. For example, a type 'struct Foo<T>(T)' will have 'impl<T> Send for Foo<T> where T: Send' generated for it. Manual implementations of auto traits are also taken into account. If we have the following types: 'struct Foo<T>(T)' 'struct Wrapper<T>(Foo<T>)' 'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes this sound somehow Then Wrapper will have the following impl generated: 'impl<T> Send for Wrapper<T>' reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send' to hold Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are taken into account by synthetic impls However, if a type can *never* implement a particular auto trait (e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be generated (in this case, 'impl<T> !Send for MyStruct<T>') All of this means that a user should be able to copy-paste a synthetic impl into their code, without any observable changes in behavior (assuming the rest of the program remains unchanged).