Skip to content

Lints about new methods #654

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

Merged
merged 3 commits into from
Feb 13, 2016
Merged

Lints about new methods #654

merged 3 commits into from
Feb 13, 2016

Conversation

mcarton
Copy link
Member

@mcarton mcarton commented Feb 13, 2016

Fix #618.

Edit: hum, should we allow:

impl Foo {
    fn new(..) -> Result<Foo, Error> { .. }
}

too?

@llogiq
Copy link
Contributor

llogiq commented Feb 13, 2016

Yeah, we probably should allow Result<Self, _>.

@mcarton
Copy link
Member Author

mcarton commented Feb 13, 2016

Yup, there are some examples in rustc (eg. term::terminfo::TerminfoTerminal::new(out: T) -> Option<TerminfoTerminal<T>>). I’ll do that tomorrow.

@llogiq
Copy link
Contributor

llogiq commented Feb 13, 2016

Nice.

llogiq added a commit that referenced this pull request Feb 13, 2016
Lints about `new` methods
@llogiq llogiq merged commit 5521a75 into rust-lang:master Feb 13, 2016
@llogiq
Copy link
Contributor

llogiq commented Feb 13, 2016

Good stuff. 👍

@mcarton mcarton deleted the new branch February 13, 2016 21:20
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

Successfully merging this pull request may close these issues.

2 participants