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

Allow for integral suffixes after a char literal #9302

Closed
wants to merge 1 commit into from

Conversation

lilyball
Copy link
Contributor

This way you can say 'a'u8 instead of ('a' as u8).

This way you can say 'a'u8 instead of ('a' as u8).
@thestinger
Copy link
Contributor

This is a language change, and I don't agree with the syntax used here. I think this needs to go through the RFC process.

@lilyball
Copy link
Contributor Author

@thestinger Fair enough. What's the RFC process?

FWIW, this was motivated by an IRC conversation 2 days ago where @pcwalton expressed support for 'a'u8.

@thestinger
Copy link
Contributor

Usually you would open an issue with RFC in the title (and it would be tagged as an RFC) but in this case #4334 is open about adding byte string/character literals. The syntax hasn't been agreed upon yet though.

@thestinger
Copy link
Contributor

Closing for now, for it to be hashed out in the RFC issue.

@thestinger thestinger closed this Sep 18, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 11, 2022
Move `significant_drop_in_scrutinee` into `nursey`

The current suggestion of extending the lifetime of every sub-expression is not great and doesn't fix the error given in the lint's example, though it does make the potential deadlock easier to see, but it can also cause it's own issues by delaying the drop of the lock guard.

e.g.
```rust
match x.lock().foo {
    ..
}
// some stuff
let y = x.lock();
```
The suggestion would create a deadlock at the second `x.lock()` call.

This also lints even when a significant drop type isn't created as a temporary. (rust-lang#9072)

I agree `@kpreid` (rust-lang/rust-clippy#8987 (comment)) that this should be back-ported before the lint hits stable.

changelog: Move `significant_drop_in_scrutinee` into `nursey`
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