mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
15 lines
311 B
Rust
15 lines
311 B
Rust
struct S0<T>(T);
|
|
|
|
impl<T> S0<T> {
|
|
fn foo() {
|
|
const C: S0<i32> = Self(0);
|
|
//~^ ERROR can't reference `Self` constructor from outer item
|
|
fn bar() -> S0<i32> {
|
|
Self(0)
|
|
//~^ ERROR can't reference `Self` constructor from outer item
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {}
|