Skip to content
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

Implicit trait coercions with moves will segfault #11197

Closed
alexcrichton opened this issue Dec 29, 2013 · 3 comments
Closed

Implicit trait coercions with moves will segfault #11197

alexcrichton opened this issue Dec 29, 2013 · 3 comments
Labels
P-medium Medium priority
Milestone

Comments

@alexcrichton
Copy link
Member

This code segfaults:

use std::io;

fn foo(mut a: ~Writer) {
    a.write(bytes!("Hello\n"));
}

fn main() {
    let out = io::stdout();
    foo(~out);
}
@alexcrichton
Copy link
Member Author

Nominating, this is very bad.

@alexcrichton
Copy link
Member Author

This code works:

use std::io;

fn foo(mut a: ~Writer) {
    a.write(bytes!("Hello\n"));
}

fn main() {
    foo(~io::stdout());
}

@pnkfelix
Copy link
Member

pnkfelix commented Jan 9, 2014

Assigning to P-high.

bors added a commit that referenced this issue Jan 14, 2014
Fixes 2 annoying issues with implicit trait object coercion: #11481 & #11197.
JohnTitor pushed a commit to JohnTitor/rust that referenced this issue Aug 30, 2022
…as-schievink

fix: make "Extract type as type alias" assist work with const generics in array

fixes rust-lang#11197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants