diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-10-04 15:24:01 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-04 15:24:01 +0530 |
| commit | 5a4ecb4a0cae6b7a63abb1abb112a15008fcce9c (patch) | |
| tree | fb9132604367c9dead5fd8e66d85c1bf732a42b6 /src/test/incremental | |
| parent | 9c31d76e97c6116ba2480aa23a48f3e7bd25a7cb (diff) | |
| parent | 99aae9b834604788b58da8eac9156cc3715426e1 (diff) | |
| download | rust-5a4ecb4a0cae6b7a63abb1abb112a15008fcce9c.tar.gz rust-5a4ecb4a0cae6b7a63abb1abb112a15008fcce9c.zip | |
Rollup merge of #36798 - gavinb:fix/36164, r=GuillaumeGomez
Improve error message and snippet for "did you mean `x`" - Fixes #36164 - Part of #35233 Based on the standalone example https://is.gd/8STXMd posted by @nikomatsakis and using the third formatting option mentioned in #36164 and agreed by @jonathandturner. Note however this does not address the question of [how to handle an empty or unknown suggestion](https://github.com/rust-lang/rust/issues/36164#issuecomment-244460024). @nikomatsakis any suggestions on how best to address that part?
Diffstat (limited to 'src/test/incremental')
| -rw-r--r-- | src/test/incremental/struct_change_field_name.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/incremental/struct_change_field_name.rs b/src/test/incremental/struct_change_field_name.rs index c27294442e7..cb43d127405 100644 --- a/src/test/incremental/struct_change_field_name.rs +++ b/src/test/incremental/struct_change_field_name.rs @@ -39,13 +39,13 @@ pub fn use_X() -> u32 { let x: X = X { x: 22 }; //[cfail2]~^ ERROR struct `X` has no field named `x` x.x as u32 - //[cfail2]~^ ERROR attempted access of field `x` + //[cfail2]~^ ERROR no field `x` on type `X` } #[rustc_dirty(label="TypeckItemBody", cfg="cfail2")] pub fn use_EmbedX(embed: EmbedX) -> u32 { embed.x.x as u32 - //[cfail2]~^ ERROR attempted access of field `x` + //[cfail2]~^ ERROR no field `x` on type `X` } #[rustc_clean(label="TypeckItemBody", cfg="cfail2")] |
