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

Why does our try_opt macro require &&? #172

Closed
nrc opened this issue Aug 14, 2015 · 2 comments
Closed

Why does our try_opt macro require &&? #172

nrc opened this issue Aug 14, 2015 · 2 comments

Comments

@nrc
Copy link
Member

nrc commented Aug 14, 2015

If foo wants a &str and bar: Option<String>, I would expect foo(&try_opt!(bar) to work, but we need foo(&&try_opt!(bar). Which is odd looking.

@marcusklaas
Copy link
Contributor

It is odd! I noticed this as well, and I have no explanation for it.

@cassiersg
Copy link
Contributor

This is caused by rust-lang/rust#26978.

@nrc nrc closed this as completed Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants