Add E0609

This commit is contained in:
Guillaume Gomez 2017-06-10 21:19:40 +02:00
parent e1480499b4
commit f4dd365bbb
8 changed files with 64 additions and 9 deletions

View file

@ -0,0 +1,18 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
struct Foo {
x: u32,
}
fn main() {
let x = Foo { x: 0 };
let _ = x.foo; //~ ERROR E0609
}

View file

@ -1,4 +1,4 @@
error: no field `baz` on type `Foo`
error[E0609]: no field `baz` on type `Foo`
--> $DIR/issue-36798.rs:17:7
|
17 | f.baz;

View file

@ -1,4 +1,4 @@
error: no field `zz` on type `Foo`
error[E0609]: no field `zz` on type `Foo`
--> $DIR/issue-36798_unknown_field.rs:17:7
|
17 | f.zz;

View file

@ -7,7 +7,7 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current s
50 | fake_method_stmt!();
| -------------------- in this macro invocation
error: no field `fake` on type `{integer}`
error[E0609]: no field `fake` on type `{integer}`
--> $DIR/macro-backtrace-invalid-internals.rs:21:13
|
21 | 1.fake
@ -34,7 +34,7 @@ error[E0599]: no method named `fake` found for type `{integer}` in the current s
54 | let _ = fake_method_expr!();
| ------------------- in this macro invocation
error: no field `fake` on type `{integer}`
error[E0609]: no field `fake` on type `{integer}`
--> $DIR/macro-backtrace-invalid-internals.rs:39:13
|
39 | 1.fake

View file

@ -14,7 +14,7 @@ error: casting `*const U` as `*const str` is invalid
|
= note: vtable kinds may not match
error: no field `f` on type `fn() {main}`
error[E0609]: no field `f` on type `fn() {main}`
--> $DIR/cast-rfc0401.rs:75:18
|
75 | let _ = main.f as *const u32;