rust/tests/ui/self/self-ctor-nongeneric.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
251 B
Rust
Raw Normal View History

2023-05-14 07:48:57 -05:00
// `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() {}