Skip to content

Replace try!() with ? #843

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 9, 2018
Merged

Replace try!() with ? #843

merged 1 commit into from
May 9, 2018

Conversation

kornelski
Copy link
Contributor

No description provided.

@TedDriggs
Copy link
Contributor

I believe there were performance issues with this in the past; I asked @dtolnay about why serde used try! a while back and there were good reasons at the time.

@dtolnay
Copy link

dtolnay commented Apr 24, 2018

Yes it measurably hurt our benchmarks -- tracked in rust-lang/rust#37939. I would imagine it matters less for Racer.

@kornelski
Copy link
Contributor Author

Oh wow. It does compile to slightly worse code indeed.

Fortunately in Racer there weren't any try!s in hot loops.

@nrc nrc merged commit ced9d5d into racer-rust:master May 9, 2018
@nrc
Copy link
Contributor

nrc commented May 9, 2018

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants