We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a04c789 commit 749295cCopy full SHA for 749295c
src/test/ui/issues/issue-51770.rs
@@ -0,0 +1,20 @@
1
+// check-pass
2
+
3
+#![crate_type = "lib"]
4
5
+// In an older version, when NLL was still a feature, the following previously did not compile
6
+// #![feature(nll)]
7
8
+use std::ops::Index;
9
10
+pub struct Test<T> {
11
+ a: T,
12
+}
13
14
+impl<T> Index<usize> for Test<T> {
15
+ type Output = T;
16
17
+ fn index(&self, _index: usize) -> &Self::Output {
18
+ &self.a
19
+ }
20
0 commit comments