mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
81bca5f5cf
Tweak output. Fix #115992.
19 lines
385 B
Rust
19 lines
385 B
Rust
struct Foo {
|
|
field: u32,
|
|
}
|
|
|
|
impl Foo {
|
|
fn field(&self) -> u32 {
|
|
self.field
|
|
}
|
|
|
|
fn new() -> Foo {
|
|
field; //~ ERROR cannot find value `field` in this scope
|
|
Foo { field } //~ ERROR cannot find value `field` in this scope
|
|
}
|
|
fn clone(&self) -> Foo {
|
|
Foo { field } //~ ERROR cannot find value `field` in this scope
|
|
}
|
|
}
|
|
fn main() {}
|