summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-94675.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/issue-94675.rs')
-rw-r--r--tests/ui/consts/issue-94675.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-94675.rs b/tests/ui/consts/issue-94675.rs
new file mode 100644
index 000000000..ce21ebdb9
--- /dev/null
+++ b/tests/ui/consts/issue-94675.rs
@@ -0,0 +1,15 @@
+#![feature(const_trait_impl, const_mut_refs)]
+
+struct Foo<'a> {
+ bar: &'a mut Vec<usize>,
+}
+
+impl<'a> Foo<'a> {
+ const fn spam(&mut self, baz: &mut Vec<u32>) {
+ self.bar[0] = baz.len();
+ //~^ the trait bound `Vec<usize>: ~const Index<_>` is not satisfied
+ //~| the trait bound `Vec<usize>: ~const IndexMut<usize>` is not satisfied
+ }
+}
+
+fn main() {}