Add regression test for old NLL ICE

上级 a04c789f
// check-pass
#![crate_type = "lib"]
// In an older version, when NLL was still a feature, the following previously did not compile
// #![feature(nll)]
use std::ops::Index;
pub struct Test<T> {
a: T,
}
impl<T> Index<usize> for Test<T> {
type Output = T;
fn index(&self, _index: usize) -> &Self::Output {
&self.a
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册