about summary refs log tree commit diff
path: root/tests/rustdoc
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-01-30 19:04:55 +0000
committerMichael Goulet <michael@errs.io>2023-01-30 19:04:59 +0000
commit343a359109a48f4ece657831bf0331e22d108800 (patch)
treec5a036c1a80cc94867a3b06d3e90c8f8b233b812 /tests/rustdoc
parentf55b0022db8dccc6aa6bf3f650b562eaec0fdc54 (diff)
downloadrust-343a359109a48f4ece657831bf0331e22d108800.tar.gz
rust-343a359109a48f4ece657831bf0331e22d108800.zip
Use ObligationCtxt::new_in_snapshot in satisfied_from_param_env
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/document-item-with-associated-const-in-where-clause.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/rustdoc/document-item-with-associated-const-in-where-clause.rs b/tests/rustdoc/document-item-with-associated-const-in-where-clause.rs
new file mode 100644
index 00000000000..c9408ef3360
--- /dev/null
+++ b/tests/rustdoc/document-item-with-associated-const-in-where-clause.rs
@@ -0,0 +1,17 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+pub trait Enumerable {
+    const N: usize;
+}
+
+#[derive(Clone)]
+pub struct SymmetricGroup<S>
+where
+    S: Enumerable,
+    [(); S::N]: Sized,
+{
+    _phantom: std::marker::PhantomData<S>,
+}
+
+fn main() {}