about summary refs log tree commit diff
path: root/src/test/compile-fail-fulldeps
AgeCommit message (Collapse)AuthorLines
2016-09-02rustc: Implement custom derive (macros 1.1)Alex Crichton-0/+700
This commit is an implementation of [RFC 1681] which adds support to the compiler for first-class user-define custom `#[derive]` modes with a far more stable API than plugins have today. [RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md The main features added by this commit are: * A new `rustc-macro` crate-type. This crate type represents one which will provide custom `derive` implementations and perhaps eventually flower into the implementation of macros 2.0 as well. * A new `rustc_macro` crate in the standard distribution. This crate will provide the runtime interface between macro crates and the compiler. The API here is particularly conservative right now but has quite a bit of room to expand into any manner of APIs required by macro authors. * The ability to load new derive modes through the `#[macro_use]` annotations on other crates. All support added here is gated behind the `rustc_macro` feature gate, both for the library support (the `rustc_macro` crate) as well as the language features. There are a few minor differences from the implementation outlined in the RFC, such as the `rustc_macro` crate being available as a dylib and all symbols are `dlsym`'d directly instead of having a shim compiled. These should only affect the implementation, however, not the public interface. This commit also ended up touching a lot of code related to `#[derive]`, making a few notable changes: * Recognized derive attributes are no longer desugared to `derive_Foo`. Wasn't sure how to keep this behavior and *not* expose it to custom derive. * Derive attributes no longer have access to unstable features by default, they have to opt in on a granular level. * The `derive(Copy,Clone)` optimization is now done through another "obscure attribute" which is just intended to ferry along in the compiler that such an optimization is possible. The `derive(PartialEq,Eq)` optimization was also updated to do something similar. --- One part of this PR which needs to be improved before stabilizing are the errors and exact interfaces here. The error messages are relatively poor quality and there are surprising spects of this such as `#[derive(PartialEq, Eq, MyTrait)]` not working by default. The custom attributes added by the compiler end up becoming unstable again when going through a custom impl. Hopefully though this is enough to start allowing experimentation on crates.io! syntax-[breaking-change]
2016-08-28Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrcJeffrey Seyfried-1/+0
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28Rollup merge of #35850 - SergioBenitez:master, r=nrcJeffrey Seyfried-8/+9
Implement RFC#1559: allow all literals in attributes Implemented rust-lang/rfcs#1559, tracked by #34981.
2016-08-26Update E0453 to new error formatMohit Agarwal-2/+4
Fixes #35929. Part of #35233. r? @jonathandturner
2016-08-25Fix fallout in tests.Jeffrey Seyfried-1/+0
2016-08-25Implement RFC#1559: allow all literals in attributes.Sergio Benitez-8/+9
2016-07-30diagnostically note source of overruling outer forbidZack M. Davis-0/+2
When we emit E0453 (lint level attribute overruled by outer `forbid` lint level), it could be helpful to note where the `forbid` level was set, for the convenience of users who, e.g., believe that the correct fix is to weaken the `forbid` to `deny`.
2016-07-08Add tests + Fix rustdoc regression + Fix rebaseVadim Petrochenkov-1/+0
2016-06-26Rollup merge of #34385 - cgswords:tstream, r=nrcJeffrey Seyfried-1/+2
syntax-[breaking-change] cc #31645 (Only breaking because ast::TokenTree is now tokenstream::TokenTree.) This pull request refactors TokenTrees into their own file as src/libsyntax/tokenstream.rs, moving them out of src/libsyntax/ast.rs, in order to prepare for an accompanying TokenStream implementation (per RFC 1566).
2016-06-24reexport errors from syntax. fix failing cfail testJonathan Turner-1/+1
2016-06-24Reexport syntax_pos in codemap and fix some cfail testsJonathan Turner-0/+2
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-3/+3
2016-06-21Refactored tokentrees into their own files in preparation for tokenstreams. ↵cgswords-1/+2
Modified tests to point to the new file now.
2016-06-16Simplify gated cfg checkingJeffrey Seyfried-1/+1
2016-06-12Add regression testJeffrey Seyfried-19/+0
2016-06-10Add testsVadim Petrochenkov-1/+2
2016-06-09Add regression testJeffrey Seyfried-0/+19
2016-06-09Load macros from `extern crate`s during expansion.Jeffrey Seyfried-1/+2
2016-05-06s/aux/auxiliary, because windowsNiko Matsakis-0/+0
For legacy reasons (presumably), Windows does not permit files name aux.
2016-05-06move auxiliary builds to a test-relative `aux`Niko Matsakis-0/+422
Instead of finding aux-build files in `auxiliary`, we now search for an `aux` directory relative to the test. So if your test is `compile-fail/foo.rs`, we would look in `compile-fail/aux`. Similarly, we ignore the `aux` directory when searching for tets.
2016-04-07Fix fallout in testsJeffrey Seyfried-1/+0
2016-03-07mk: Distribute fewer TARGET_CRATESAlex Crichton-0/+208
Right now everything in TARGET_CRATES is built by default for all non-fulldeps tests and is distributed by default for all target standard library packages. Currenly this includes a number of unstable crates which are rarely used such as `graphviz` and `rbml`> This commit trims down the set of `TARGET_CRATES`, moves a number of tests to `*-fulldeps` as a result, and trims down the dependencies of libtest so we can distribute fewer crates in the `rust-std` packages.
2015-12-11Make name resolution errors non-fatalNick Cameron-1/+2
2015-11-11libsyntax: Add more quasiquoting macrosKyle Mayes-10/+14
2015-08-28Move ExpnInfo to NameManish Goregaokar-2/+1
2015-08-14be more robust to bogus items in struct patterns/constructorsAriel Ben-Yehuda-1/+1
Fixes #27815
2015-05-24Auto merge of #25168 - Manishearth:register_attr, r=eddybbors-0/+30
This lets plugin authors opt attributes out of the `custom_attribute` and `unused_attribute` checks. cc @thepowersgang
2015-05-17Auto merge of #25387 - eddyb:syn-file-loader, r=nikomatsakisbors-1/+1
This allows compiling entire crates from memory or preprocessing source files before they are tokenized. Minor API refactoring included, which is a [breaking-change] for libsyntax users: * `ParseSess::{next_node_id, reserve_node_ids}` moved to rustc's `Session` * `new_parse_sess` -> `ParseSess::new` * `new_parse_sess_special_handler` -> `ParseSess::with_span_handler` * `mk_span_handler` -> `SpanHandler::new` * `default_handler` -> `Handler::new` * `mk_handler` -> `Handler::with_emitter` * `string_to_filemap(sess source, path)` -> `sess.codemap().new_filemap(path, source)`
2015-05-13Unignore some tests in stage1Tamir Duberstein-6/+0
We don't have any pending snapshot-requiring changes. Tests which continue to be ignored are those that are broken by codegen changes.
2015-05-14syntax: refactor (Span)Handler and ParseSess constructors to be methods.Eduard Burtescu-1/+1
2015-05-07test for register_attribute()Manish Goregaokar-0/+30
2015-04-26Remove FakeExtCtxt from qquote tests.Geoffry Song-28/+15
Instead create an ExtCtxt structure.
2015-04-25Remove remaining tests for hygiene-encoded identifiers.Geoffry Song-28/+0
Such things no longer exist.
2015-04-25`qquote-1.rs` -> `compile-fail-fulldeps/qquote.rs`Tamir Duberstein-0/+55
Re-enables the test.
2015-04-22Ignore cross-compilation in some fulldeps tests.Ryan Prichard-1/+0
These tests fail, in general, for cross-compilation, because they require the rustc crates to exist for the target, and they don't. We can't compile them for the target unless we also compile LLVM for the target (we don't). Android is a subset of cross-compilation. The other fulldeps tests, on the other hand, work fine for cross-compilation, and in fact, are verifying that rustc correctly searches for a host plugin crate, not a target plugin crate.
2015-04-02Fallout to tests expecting unconditional help output from missing features.Felix S. Klock II-1/+0
2015-03-21 Add tests checking that a number of feature gates are gating their features.Florian Hahn-0/+22
Namely: * `box_syntax` * `box_patterns` * `simd_ffi` * `macro_reexport` cc #22820
2015-03-09Add tests checking that a number of feature gates are gating their features.Felix S. Klock II-0/+50
Namely: * `quote` * `link_args` * `link_llvm_intrinsics` * `thread_local` * `unsafe_destructor` Also updates test for `plugin_registrar` to make it clear that it is only testing the `plugin_registrar` feature gate. Cc #22820.
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-1/+1
2015-03-02Add regression tests for #15778Keegan McAllister-0/+18
Fixes #15778.
2015-02-18Update suffixes en masse in tests using `perl -p -i -e`Niko Matsakis-1/+1
2015-02-17Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichtonbors-4/+0
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773) - Fix & enable debuginfo tests for android (#10381) - Fix & enable more tests for android (both for arm/aarch64) - Enable many already-pass tests on android (both for arm/aarch64)
2015-02-12Warn when linking a plugin into a non-plugin crateKeegan McAllister-0/+49
Fixes #22202.
2015-02-12creader: Clean up macro/plugin APIKeegan McAllister-1/+1
Step towards #22198.
2015-02-10Enable some tests for androidwonyong kim-4/+0
2015-02-09Use a crate attribute to load pluginsKeegan McAllister-23/+9
#[plugin] #[no_link] extern crate bleh; becomes a crate attribute #![plugin(bleh)] The feature gate is still required. It's almost never correct to link a plugin into the resulting library / executable, because it will bring all of libsyntax and librustc with it. However if you really want this behavior, you can get it with a separate `extern crate` item in addition to the `plugin` attribute. Fixes #21043. Fixes #20769. [breaking-change]
2015-01-21tests: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-2/+1
2015-01-08Update the compile-fail-fulldeps tests with new isize/usize literal suffixes.Felix S. Klock II-1/+1
2015-01-06Fix misspelled comments in tests.Joseph Crail-1/+1
I separated these changes out from the other commit to minimize issues with tests.
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-27/+21