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

Compiler crashes if type includes self by value #8083

Closed
stepancheg opened this issue Jul 27, 2013 · 1 comment
Closed

Compiler crashes if type includes self by value #8083

stepancheg opened this issue Jul 27, 2013 · 1 comment

Comments

@stepancheg
Copy link
Contributor

pub struct DescriptorProto {
    nested_type: Option<DescriptorProto>,
}

fn foo() -> Option<DescriptorProto> {
    None
}

fn main() {}

Seems to crash with stack overflow. Should print nice message and gracefully shutdown.

@jdm
Copy link
Contributor

jdm commented Jul 27, 2013

Dup of #4363.

@jdm jdm closed this as completed Jul 27, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Apr 21, 2022
… r=giraffate

Take over: New lint bytes count to len

take over rust-lang#8375
close rust-lang#8083

This PR adds new lint about  considering replacing `.bytes().count()` with `.len()`.

Thank you in advance.

---

r! `@Manishearth`

changelog: adds new lint [`bytes_count_to_len`] to consider replacing `.bytes().count()` with `.len()`
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

2 participants