-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Trait coercion issue #14589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
A-type-system
Area: Type system
Comments
Here is a smaller test case: fn main() {
send::<Box<Foo>>(box Output(0)); // 1 free function
Test::<Box<Foo>>::foo(box Output(0)); // 2 static function
Test::<Box<Foo>>.send(box Output(0)); // 3 method
}
fn send<T>(_: T) {}
struct Test<T>;
impl<T> Test<T> {
fn foo(_: T) {}
fn send(&self, _: T) {}
}
trait Foo {}
struct Output(int);
impl Foo for Output {} All three should work but 3 fails to coerce. It seems to be because we have unresolved types and thus we can't add an adjustment. |
bors
added a commit
that referenced
this issue
Jun 4, 2014
Closed by #14628. |
matthiaskrgr
pushed a commit
to matthiaskrgr/rust
that referenced
this issue
Mar 10, 2024
Add test explorer This PR implements the vscode testing api similar to rust-lang#14589, this time using a set of lsp extensions in order to make it useful for clients other than vscode, and make the vscode client side logic simpler (its now around ~100 line of TS code) Fix rust-lang#3601
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/edef1c/f968f1840b3ed6f007e0
The text was updated successfully, but these errors were encountered: