aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/rust/typecheck/rust-tyty-call.h3
-rw-r--r--gcc/testsuite/rust/compile/func2.rs2
-rw-r--r--gcc/testsuite/rust/compile/func3.rs2
-rw-r--r--gcc/testsuite/rust/compile/tuple_struct1.rs2
-rw-r--r--gcc/testsuite/rust/compile/tuple_struct2.rs2
-rw-r--r--gcc/testsuite/rust/compile/tuple_struct3.rs2
6 files changed, 2 insertions, 11 deletions
diff --git a/gcc/rust/typecheck/rust-tyty-call.h b/gcc/rust/typecheck/rust-tyty-call.h
index 9ff5f6f..c11fd4d 100644
--- a/gcc/rust/typecheck/rust-tyty-call.h
+++ b/gcc/rust/typecheck/rust-tyty-call.h
@@ -71,7 +71,8 @@ public:
private:
TypeCheckCallExpr (HIR::CallExpr &c, TyTy::VariantDef &variant,
Resolver::TypeCheckContext *context)
- : resolved (nullptr), call (c), variant (variant), context (context),
+ : resolved (new TyTy::ErrorType (c.get_mappings ().get_hirid ())), call (c),
+ variant (variant), context (context),
mappings (Analysis::Mappings::get ())
{}
diff --git a/gcc/testsuite/rust/compile/func2.rs b/gcc/testsuite/rust/compile/func2.rs
index 219bbfe..0b8d999 100644
--- a/gcc/testsuite/rust/compile/func2.rs
+++ b/gcc/testsuite/rust/compile/func2.rs
@@ -4,6 +4,4 @@ fn test(a: i32, b: i32) -> i32 {
fn main() {
let a = test(1); // { dg-error "unexpected number of arguments 1 expected 2" }
- // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-1 }
- // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 }
}
diff --git a/gcc/testsuite/rust/compile/func3.rs b/gcc/testsuite/rust/compile/func3.rs
index 3ab374a..2a32947 100644
--- a/gcc/testsuite/rust/compile/func3.rs
+++ b/gcc/testsuite/rust/compile/func3.rs
@@ -6,6 +6,4 @@ fn main() {
let a = test(1, true);
// { dg-error "expected .i32. got .bool." "" { target *-*-* } .-1 }
// { dg-error "Type Resolution failure on parameter" "" { target *-*-* } .-2 }
- // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-3 }
- // { dg-error "failed to type resolve expression" "" { target *-*-* } .-4 }
}
diff --git a/gcc/testsuite/rust/compile/tuple_struct1.rs b/gcc/testsuite/rust/compile/tuple_struct1.rs
index c382909..2f4cb4a 100644
--- a/gcc/testsuite/rust/compile/tuple_struct1.rs
+++ b/gcc/testsuite/rust/compile/tuple_struct1.rs
@@ -5,6 +5,4 @@ struct Foo {
fn main() {
let a = Foo(1, 2); // { dg-error "expected function, tuple struct or tuple variant, found struct 'Foo'" }
- // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-1 }
- // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 }
}
diff --git a/gcc/testsuite/rust/compile/tuple_struct2.rs b/gcc/testsuite/rust/compile/tuple_struct2.rs
index dba0511..1fc1896 100644
--- a/gcc/testsuite/rust/compile/tuple_struct2.rs
+++ b/gcc/testsuite/rust/compile/tuple_struct2.rs
@@ -2,6 +2,4 @@ struct Bar(i32, i32, bool);
fn main() {
let a = Bar(1, 2); // { dg-error "unexpected number of arguments 2 expected 3" }
- // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-1 }
- // { dg-error "failed to type resolve expression" "" { target *-*-* } .-2 }
}
diff --git a/gcc/testsuite/rust/compile/tuple_struct3.rs b/gcc/testsuite/rust/compile/tuple_struct3.rs
index a70306d..4af66b8 100644
--- a/gcc/testsuite/rust/compile/tuple_struct3.rs
+++ b/gcc/testsuite/rust/compile/tuple_struct3.rs
@@ -3,6 +3,4 @@ struct Foo(i32, i32, bool);
fn main() {
let c = Foo(1, 2f32, true);
// { dg-error "expected .i32. got .f32." "" { target *-*-* } .-1 }
- // { dg-error "failed to lookup type to CallExpr" "" { target *-*-* } .-2 }
- // { dg-error "failed to type resolve expression" "" { target *-*-* } .-3 }
}