You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
structFoo<A,B>(A,B);fnmain(){let a;
a = Foo::<A = i32,B = f32>(123f32);// { dg-error ErrorCode("E0229") "associated type bindings are not allowed here" "" { target *-*-* } .-1 }// { dg-error {Failed to resolve expression of function call} "" { target *-*-* } .-2 }}
This happened:
Location info was not clear.
mahad@linux:~/Desktop/mahad/gccrs-build$ gcc/crab1 /home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs -frust-incomplete-and-experimental-compiler-do-not-use
/home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs:5:15: error: associated type bindings are not allowed here [E0229]
5 | a = Foo::<A = i32, B = f32>(123f32);
- | ^^^^^^^ associated type not allowed here+ | ^ ~
/home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs:5:9: error: Failed to resolve expression of function call
5 | a = Foo::<A = i32, B = f32>(123f32);
- | ^^^^^^^^^^^^^^^^^^^^^^^ ------ supplied 1 argument- | |- | expected 2 arguments+ | ^~~
I expected to see this happen:
Location info similiar to rustc-1.49.
This is the output of rust-1.49:
mahad@linux:~/Desktop/mahad/gccrs-build$ rustc /home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs
error[E0229]: associated type bindings are not allowed here
--> /home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs:5:15
|
5 | a = Foo::<A = i32, B = f32>(123f32);| ^^^^^^^ associated type not allowed here
error[E0061]: this functiontakes 2 arguments but 1 argument was supplied
--> /home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs:5:9
|
5 | a = Foo::<A = i32, B = f32>(123f32);| ^^^^^^^^^^^^^^^^^^^^^^^ ------ supplied 1 argument
||| expected 2 arguments
|
note: tuple struct defined here
--> /home/mahad/Desktop/mahad/gccrs/gcc/testsuite/rust/compile/type-bindings1.rs:1:1
|
1 | struct Foo<A, B>(A, B);| ^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0061, E0229.
For more information about an error, try `rustc --explain E0061`.
Meta
What version of Rust GCC were you using, git sha 8628813.
The text was updated successfully, but these errors were encountered:
Location Info error
I tried this code:
This happened:
I expected to see this happen:
Meta
The text was updated successfully, but these errors were encountered: