-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Rustc crash #8759
Comments
Hi, thanks for the bug report! I think this can be worked around via: fn parse<'a>(pat: Pattern, text: &'a str, offset: uint) -> Option<Token<'a>> {
match pat {
Literal(s) => {
let slc = text.slice_from(offset);
// ... In any case, this is a dup of #6396. |
xFrednet
pushed a commit
to xFrednet/rust
that referenced
this issue
May 21, 2022
Address `unnecessary_to_owned` false positive My proposed fix for rust-lang#8759 is to revise the conditions that delineate `redundant_clone` and `unnecessary_to_owned`: ```rust // Only flag cases satisfying at least one of the following three conditions: // * the referent and receiver types are distinct // * the referent/receiver type is a copyable array // * the method is `Cow::into_owned` // This restriction is to ensure there is no overlap between `redundant_clone` and this // lint. It also avoids the following false positive: // rust-lang/rust-clippy#8759 // Arrays are a bit of a corner case. Non-copyable arrays are handled by // `redundant_clone`, but copyable arrays are not. ``` This change causes a few cases that were previously flagged by `unnecessary_to_owned` to no longer be flagged. But one could argue those cases would be better handled by `redundant_clone`. Closes rust-lang#8759 changelog: none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The logged output it told me to post: http://pastebin.com/J9Bk6ntk
The file that caused it: http://pastebin.com/xFxR65Dn
The crash occurs in both 0.7 and git master. I'm running Arch Linux.
The text was updated successfully, but these errors were encountered: