summary refs log tree commit diff
path: root/src/libsyntax/test.rs
AgeCommit message (Collapse)AuthorLines
2016-07-17Auto merge of #34789 - jonathandturner:simplify_liberror, r=alexcrichtonbors-1/+1
Simplify librustc_errors This is part 2 of the error crate refactor, starting with #34403. In this refactor, I focused on slimming down the error crate to fewer moving parts. As such, I've removed quite a few parts and replaced the with simpler, straight-line code. Specifically, this PR: * Removes BasicEmitter * Remove emit from emitter, leaving emit_struct * Renames emit_struct to emit * Removes CoreEmitter and focuses on a single Emitter * Implements the latest changes to error format RFC (#1644) * Removes (now-unused) code in emitter.rs and snippet.rs * Moves more tests to the UI tester, removing some duplicate tests in the process There is probably more that could be done with some additional refactoring, but this felt like it was getting to a good state. r? @alexcrichton cc: @Manishearth (as there may be breaking changes in stuff I removed/changed)
2016-07-14Implement latest rfc style using simpler renderingJonathan Turner-1/+1
2016-07-14Implement `macro_rules!` placeholders and the macro scope mapJeffrey Seyfried-0/+4
2016-06-26Rollup merge of #34436 - jseyfried:no_block_expr, r=eddybJeffrey Seyfried-1/+1
To allow these braced macro invocation, this PR removes the optional expression from `ast::Block` and instead uses a `StmtKind::Expr` at the end of the statement list. Currently, braced macro invocations in blocks can expand into statements (and items) except when they are last in a block, in which case they can only expand into expressions. For example, ```rust macro_rules! make_stmt { () => { let x = 0; } } fn f() { make_stmt! {} //< This is OK... let x = 0; //< ... unless this line is commented out. } ``` Fixes #34418.
2016-06-26Rollup merge of #34339 - jseyfried:thin_vec, r=petrochenkov,ManishearthJeffrey Seyfried-2/+2
Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`.
2016-06-23Refactor away duplicate method `ecx.block_all()`Jeffrey Seyfried-1/+1
2016-06-23Remove field `expr` of `ast::Block`Jeffrey Seyfried-1/+1
2016-06-23Move test helper functions to consolidated codemap testingJonathan Turner-63/+0
2016-06-23Actually consolidate the CodeMap testsJonathan Turner-517/+0
2016-06-23Consolidate codemap tests and fix more errors for travisJonathan Turner-2/+586
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-2/+2
2016-06-19Generalize and abstract `ThinAttributes`Jeffrey Seyfried-2/+2
2016-06-16Simplify gated cfg checkingJeffrey Seyfried-2/+0
2016-06-11Strip `#[test]` nodes during `cfg` processing on non-test builds.Jeffrey Seyfried-14/+1
2016-06-09Load macros from `extern crate`s during expansion.Jeffrey Seyfried-2/+4
2016-05-28Auto merge of #33821 - sanxiyn:cfg-test, r=nikomatsakisbors-11/+3
Do not inject test harness for --cfg test Fix #33670.
2016-05-27Process `cfg_attr` attributes on non-optional expressionsJeffrey Seyfried-7/+2
2016-05-26Implement `CfgFolder` directly instead of passing a closure to `strip_items`Jeffrey Seyfried-7/+15
2016-05-24Remove unused field and argumentSeo Sanghyeon-6/+2
2016-05-24Do not inject test harness for --cfg testSeo Sanghyeon-5/+1
2016-04-24syntax: Merge keywords and remaining special idents in one listVadim Petrochenkov-6/+6
Simplify the macro used for generation of keywords Make `Keyword::ident` private
2016-04-24syntax: Make static/super/self/Self keywords + special ident cleanupVadim Petrochenkov-5/+5
2016-04-06syntax: dismantle ast_util.Eduard Burtescu-7/+9
2016-02-12Use more autoderef in libsyntaxJonas Schievink-6/+6
2016-02-11[breaking-change] don't glob export ast::Visibility variantsOliver 'ker' Schneider-9/+9
2016-02-11[breaking-change] don't glob export ast::Mutablity variantsOliver 'ker' Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::Item_ variantsOliver 'ker' Schneider-10/+10
2016-02-11[breaking-change] don't pub export ast::Ty_ variantsOliver Schneider-4/+4
2016-02-11[breaking-change] don't glob export ast::Expr_ variantsOliver Schneider-2/+2
2016-02-11[breaking-change] don't glob import/export syntax::abi enum variantsOliver Schneider-1/+1
2016-02-11[breaking-change] don't glob import ast::FunctionRetTy variantsOliver Schneider-4/+4
2015-12-18Rollup merge of #30420 - petrochenkov:owned2, r=nrcManish Goregaokar-1/+0
Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults. r? @nrc
2015-12-18Deprecate name `OwnedSlice` and don't use itVadim Petrochenkov-1/+0
2015-12-17move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*Nick Cameron-6/+6
Also split out emitters into their own module.
2015-12-14[breaking-change] move ast_util functions to methodsfaineance-1/+1
2015-11-26Some TLC for the MoveMap traitMarvin Löbel-1/+2
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-3/+6
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-11-17Fix match_ref_pats flagged by ClippySeo Sanghyeon-2/+2
2015-08-28Rollup merge of #28033 - Manishearth:compilerexpn, r=eddybManish Goregaokar-5/+3
We were using them for every expansion, instead of using `Name`. Also converted `CompilerExpansion` into an enum so its nicer to use and takes up less space. Will profile later, but this should be a small improvement in memory usage. r? @eddyb
2015-08-28Move ExpnInfo to NameManish Goregaokar-3/+3
2015-08-27Enumify CompilerExpansion in ExpnInfoManish Goregaokar-4/+2
2015-08-24Remove #[start] as well as #[main] in --testWilliam Throwe-9/+6
Fixes #11766.
2015-08-24Move main removal to its own pass in --test modeWilliam Throwe-39/+56
This handles the case where the #[main] function is buried deeper in the ast than we search for #[test] functions. I'm not sure why one would want to do that, but since it works in standard compilation it should also work for tests.
2015-08-24Mark main-like functions allow(dead_code) in testsWilliam Throwe-15/+34
Fixes #12327.
2015-08-17feature gate `cfg(target_feature)`.Huon Wilson-1/+3
This is theoretically a breaking change, but GitHub search turns up no uses of it, and most non-built-in cfg's are passed via cargo features, which look like `feature = "..."`, and hence can't overlap.
2015-08-04syntax: Don't assume `std` exists for testsAlex Crichton-14/+9
This commit removes the injection of `std::env::args()` from `--test` expanded code, relying on the test runner itself to call this funciton. This is more hygienic because we can't assume that `std` exists at the top layer all the time, and it meaks the injected test module entirely self contained.
2015-08-03syntax: Implement #![no_core]Alex Crichton-0/+1
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-1/+1
2015-05-21syntax: parse `const fn` for free functions and inherent methods.Eduard Burtescu-4/+6
2015-05-14syntax: replace sess.span_diagnostic.cm with sess.codemap().Eduard Burtescu-1/+1