about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-02-03 18:36:48 +0100
committerMara Bos <m-ou.se@m-ou.se>2021-02-03 18:36:48 +0100
commit68cc12ab71c50aea1f17e6c1cc631bb4c6a8ebb5 (patch)
tree6e35e6afadf4b26d66d8bd075398b1bbcdb1a4dd /src
parent6ad11e2e25919b75ebbc36d7910f2a1126a7e873 (diff)
downloadrust-68cc12ab71c50aea1f17e6c1cc631bb4c6a8ebb5.tar.gz
rust-68cc12ab71c50aea1f17e6c1cc631bb4c6a8ebb5.zip
Fix non-existent-field ICE for generic fields.
Co-authored-by: eddyb <eddyb@lyken.rs>
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/suggestions/non-existent-field-present-in-subfield.fixed4
-rw-r--r--src/test/ui/suggestions/non-existent-field-present-in-subfield.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/suggestions/non-existent-field-present-in-subfield.fixed b/src/test/ui/suggestions/non-existent-field-present-in-subfield.fixed
index 167548a89de..e58b4e6ca4d 100644
--- a/src/test/ui/suggestions/non-existent-field-present-in-subfield.fixed
+++ b/src/test/ui/suggestions/non-existent-field-present-in-subfield.fixed
@@ -3,7 +3,7 @@
 struct Foo {
     first: Bar,
     _second: u32,
-    _third: u32,
+    _third: Vec<String>,
 }
 
 struct Bar {
@@ -32,7 +32,7 @@ fn main() {
     let d = D { test: e };
     let c = C { c: d };
     let bar = Bar { bar: c };
-    let fooer = Foo { first: bar, _second: 4, _third: 5 };
+    let fooer = Foo { first: bar, _second: 4, _third: Vec::new() };
 
     let _test = &fooer.first.bar.c;
     //~^ ERROR no field
diff --git a/src/test/ui/suggestions/non-existent-field-present-in-subfield.rs b/src/test/ui/suggestions/non-existent-field-present-in-subfield.rs
index 81cc1af4dff..7e273ac23d8 100644
--- a/src/test/ui/suggestions/non-existent-field-present-in-subfield.rs
+++ b/src/test/ui/suggestions/non-existent-field-present-in-subfield.rs
@@ -3,7 +3,7 @@
 struct Foo {
     first: Bar,
     _second: u32,
-    _third: u32,
+    _third: Vec<String>,
 }
 
 struct Bar {
@@ -32,7 +32,7 @@ fn main() {
     let d = D { test: e };
     let c = C { c: d };
     let bar = Bar { bar: c };
-    let fooer = Foo { first: bar, _second: 4, _third: 5 };
+    let fooer = Foo { first: bar, _second: 4, _third: Vec::new() };
 
     let _test = &fooer.c;
     //~^ ERROR no field