summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-js/where-clause.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/rustdoc-js/where-clause.rs
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-js/where-clause.rs')
-rw-r--r--tests/rustdoc-js/where-clause.rs30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/rustdoc-js/where-clause.rs b/tests/rustdoc-js/where-clause.rs
new file mode 100644
index 000000000..56c01019f
--- /dev/null
+++ b/tests/rustdoc-js/where-clause.rs
@@ -0,0 +1,30 @@
+pub struct Nested;
+
+pub trait Trait<T> {
+ fn thank_you(x: T);
+}
+
+pub fn abracadabra<X>(_: X) where X: Trait<Nested> {}
+
+pub fn alacazam<X>() -> X where X: Trait<Nested> {}
+
+pub trait T1 {}
+pub trait T2<'a, T> {
+ fn please(_: &'a T);
+}
+
+pub fn presto<A, B>(_: A, _: B) where A: T1, B: for <'b> T2<'b, Nested> {}
+
+pub trait Shazam {}
+
+pub fn bippety<X>() -> &'static X where X: Shazam {
+ panic!()
+}
+
+pub struct Drizzel<T>(T);
+
+impl<T> Drizzel<T> {
+ pub fn boppety(&self) -> &T where T: Shazam {
+ panic!();
+ }
+}