blob: 0ae7f8da4b4b9328fd62e187d875a2880d9d9379 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// `Self` as a constructor is currently allowed when the outer item is not generic.
// check-pass
struct S0(usize);
impl S0 {
fn foo() {
const C: S0 = Self(0);
fn bar() -> S0 {
Self(0)
}
}
}
fn main() {}
|