about summary refs log tree commit diff
path: root/src/libsyntax/test.rs
AgeCommit message (Collapse)AuthorLines
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
2015-04-05Work towards a non-panicing parser (libsyntax)Phil Dawes-1/+1
- Functions in parser.rs return PResult<> rather than panicing - Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour. - 'panictry!' macro added as scaffolding while converting panicing functions. (This does the same as 'unwrap()' but is easier to grep for and turn into try!()) - Leaves panicing wrappers for the following functions so that the quote_* macros behave the same: - parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt
2015-03-26syntax: Remove support for #[should_fail]Alex Crichton-11/+3
This attribute has been deprecated in favor of #[should_panic]. This also updates rustdoc to no longer accept the `should_fail` directive and instead renames it to `should_panic`.
2015-03-16Reviewer changesNick Cameron-3/+4
2015-03-16Fallout in testing.Nick Cameron-5/+12
2015-03-09Rename #[should_fail] to #[should_panic]Steven Fackler-14/+22
2015-03-06Add #[allow_internal_unstable] to track stability for macros better.Huon Wilson-2/+4
Unstable items used in a macro expansion will now always trigger stability warnings, *unless* the unstable items are directly inside a macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns unless the span of the unstable item is a subspan of the definition of a macro marked with that attribute. E.g. #[allow_internal_unstable] macro_rules! foo { ($e: expr) => {{ $e; unstable(); // no warning only_called_by_foo!(); }} } macro_rules! only_called_by_foo { () => { unstable() } // warning } foo!(unstable()) // warning The unstable inside `foo` is fine, due to the attribute. But the `unstable` inside `only_called_by_foo` is not, since that macro doesn't have the attribute, and the `unstable` passed into `foo` is also not fine since it isn't contained in the macro itself (that is, even though it is only used directly in the macro). In the process this makes the stability tracking much more precise, e.g. previously `println!("{}", unstable())` got no warning, but now it does. As such, this is a bug fix that may cause [breaking-change]s. The attribute is definitely feature gated, since it explicitly allows side-stepping the feature gating system.
2015-02-20Remove remaining uses of `[]`. This time I tried to use deref coercions ↵Niko Matsakis-5/+5
where possible.
2015-02-18Round 3 test fixes and conflictsAlex Crichton-1/+1
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-6/+6
2015-02-11rustc: Fix a number of stability lint holesAlex Crichton-17/+5
There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Additionally, the compiler now has special logic to ignore its own generated `__test` module for the `--test` harness in terms of stability. Closes #8962 Closes #16360 Closes #20327 [breaking-change]
2015-02-06Update to last version, remove "[]" as much as possibleGuillaumeGomez-1/+1
2015-02-06Libsyntax has been updatedGuillaumeGomez-4/+2
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-2/+4
2015-02-04remove all kind annotations from closuresJorge Aparicio-3/+3
2015-02-02Omit integer suffix when unnecessaryAlfie John-2/+2
See PR # 21378 for context