about summary refs log tree commit diff
path: root/src/librustc_passes
AgeCommit message (Collapse)AuthorLines
2016-08-30update E0265 to new formatMikhail Modin-6/+8
2016-08-27Change Constness to Spanned<Constness>Keith Yeung-7/+10
2016-08-27Move E0379 check from typeck to ast validationKeith Yeung-0/+28
2016-08-27rustc: pass ty::Region behind an interned 'tcx reference.Eduard Burtescu-2/+2
2016-08-17Rollup merge of #35415 - silenuss:e0030-formatting, r=jonathandturnerJonathan Turner-4/+4
Update compiler error 0030 to use new error format. Part of #35233, Addresses #35204 r? @jonathandturner
2016-08-16Auto merge of #35617 - jseyfried:fix_unused_cfg_attr_path, r=eddybbors-0/+5
Fix incorrect unused import warnings on `cfg_attr`ed `path` attributes Fixes #35584. r? @eddyb
2016-08-16Auto merge of #35162 - canndrew:bang_type_coerced, r=nikomatsakisbors-0/+1
Implement the `!` type This implements the never type (`!`) and hides it behind the feature gate `#[feature(never_type)]`. With the feature gate off, things should build as normal (although some error messages may be different). With the gate on, `!` is usable as a type and diverging type variables (ie. types that are unconstrained by anything in the code) will default to `!` instead of `()`.
2016-08-15Update compiler error 0030 to use new error format.silenuss-4/+4
2016-08-14Rollup merge of #35586 - shyaamsundhar:SqushCom, r=jonathandturnerEduard-Mihai Burtescu-2/+6
E0248, E0267 & E0268 Change into issue format r? @jonathandturner Part of #35391, #35519 and #35520. I have squashed all changes into a single commit. Please review the changes. E0248 Change in issue format E0267 UT New Format E0268 UT New Format E0267 & E0268 New Error Format
2016-08-13Allow attributes to be marked used before `cfg` proccessing.Jeffrey Seyfried-0/+5
2016-08-13Rename empty/bang to neverAndrew Cann-1/+1
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Add EmptyToAny adjustmentAndrew Cann-0/+1
2016-08-13Remove restrictions from tuple structs/variantsVadim Petrochenkov-21/+0
Hard errors are turned into feature gates
2016-08-12rustc: rename ProjectionMode and its variant to be more memorable.Eduard Burtescu-4/+4
2016-08-10Update error format for E0130trixnz-0/+1
2016-08-10E0248 Change in issue formatShyamSundarB-2/+6
E0248 Change in issue format E0267 UT New Format E0268 UT New Format E0267 & E0268 New Error Format
2016-08-06Rollup merge of #35363 - GuillaumeGomez:err_codes, r=jonathandturnerEduard-Mihai Burtescu-4/+4
Err codes r? @jonathandturner
2016-08-05Add new error code testsGuillaume Gomez-4/+4
2016-08-04run rustfmt on librustc_passes folderSrinivas Reddy Thatiparthy-173/+200
2016-08-03Properly enforce the "patterns aren't allowed in foreign functions" checkVadim Petrochenkov-6/+37
Apply the same check to function pointer types
2016-08-03Move the E0130 check to AST validation passVadim Petrochenkov-0/+50
2016-07-29intravisit: Fold functionality of IdVisitor into the regular Visitor.Michael Woerister-2/+2
2016-07-22refactor constant evaluation error reportingAriel Ben-Yehuda-22/+10
Refactor constant evaluation to use a single error reporting function that reports a type-error-like message. Also, unify all error codes with the "constant evaluation error" message to just E0080, and similarly for a few other duplicate codes. The old situation was a total mess, and now that we have *something* we can further iterate on the UX.
2016-06-26Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddybJeffrey Seyfried-1/+1
Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
2016-06-26Rollup merge of #33943 - jseyfried:libsyntax_cleanup, r=nrcJeffrey Seyfried-2/+2
Miscellaneous low priority cleanup in `libsyntax`.
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-6/+10
2016-06-17Rename `ast::ExprKind::Again` -> `ast::ExprKind::Continue`Jeffrey Seyfried-1/+1
2016-06-14Remove the type parameter from `syntax::visit::Visitor`Jeffrey Seyfried-2/+2
2016-06-10Address review comments + fix rebaseVadim Petrochenkov-1/+2
2016-06-10Introduce TyCtxt::expect_def/expect_resolution helpers and use them where ↵Vadim Petrochenkov-13/+10
possible
2016-06-01Auto merge of #33794 - petrochenkov:sanity, r=nrcbors-0/+212
Add AST validation pass and move some checks to it The purpose of this pass is to catch constructions that fit into AST data structures, but not permitted by the language. As an example, `impl`s don't have visibilities, but for convenience and uniformity with other items they are represented with a structure `Item` which has `Visibility` field. This pass is intended to run after expansion of macros and syntax extensions (and before lowering to HIR), so it can catch erroneous constructions that were generated by them. This pass allows to remove ad hoc semantic checks from the parser, which can be overruled by syntax extensions and occasionally macros. The checks can be put here if they are simple, local, don't require results of any complex analysis like name resolution or type checking and maybe don't logically fall into other passes. I expect most of errors generated by this pass to be non-fatal and allowing the compilation to proceed. I intend to move some more checks to this pass later and maybe extend it with new checks, like, for example, identifier validity. Given that syntax extensions are going to be stabilized in the measurable future, it's important that they would not be able to subvert usual language rules. In this patch I've added two new checks - a check for labels named `'static` and a check for lifetimes and labels named `'_`. The first one gives a hard error, the second one - a future compatibility warning. Fixes https://github.com/rust-lang/rust/issues/33059 ([breaking-change]) cc https://github.com/rust-lang/rfcs/pull/1177 r? @nrc
2016-05-29Improve E0161 error explanationGuillaume Gomez-1/+26
2016-05-28sanity -> validationVadim Petrochenkov-9/+7
Add test for `::super` in import prefix
2016-05-28Move some other checks to AST sanity passVadim Petrochenkov-1/+135
2016-05-28Add an AST sanity checking pass and use it to catch some illegal ↵Vadim Petrochenkov-0/+80
lifetime/label names
2016-05-11rustc: Split local type contexts interners from the global one.Eduard Burtescu-17/+16
2016-05-11rustc: Remove a redundant lifetime parameter from ExprUseVisitor.Eduard Burtescu-2/+2
2016-05-11rustc: Wrap users of InferCtxt in an anonymous scope.Eduard Burtescu-13/+13
2016-05-11rustc: Remove the TyCtxt field from ParameterEnvironment.Eduard Burtescu-2/+2
2016-05-11rustc: Split 'tcx into 'gcx and 'tcx for InferCtxt and its users.Eduard Burtescu-6/+6
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-5/+5
2016-05-11infer: Use methods for creating an InferCtxt.Eduard Burtescu-10/+7
2016-05-07mir: qualify and promote constants.Eduard Burtescu-769/+9
2016-05-03change the newly-added errors to warningsAriel Ben-Yehuda-0/+3
this commit should be reverted after a release cycle
2016-05-02replace fileline_{help,note} with {help,note}Niko Matsakis-2/+1
The extra filename and line was mainly there to keep the indentation relative to the main snippet; now that this doesn't include filename/line-number as a prefix, it is distracted.
2016-04-27update Cargo.toml for rustbuildOliver Schneider-0/+1
2016-04-26don't demote expressions just because const_eval failsOliver Schneider-1/+0
this might introduce subtle bugs to code generation
2016-04-26skip non-const-path errors for nowOliver Schneider-1/+4
Associated constants aren't implemented fully in early const eval
2016-04-26don't report bitshift overflow twiceOliver Schneider-1/+5
2016-04-26const_err lint all constant expressionsOliver Schneider-25/+20