-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Implement new literal type Err
#57651
Conversation
Hmm, the test failed. I'll fix it. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to modify
@estebank I posted some WIP commits, please review. |
This comment has been minimized.
This comment has been minimized.
src/libsyntax/parse/lexer/mod.rs
Outdated
String::from("character literal may only contain one codepoint")).raise(); | ||
self.err_span_(start_with_quote, pos, | ||
"character literal may only contain one codepoint"); | ||
self.bump(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bump
also looks suspect. I'm trying a change locally, but I believe there's a high likelihood that removing this self.bump()
will fix the problem with let x = 'asdf //~^ ERROR '
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, upon further review, just revert this one change and let's fatally fail on this case. The code is beyond meaninful recovery at this point. We'll keep the current behavior for unterminated char
literals, but recover in all other cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnTitor I believe that with these changes we'll be as close as we can get quickly to the "ideal" output:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm grateful for your support! Following your commit, I added some commits.
@bors r+ |
📌 Commit 4005d3a has been approved by |
☀️ Test successful - checks-travis, status-appveyor |
Changes: ```` Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang#57651 Run rustfmt Fixed breakage due to rust-lang#57489 Fix breakage due to rust-lang#57755 Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup rust-lang#57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ````
* master: (58 commits) Rustfmt all the things Don't make decisions on values that don't represent the decision Improving comments. Rustup Added rustfix to the test. Improve span shortening. Added "make_return" and "blockify" convenience methods in Sugg and used them in "needless_bool". Actually check for constants. Fixed potential mistakes with nesting. Added tests. formatting fix Update clippy_lints/src/needless_bool.rs formatting fix Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang/rust#57651 needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement Fix automatic suggestion on `use_self`. Remove negative integer literal checks. Fix `implicit_return` false positives. Run rustfmt Fixed breakage due to rust-lang/rust#57489 ...
Changes: ```` Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang#57651 Run rustfmt Fixed breakage due to rust-lang#57489 Fix breakage due to rust-lang#57755 Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup rust-lang#57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ````
Changes: ```` Fixing typo in CONTRIBUTING.md Fix breakage due to rust-lang/rust#57651 Run rustfmt Fixed breakage due to rust-lang/rust#57489 Fix breakage due to rust-lang/rust#57755 Catch up with `format_args` change Fix bad `while_let_on_iterator` suggestion. rustup rust-lang/rust#57747 Fixing issues pointed out by dogfood tests. Update to collect all the files then throw the error. Adding a test for checking if test files are missing. Remove bors.toml add applicability to lint name suggestion ````
Fixes #57384
I removed
return Ok
, otherwise, two errors occur. Any solutions?r? @estebank