about summary refs log tree commit diff
path: root/src/libsyntax/test.rs
AgeCommit message (Collapse)AuthorLines
2018-07-10Deny bare trait objects in in src/libsyntaxljedrz-2/+2
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+1
2018-06-23hygiene: Merge `NameAndSpan` into `ExpnInfo`Vadim Petrochenkov-8/+6
2018-06-21async await desugaring and testsTaylor Cramer-3/+9
2018-06-21Parse async fn header.Without Boats-21/+25
This is gated on edition 2018 & the `async_await` feature gate. The parser will accept `async fn` and `async unsafe fn` as fn items. Along the same lines as `const fn`, only `async unsafe fn` is permitted, not `unsafe async fn`.The parser will not accept `async` functions as trait methods. To do a little code clean up, four fields of the function type struct have been merged into the new `FnHeader` struct: constness, asyncness, unsafety, and ABI. Also, a small bug in HIR printing is fixed: it previously printed `const unsafe fn` as `unsafe const fn`, which is grammatically incorrect.
2018-06-20Remove methods from ast::GenericParam and ast::Genericsvarkor-1/+1
2018-06-14create multiple HIR items for a use statementQuietMisdreavus-2/+2
2018-06-06append unused variables with _dylan_DPC-3/+3
2018-06-05remove redundant match branchdylan_DPC-1/+0
2018-06-02Stabilize unit tests with non-`()` return typedylan_DPC-31/+7
2018-05-26Add `Ident::as_str` helperVadim Petrochenkov-1/+1
2018-05-17Add edition to expansion infoVadim Petrochenkov-1/+2
2018-04-26Fixed tidy errors.Irina Popa-1/+3
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-04-23Don't allow #[should_panic] with non-() testsRussell Cohen-27/+40
2018-04-06Use `Ident` instead of `Name` in `MetaItem`Vadim Petrochenkov-4/+4
2018-04-06Remove more duplicated spansVadim Petrochenkov-1/+1
2018-03-27Auto merge of #49279 - varkor:generated-closure-return-type, r=alexcrichtonbors-1/+1
Fix implicit closure return type generation for libsyntax The `lambda` function for constructing closures in libsyntax was explicitly setting the return type to `_`, which resulted in incorrect corresponding syntax (as `|| -> _ x` is not valid, without the enclosing brackets). This meant the generated code, when printed, was invalid. I also took the opportunity to slightly improve the generated code for the `RustcEncodable::encode` method for unit structs. Fixes #42213.
2018-03-25Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakiskennytm-4/+4
Stabilize termination_trait, split out termination_trait_test For #48453. First time contribution, so I'd really appreciate any feedback on how this PR can be better. Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-22Use FunctionRetTy::Default rather than an explicit TyKind::Infer for ↵varkor-1/+1
lambda-building This prevents explicit `-> _` return type annotations for closures generated by `lambda`.
2018-03-22Rollup merge of #49117 - nivkner:fixme_fixup3, r=estebankkennytm-7/+14
address some FIXME whose associated issues were marked as closed part of #44366
2018-03-19Split out termination_trait_test feature gateTyler Mandry-4/+4
2018-03-17AST: Make renames in imports closer to the sourceVadim Petrochenkov-6/+7
Fix `unused_import_braces` lint false positive on `use prefix::{self as rename}`
2018-03-17remove FIXME(#2543) and avoid bad copiesNiv Kaminer-7/+14
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