about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2019-04-29Auto merge of #60182 - matklad:lexer-cleanup, r=petrochenkovbors-6/+4
Lexer cleanup another couple of tiny cleanups
2019-04-28Auto merge of #60352 - Centril:const-incomplete-features, r=oli-obkbors-6/+9
Float 'incomplete_features' out to a const for visibility Float `let incomplete_features` out to a `const INCOMPLETE_FEATURES` and colocate near `active` features so that it is easier to find and edit. r? @oli-obk (use rollup)
2019-04-28Float 'incomplete_features' out to a const for visibility.Mazdak Farrokhzad-6/+9
2019-04-27Document ast::ExprKind::Type.Mazdak Farrokhzad-0/+1
2019-04-26Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasperbors-0/+4
Add a tidy check for files with over 3,000 lines Files with a large number of lines can cause issues in GitHub (e.g. https://github.com/rust-lang/rust/issues/60015) and also tend to be indicative of opportunities to refactor into less monolithic structures. This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in https://github.com/rust-lang/rust/issues/60015#issuecomment-483868594. (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with `// ignore-tidy-filelength`. Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in https://github.com/rust-lang/rust/issues/60015).
2019-04-26Rollup merge of #60289 - tmandry:allow-features-include-std, r=cramertjMazdak Farrokhzad-17/+17
Make `-Z allow-features` work for stdlib features r? @cramertj
2019-04-26Rollup merge of #60267 - gnzlbg:f16c_target_feature, r=alexcrichtonMazdak Farrokhzad-0/+1
Add feature-gate for f16c target feature r? @alexcrichton
2019-04-25Make `-Z allow-features` work for stdlib featuresTyler Mandry-17/+17
2019-04-25ignore-tidy-filelength on all files with greater than 3000 linesvarkor-0/+4
2019-04-25Add feature-gate for f16c target featuregnzlbg-0/+1
2019-04-24Add guard for missing comma in macro call suggestionEsteban Küber-2/+4
2019-04-24Rollup merge of #60186 - estebank:accept-suffix, r=nikomatsakisMazdak Farrokhzad-3/+31
Temporarily accept [i|u][32|size] suffixes on a tuple index and warn Fix #60138. #59553 will need to be kept open to track the change back to rejecting this code a few versions down thee line.
2019-04-23Add rustc_allow_const_fn_ptrTaylor Cramer-4/+14
2019-04-23review comment: change linked ticketEsteban Küber-1/+1
2019-04-23Rollup merge of #59823 - davidtwco:issue-54716, r=cramertjMazdak Farrokhzad-34/+190
[wg-async-await] Drop `async fn` arguments in async block Fixes #54716. This PR modifies the HIR lowering (and some other places to make this work) so that unused arguments to a async function are always dropped inside the async move block and not at the end of the function body. ``` async fn foo(<pattern>: <type>) { async move { } } // <-- dropped as you "exit" the fn // ...becomes... fn foo(__arg0: <ty>) { async move { let <pattern>: <ty> = __arg0; } // <-- dropped as you "exit" the async block } ``` However, the exact ordering of drops is not the same as a regular function, [as visible in this playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=be39af1a58e5d430be1eb3c722cb1ec3) - I believe this to be an unrelated issue. There is a [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-t-compiler.2Fwg-async-await/topic/.2354716.20drop.20order) for this. r? @cramertj cc @nikomatsakis
2019-04-22Temporarily accept [i|u][32|size] suffixes on a tuple index and warnEsteban Küber-3/+31
2019-04-23reduce visibilityAleksey Kladov-1/+1
2019-04-23simplify and avoid allocationAleksey Kladov-2/+2
2019-04-23remove obsolete and incorrect commentAleksey Kladov-3/+1
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