Skip to content

Add note about overriding the standard library #17400

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

Closed
wants to merge 1 commit into from

Conversation

ericfrederich
Copy link

This one threw me for a loop while following the guide and trying to learn the language.

This one threw me for a loop while following the guide and trying to learn the language.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

@aturon
Copy link
Member

aturon commented Sep 20, 2014

Thanks! This looks fine to me, but I'd like @steveklabnik to weigh in as well before merging it.

@ericfrederich
Copy link
Author

no clue why this would have caused a build error... it is just documentation

@steveklabnik
Copy link
Member

Don't worry about the build error, it's not a big deal.

I'm curious, since I already mention this is provided by Rust, maybe this paragraph should go with that sentence, above? Also, we try not to use 'here' for link text.

@aturon
Copy link
Member

aturon commented Oct 15, 2014

This has been sitting idle for a while. @ericfrederich, can you respond to @steveklabnik's questions?

@aturon
Copy link
Member

aturon commented Oct 17, 2014

Closing for now due to inactivity, but feel free to open with a rebase and response to @steveklabnik's concerns.

@aturon aturon closed this Oct 17, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Jul 11, 2024
feat: add bool_to_enum assist for parameters

## Summary

This PR adds parameter support for `bool_to_enum` assists. Essentially, the assist can now transform this:

```rs
fn function($0foo: bool) {
    if foo {
        println!("foo");
    }
}
```

To this,

```rs
#[derive(PartialEq, Eq)]
enum Bool { True, False }

fn function(foo: Bool) {
    if foo == Bool::True {
        println!("foo");
    }
}
```

Thanks to `@/davidbarsky`  for the test skeleton (:

Closes rust-lang#17400
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.

4 participants