summary refs log tree commit diff
path: root/src/libsyntax/test.rs
AgeCommit message (Collapse)AuthorLines
2017-08-30Make fields of `Span` privateVadim Petrochenkov-1/+1
2017-08-25syntax: clarify field nameTamir Duberstein-10/+5
The value of this field is meant to indicate whether or not the crate is rustc's libtest itself - not whether or not it is a test crate generally.
2017-08-25syntax: remove unused fieldTamir Duberstein-2/+0
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-12/+12
Like #43008 (f668999), but _much more aggressive_.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-0/+1
2017-07-28syntax: Add `tokens: Option<TokenStream>` to ItemAlex Crichton-5/+11
This commit adds a new field to the `Item` AST node in libsyntax to optionally contain the original token stream that the item itself was parsed from. This is currently `None` everywhere but is intended for use later with procedural macros.
2017-07-06Remove unused code from librustc_errorsKevin Mehall-1/+0
2017-06-24add `allow_fail` test attributePaul Woolcock-3/+11
This change allows the user to add an `#[allow_fail]` attribute to tests that will cause the test to compile & run, but if the test fails it will not cause the entire test run to fail. The test output will show the failure, but in yellow instead of red, and also indicate that it was an allowed failure.
2017-05-30Turn sufficiently old compatibility lints into hard errorsVadim Petrochenkov-8/+0
2017-05-25Hygienize lifetimes.Jeffrey Seyfried-1/+1
2017-05-25Hygienize `librustc_resolve`.Jeffrey Seyfried-1/+1
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-11/+8
This is mostly removing stray ampersands, needless returns and lifetimes.
2017-05-05Add Options type in libtest and remove argumentGuillaume Gomez-2/+2
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-14/+7
2017-03-27Fix various useless derefs and slicingsOliver Schneider-1/+1
2017-03-10Give spans to individual path segments in ASTVadim Petrochenkov-1/+1
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-1/+2
2017-01-16Rename ExprKind::Vec to Array in HIR and HAIR.Scott Olson-1/+1
This is a clearer name since they represent [a, b, c] array literals.
2016-12-22Refactor how global paths are represented (for both ast and hir).Jeffrey Seyfried-1/+0
2016-12-19Optimize `ast::PathSegment`.Jeffrey Seyfried-4/+1
2016-11-28rustc: rework stability to be on-demand for type-directed lookup.Eduard Burtescu-3/+4
2016-11-21Use `Symbol` instead of `InternedString` in the AST, HIR, and various other ↵Jeffrey Seyfried-12/+12
places.
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-29/+33
2016-11-20Refactor `MetaItemKind` to use `Name`s instead of `InternedString`s.Jeffrey Seyfried-5/+5
2016-11-14Add warnings when the #[should_panic] attribute is invalidJosh Driver-7/+37
2016-10-31Changed most vec! invocations to use square bracesiirelu-1/+1
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-1/+1
2016-10-01Rollup merge of #36599 - ↵Manish Goregaokar-1/+1
jonas-schievink:whats-a-pirates-favorite-data-structure, r=pnkfelix Contains a syntax-[breaking-change] as a separate commit (cc #31645).nnAlso renames slice patterns from `PatKind::Vec` to `PatKind::Slice`.
2016-09-28Rollup merge of #36787 - jseyfried:fix_test_harness_reexport_errors, r=nrcJonathan Turner-1/+9
Avoid re-export errors in the generated test harness Fixes #36768. r? @nrc
2016-09-28libsyntax: clearer names for some AST partsJonas Schievink-1/+1
This applies the HIR changes from the previous commits to the AST, and is thus a syntax-[breaking-change] Renames `PatKind::Vec` to `PatKind::Slice`, since these are called slice patterns, not vec patterns. Renames `TyKind::Vec`, which represents the type `[T]`, to `TyKind::Slice`. Renames `TyKind::FixedLengthVec` to `TyKind::Array`.
2016-09-27Avoid re-export errors in the generated test harness.Jeffrey Seyfried-1/+9
2016-09-27With `--test`, make `#[test]` functions `pub` in `InvocationCollector`Jeffrey Seyfried-42/+27
and expand the `__test_reexports` in the correct scope.
2016-09-13Differentiate between monotonic and non-monotonic expansion andJeffrey Seyfried-2/+2
only assign node ids during monotonic expansion.
2016-09-13Expand generated test harnesses and macro registries.Jeffrey Seyfried-15/+15
2016-09-13Refactor `ExtCtxt` to use a `Resolver` instead of a `MacroLoader`.Jeffrey Seyfried-3/+3
2016-09-05Implement stackless expansion.Jeffrey Seyfried-5/+2
2016-08-28Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrcJeffrey Seyfried-1/+1
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28Rollup merge of #35850 - SergioBenitez:master, r=nrcJeffrey Seyfried-5/+4
Implement RFC#1559: allow all literals in attributes Implemented rust-lang/rfcs#1559, tracked by #34981.
2016-08-27Change Constness to Spanned<Constness>Keith Yeung-2/+2
2016-08-25Refactor away `AttrMetaMethods`.Jeffrey Seyfried-1/+1
2016-08-25Refactor away `AttrNestedMetaItemMethods`.Jeffrey Seyfried-1/+1
2016-08-25Implement RFC#1559: allow all literals in attributes.Sergio Benitez-5/+4
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