about summary refs log tree commit diff
path: root/src/libsyntax/test.rs
AgeCommit message (Collapse)AuthorLines
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-1/+0
2018-02-24Rollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=eddybManish Goregaokar-45/+146
Termination trait in tests Support the `Termination` trait in unit tests (cc https://github.com/rust-lang/rust/issues/43301) Also, a drive-by fix for #47075. This is joint work with @bkchr.
2018-02-22handle `#[bench]` functions betterNiko Matsakis-19/+43
2018-02-22put the "unit test" logic into libtestNiko Matsakis-36/+24
Also make `std::termination` module public and rename feature. The lib feature needs a different name from the language feature.
2018-02-22begin crate-relative paths with `crate`Niko Matsakis-3/+6
2018-02-22support unit tests with return values that implement `Terminaton`Niko Matsakis-42/+128
Extend `Termination` trait with a method to determine what happens with a unit test. This commit incorporates work by Bastian Köcher <git@kchr.de>.
2018-02-18Change ast::Visibility to Spanned typeSeiichi Uchida-9/+9
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-1/+1
errors
2017-12-28Prefer to use attr::contains_name() and attr::find_by_name()Seiichi Uchida-3/+3
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-1/+4
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-17syntax: Rename `P::unwrap` into `P::into_inner`Vadim Petrochenkov-1/+1
2017-12-09Use hygiene to access the injected crate (`core` or `std`) from builtin macros.Jeffrey Seyfried-2/+1
2017-11-30Implement RFC 2128 (use_nested_groups)Pietro Albini-6/+10
This commit adds support for nested groups inside `use` declarations, such as `use foo::{bar, sub::{baz::Foo, *}};`.
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`