about summary refs log tree commit diff
path: root/src/librustc_parse/lexer
AgeCommit message (Collapse)AuthorLines
2020-05-03Implement `confusable_idents` lint.Charles Lew-1/+2
2020-04-23Rollup merge of #70633 - kper:master, r=estebankDylan DPC-6/+35
Confusing suggestion on incorrect closing `}` Compiler returns ``` error: unexpected closing delimiter: `}` --> main.rs:20:1 | 9 | ErrorHandled::Reported => {} | -- this block is empty, you might have not meant to close it temp ... 20 | } | ^ unexpected closing delimiter error: aborting due to previous error ```
2020-04-04Run fmtKevin Per-31/+16
2020-04-04Drop `this` in error message to not reach 100 charactersKevin Per-1/+1
2020-04-04Show open and closed braces of last proper blockKevin Per-9/+39
2020-04-03Fixing testsKevin Per-1/+0
2020-04-02Check if the suggestion's `this block is empty...` span is in the last ↵Kevin Per-4/+19
properly closed block.
2020-04-01Rollup merge of #70522 - rcoh:60762-raw-string-errors, r=petrochenkovMazdak Farrokhzad-34/+59
Improve error messages for raw strings (#60762) This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested) Fixes #60762 cc @estebank who reviewed the original (abandoned) PR for the same ticket. r? @Centril
2020-04-01Revert "Dropping "block is empty..." error message on incorrect closing ↵Kevin Per-3/+7
delimiter #70583" This reverts commit 811d817eaf5d78522773ab9d21543629027e4ecb.
2020-03-31Dropping "block is empty..." error message on incorrect closing delimiter #70583Kevin Per-7/+3
2020-03-30remove obsolete commentTshepang Lekhonkhobe-3/+0
Made obsolete by b5e35b128efeed4bfdb4b1ee9d0697389ec9f164
2020-03-29Cleanup error messages, improve docstringsRussell Cohen-5/+4
2020-03-29Improve error messages for raw strings (#60762)Russell Cohen-34/+60
This diff improves error messages around raw strings in a few ways: - Catch extra trailing `#` in the parser. This can't be handled in the lexer because we could be in a macro that actually expects another # (see test) - Refactor & unify error handling in the lexer between ByteStrings and RawByteStrings - Detect potentially intended terminators (longest sequence of "#*" is suggested)
2020-03-22Rollup merge of #70254 - matthiaskrgr:cl4ppy, r=CentrilDylan DPC-8/+4
couple more clippy fixes (let_and_return, if_same_then_else) * summarize if-else-code with identical blocks (clippy::if_same_then_else) * don't create variable bindings just to return the bound value immediately (clippy::let_and_return)
2020-03-22don't create variable bindings just to return the bound value immediately ↵Matthias Krüger-8/+4
(clippy::let_and_return)
2020-03-20parse/lexer: support `StringReader::retokenize` called on external files.Eduard-Mihai Burtescu-4/+12
2020-03-04On mismatched delimiters, only point at empty blocks that are in the same lineEsteban Küber-1/+6
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-8/+8
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29Auto merge of #69260 - GuillaumeGomez:create-E0747-error-code, r=varkor,estebankbors-2/+6
Create E0747 error code for unterminated raw strings Reopening of #66035. r? @estebank
2020-02-28Add E0747 error codeGuillaume Gomez-2/+6
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-1/+1
2020-02-28Rollup merge of #69529 - matthiaskrgr:clippy_identity_conversion, ↵Dylan DPC-11/+6
r=Mark-Simulacrum don't use .into() to convert types into identical types. This removes redundant `.into()` calls. example: `let s: String = format!("hello").into();`
2020-02-27don't use .into() to convert types into identical types.Matthias Krüger-11/+6
example: let s: String = format!("hello").into();
2020-02-27use find(x) instead of filter(x).next()Matthias Krüger-5/+2
2020-02-11Invert control in struct_lint_level.jumbatm-1/+1
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-09Make issue references consistentMatthias Prechtl-2/+3
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-1/+1
2020-02-011. move node_id to syntaxMazdak Farrokhzad-1/+1
2. invert rustc_session & syntax deps 3. drop rustc_session dep in rustc_hir
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-2/+1
2020-01-03tweak wording of mismatched delimiter errorsAndy Russell-5/+5
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-6/+6
2019-12-31Inline and remove `nfc_symbol_from` method.Charles Lew-8/+1
2019-12-31Add symbol normalization for proc_macro_server.Charles Lew-8/+12
2019-12-26Normalize identifiers in librustc_parse.Charles Lew-2/+15
2019-12-22Format the worldMark Rousskov-170/+181
2019-12-05rustc_parser: cleanup importsMazdak Farrokhzad-13/+10
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-0/+1530
also move MACRO_ARGUMENTS -> librustc_parse