about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-04-22Remove double trailing newlinesvarkor-1/+0
2019-04-21Enable migrate mode by default on the 2015 editionMatthew Jasper-3/+1
This also fully stabilizes two-phase borrows on all editions
2019-04-21Introduce `ArgSource` for diagnostics.David Wood-6/+35
This commit introduces an `ArgSource` enum that is lowered into the HIR so that diagnostics can correctly refer to the argument pattern's original name rather than the generated pattern.
2019-04-21Do not specify type in generated let bindings.David Wood-6/+7
This avoids issues with `impl_trait_in_bindings` as the type from the argument is normally used as the let binding, but `impl Trait` is unstable in binding position.
2019-04-21Add `AsyncArgument` to AST.David Wood-26/+129
This commit adds an `AsyncArgument` struct to the AST that contains the generated argument and statement that will be used in HIR lowering, name resolution and def collection.
2019-04-21Auto merge of #60124 - petrochenkov:stanomut, r=eddybbors-5/+4
Remove mutability from `Def::Static` Querify `TyCtxt::is_static`. Use `Mutability` instead of bool in foreign statics in AST/HIR. cc https://github.com/rust-lang/rust/pull/60110 r? @eddyb
2019-04-21AST/HIR: Use `Mutability` instead of bool in foreign staticsVadim Petrochenkov-5/+4
2019-04-21Auto merge of #60119 - estebank:bad-recovery, r=davidtwcobors-1/+1
Remove assumption from recovery code Fix #60115.
2019-04-21Introduce `LocalSource` into the AST.David Wood-2/+25
This will be used to keep track of the origin of a local in the AST. In particular, it will be used by `async fn` lowering for the locals in `let <pat>: <ty> = __arg0;` statements.
2019-04-21Auto merge of #60132 - davidtwco:issue-60075, r=estebankbors-1/+6
Fix fn front matter parsing ICE from invalid code. Fixes #60075. This PR fixes an "unreachable code" ICE that results from parsing invalid code where the compiler is expecting the next trait item declaration in the middle of the previous trait item due to extra closing braces. r? @estebank (thanks for the minimized test case)
2019-04-20Check async in trait methodsvarkor-0/+3
2019-04-20Fix additional variadic typosvarkor-1/+1
2019-04-20Fix typo in variadic C function warningvarkor-1/+1
2019-04-20Feature gate async fn methodsvarkor-19/+23
2019-04-20Auto merge of #59700 - matklad:simplify, r=eddybbors-17/+5
Simplify doc comment lexing is_doc_comment function checks the first four chars, but this is redundant, `doc_comment` local var has the same info.
2019-04-20Fix fn front matter parsing ICE from invalid code.David Wood-1/+6
This commit fixes an "unreachable code" ICE that results from parsing invalid code where the compiler is expecting the next trait item declaration in the middle of the previous trait item due to extra closing braces.
2019-04-19Remove assumption from recovery codeEsteban Küber-1/+1
2019-04-19Some cleanup to `maybe_parse_struct_expr`Vadim Petrochenkov-18/+13
2019-04-19remove duplicated code and simplify logicEsteban Küber-30/+31
2019-04-19Identify missing ambiguous case with best effort suggestionEsteban Küber-4/+4
2019-04-19Emit specific error for struct literal in conditionsEsteban Küber-5/+52
2019-04-19Rollup merge of #60060 - mtak-:rtm-x86-feature, r=petrochenkovMazdak Farrokhzad-0/+1
whitelist RTM x86 target cpu feature This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](https://github.com/rust-lang/rust/pull/57999) feature. https://github.com/rust-lang-nursery/stdsimd/issues/718
2019-04-18Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkovbors-1/+1
Rename files about error codes fixes #60017 This PR will be failed in tidy. <details> <summary>The log is here:</summary> ``` tidy check tidy error: duplicate error code: 411 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83: __diagnostic_used!(E0411); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84: err.code(DiagnosticId::Error("E0411".to_owned())); tidy error: duplicate error code: 424 tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90: debug!("smart_resolve_path_fragment: E0424, source={:?}", source); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92: __diagnostic_used!(E0424); tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93: err.code(DiagnosticId::Error("E0424".to_owned())); some tidy checks failed ``` </details> I'd like to fix this but I don't know what to do. I will work on later. Please let me know if you have any solutions. r? @petrochenkov
2019-04-17whitelist rtm x86 cpu featuretyler-0/+1
2019-04-18Rename moduleYuki OKUSHI-1/+1
2019-04-18Rename diagnositc_list into error_codesYuki OKUSHI-0/+0
2019-04-17Auto merge of #60034 - rasendubi:fix-comments, r=Centrilbors-1/+1
Small comments fix - Fix comments around test harness generation - Promote regular comments to rustdoc comments
2019-04-17Fix comments around test harness generationAlexey Shmalko-1/+1
2019-04-17Rollup merge of #59128 - oli-obk:colorful_json, r=mark-i-m,eddybMazdak Farrokhzad-11/+22
Emit ansi color codes in the `rendered` field of json diagnostics cc @ljedrz Implemented for https://github.com/rust-lang/rust/pull/56595#issuecomment-447645115 (x.py clippy)
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-15Preallocate BUILTIN_ATTRIBUTES symbols and use a hash map instead of loopingJohn Kåre Alsaker-392/+494
2019-04-15Ensure the symbols are pure stringsJohn Kåre Alsaker-1/+7
2019-04-15Make check_name genericJohn Kåre Alsaker-36/+24
2019-04-15Use a proc macro to declare preallocated symbolsJohn Kåre Alsaker-14/+41
2019-04-14Auto merge of #59693 - nnethercote:64-bit-Spans, r=petrochenkovbors-1/+1
Increase `Span` from 4 bytes to 8 bytes. This increases the size of some important types, such as `ast::Expr` and `mir::Statement`. However, it drastically reduces how much the interner is used, and the fields are more natural sizes that don't require bit operations to extract. As a result, instruction counts drop across a range of workloads, by as much as 10% for `script-servo` incremental builds. Peak memory usage goes up a little for some cases, but down by more for some other cases -- as much as 18% for non-incremental builds of `packed-simd`. The commit also: - removes the `repr(packed)`, because it has negligible effect, but can cause undefined behaviour; - replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.) with derived ones. r? @petrochenkov
2019-04-14Rollup merge of #59858 - mark-i-m:dup-matcher-bindings-3, r=CentrilMazdak Farrokhzad-14/+4
Make duplicate matcher bindings a hard error r? @Centril Closes #57742
2019-04-14Rollup merge of #59735 - matklad:deadcode, r=sanxiynMazdak Farrokhzad-15/+5
remove lookup_char_pos_adj It is now exactly equivalent to lookup_char_pos.
2019-04-12Rollup merge of #59866 - estebank:recover-missing-semi, r=petrochenkovMazdak Farrokhzad-0/+26
Recover from missing semicolon based on the found token When encountering one of a few keywords when a semicolon was expected, suggest the semicolon and recover: ``` error: expected one of `.`, `;`, `?`, or an operator, found `let` --> $DIR/recover-missing-semi.rs:4:5 | LL | let _: usize = () | - help: missing semicolon here LL | LL | let _ = 3; | ^^^ error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:2:20 | LL | let _: usize = () | ^^ expected usize, found () | = note: expected type `usize` found type `()` ```
2019-04-12Rollup merge of #59862 - estebank:tweak-unstable-diag, r=petrochenkovMazdak Farrokhzad-36/+55
Tweak unstable diagnostic output
2019-04-12Rollup merge of #59847 - Kampfkarren:try-block-catch, r=estebankMazdak Farrokhzad-1/+9
Error when using `catch` after `try` Part of https://github.com/rust-lang/rust/issues/31436
2019-04-11Auto merge of #59227 - Zoxc:fix-get, r=eddybbors-10/+12
Fix lifetime on LocalInternedString::get function cc @eddyb @nnethercote
2019-04-11review commentsEsteban Küber-16/+15
2019-04-11Reword tracking issue noteEsteban Küber-2/+5
2019-04-10make duplicate matcher bindings a hard errorMark Mansi-14/+4
2019-04-10FeedbackKampfkarren-1/+2
2019-04-10Tweak unstable diagnostic outputEsteban Küber-36/+52
2019-04-10Recover from missing semicolon based on the found tokenEsteban Küber-0/+27
When encountering one of a few keywords when a semicolon was expected, suggest the semicolon and recover: ``` error: expected one of `.`, `;`, `?`, or an operator, found `let` --> $DIR/recover-missing-semi.rs:4:5 | LL | let _: usize = () | - help: missing semicolon here LL | LL | let _ = 3; | ^^^ error[E0308]: mismatched types --> $DIR/recover-missing-semi.rs:2:20 | LL | let _: usize = () | ^^ expected usize, found () | = note: expected type `usize` found type `()` ```
2019-04-10Adhere to tidy scriptKampfkarren-1/+2
2019-04-10Special error when using catch after tryKampfkarren-1/+7
2019-04-05remove lookup_char_pos_adjAleksey Kladov-15/+5
It is now exactly equivalent to lookup_char_pos.