diff options
| author | bors <bors@rust-lang.org> | 2022-08-08 22:45:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-08 22:45:42 +0000 |
| commit | 4b91a6ea7258a947e59c6522cd5898e7c0a6a88f (patch) | |
| tree | a5d704509e35b20650090e5b5df04e07b88902be /src/test | |
| parent | 6f955bfdfe093edccd6936603d4a8a548293dcf5 (diff) | |
| parent | 7ddc9b7026115a89a59c0e27d2002f828ee1056c (diff) | |
| download | rust-1.63.0.tar.gz rust-1.63.0.zip | |
Auto merge of #100273 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum 1.63.0
[stable] 1.63.0 release Includes cherry picks of: * https://github.com/rust-lang/rust/pull/100207 * https://github.com/rust-lang/rust-clippy/pull/9302 * Avoid ICE in rustdoc when using Fn bounds #100205 r? `@Mark-Simulacrum`
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc/auxiliary/issue-100204-aux.rs | 13 | ||||
| -rw-r--r-- | src/test/rustdoc/fn-bound.rs | 21 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-100204-inline-impl-through-glob-import.rs | 14 |
3 files changed, 48 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/issue-100204-aux.rs b/src/test/rustdoc/auxiliary/issue-100204-aux.rs new file mode 100644 index 00000000000..df1b59069be --- /dev/null +++ b/src/test/rustdoc/auxiliary/issue-100204-aux.rs @@ -0,0 +1,13 @@ +#![crate_name="first"] + +pub mod prelude { + pub use crate::Bot; +} + +pub struct Bot; + +impl Bot { + pub fn new() -> Bot { + Bot + } +} diff --git a/src/test/rustdoc/fn-bound.rs b/src/test/rustdoc/fn-bound.rs new file mode 100644 index 00000000000..4c4ffddc8a6 --- /dev/null +++ b/src/test/rustdoc/fn-bound.rs @@ -0,0 +1,21 @@ +// Regression test for #100143 + +use std::iter::Peekable; + +pub struct Span<F: Fn(&i32)> { + inner: Peekable<ConditionalIterator<F>>, +} + +pub struct ConditionalIterator<F> { + f: F, +} + + +// @has 'fn_bound/struct.ConditionalIterator.html' '//h3[@class="code-header in-band"]' 'impl<F: Fn(&i32)> Iterator for ConditionalIterator<F>' +impl<F: Fn(&i32)> Iterator for ConditionalIterator<F> { + type Item = (); + + fn next(&mut self) -> Option<Self::Item> { + todo!() + } +} diff --git a/src/test/rustdoc/issue-100204-inline-impl-through-glob-import.rs b/src/test/rustdoc/issue-100204-inline-impl-through-glob-import.rs new file mode 100644 index 00000000000..3e20c5c0741 --- /dev/null +++ b/src/test/rustdoc/issue-100204-inline-impl-through-glob-import.rs @@ -0,0 +1,14 @@ +// aux-build:issue-100204-aux.rs +// build-aux-docs +// ignore-cross-compile + +#![crate_name="second"] + +extern crate first; + +pub mod prelude {} + +// @has first/struct.Bot.html '//h4[@class="code-header"]' 'pub fn new() -> Bot' +// @has second/struct.Bot.html '//h4[@class="code-header"]' 'pub fn new() -> Bot' +#[doc(inline)] +pub use first::*; |
