Commit graph

31 commits

Author SHA1 Message Date
bjorn3
f26e2fe1da Deprecate rustc plugin support in cargo
It has been removed entirely from rustc itself already
2024-01-04 13:17:50 +01:00
Ed Page
c12c4c3f8d tests: Remove plugin tests
Compiler plugins were removed in rust-lang/rust#116412, so we don't need
these tests.

As for the `plugin` field on build-targets, it appears to be
[stable-but-deprecated](https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-plugin-field),
so I left it alone
2023-11-06 09:55:31 -06:00
Scott Schafer
a726b8d682 chore: update proc_macro tests to use check 2023-02-20 12:21:35 -06:00
Eric Huss
1c3640e05c Add requirements to cargo_test. 2022-07-30 19:36:58 -07:00
hi-rustin
8b895cc80b Use warn_on_deprecated
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-03-10 00:08:28 +08:00
hi-rustin
a317aff9b8 Warning on conflicting crate_types keys
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-03-09 23:16:38 +08:00
hi-rustin
375ccd2f4a Warning on conflicting proc_macro
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-03-09 23:16:38 +08:00
Eric Huss
b34b76738a Fix plugin registrar change. 2021-08-14 15:31:06 -07:00
Eric Huss
d087aeb845 Stabilize -Zfeatures and -Zpackage-features. 2020-12-19 08:26:42 -08:00
Eric Huss
6f8c7d5a87 Normalize raw string indentation. 2020-09-26 17:59:58 -07:00
Alex Crichton
442f6297bf Fix an accidental raw access of field
The manifest has a few different ways of specifying whether a crate is a
procedural macro, and there's a `TomlTarget::proc_macro()` method to
unify these various lines. Unfortunately though we had a bug where one
location forgot to call the method and read the raw field! This led to
surprising behavior where the different ways to specify a proc macro
would have subtly different changes in behavior. The fix here in this PR
is to ensure that we access the property always via the method.

Closes #8315
2020-06-03 07:44:22 -07:00
Eric Huss
f8fafbc3de Bump to 0.44.0. 2020-01-31 12:05:14 -08:00
Eric Huss
4d64eb99a4 Add proc_macro to the extern prelude. 2019-12-12 16:56:38 -08:00
Eric Huss
83571aee56 Minor testsuite organization. 2019-11-24 18:42:45 -08:00
Alex Crichton
9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Simon Sapin
3f40330cf8 Tests: Import rustc_plugin from its new location
CC https://github.com/rust-lang/rust/pull/62727
2019-08-24 14:22:12 +02:00
Jethro Beekman
0e0d968825 Update #[test] attribute on all tests in the testsuite
sed -i 's/^#\[test\]/#[cargo_test]/' $(rg -l '^#\[test\]')

Manual fixes:
* proc_macro::proc_macro_doctest
2019-06-07 12:41:26 -07:00
Eric Huss
50277e88fe Testsuite: remove some unnecessary is_nightly checks. 2019-03-26 13:56:14 -07:00
Alexander Regueiro
f7c91ba622
Various cosmetic improvements. 2019-02-20 10:58:27 +00:00
Alex Crichton
fecb724643 Format with cargo fmt 2018-12-08 03:19:47 -08:00
Dale Wijnand
04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Eric Huss
b0e767f314 Add warnings for crate-type = ["proc-macro"]. 2018-11-06 10:32:56 -08:00
Eric Huss
e295a900bb Treat "proc-macro" crate type the same as proc-macro = true 2018-11-06 09:40:38 -08:00
Dale Wijnand
85984a8700
Migrate from tests fom assert_that/execs to .run() 2018-08-28 15:08:12 +02:00
Dale Wijnand
16aeb0cd4f
Default test support's Execs to exit code 0 2018-08-03 07:44:42 +01:00
Dale Wijnand
43b42d6f4c
Reorganise the testsuite crate module hierarchy
* Collapse the nested cargotest::support module into the cargotest
  module (merge the mod.rs's)
* Rename the cargotest module to support
* Nest the top-level hamcrest module into support
2018-07-22 08:46:44 +01:00
Dale Wijnand
f8c9928cc1
Rework some test projects to use the "foo" default
Generally that means either switching "foo" and "bar" around (reversing
the arrow), or it means push "foo" to "bar" (and sometimes "bar" to
"baz", etc..) to free up "foo".

For trivia that leaves 80/1222 outliers, therefore 93.4% of test
project use the default. :)
2018-07-21 19:40:45 +01:00
Dale Wijnand
7fe2fbc8a3
Remove the argument from the project test support function
By rewriting the tests, with rerast (https://github.com/google/rerast),
to use the newly introduced "at" method.

First I added the following temporary function to cargotest::support:

    pub fn project_foo() -> ProjectBuilder {
        project("foo")
    }

Then I defined the following rewrite.rs:

    use cargotest::support::{ project, project_foo };

    fn rule1(a: &'static str) {
        replace!(project("foo") => project_foo());
        replace!(project(a) => project_foo().at(a));
    }

Then I ran rerast:

    cargo +nightly rerast --rules_file=rewrite.rs --force --targets tests --file tests/testsuite/main.rs

Finally I searched and replaced the references to project_foo with
argument-less project (a little awkardly on macOS with a git clean).

    find tests -type f -exec sed -i -e 's/project_foo/project/g' {} +
    git clean -d tests
2018-07-20 13:31:50 +01:00
Aleksey Kladov
14067b952e Remove some is_nightly checks from tests 2018-04-22 18:08:31 +03:00
Alex Crichton
1e6828485e cargo fmt 2018-03-14 17:48:23 -07:00
André Rocha
c2ff988c9f Reorganize integration tests as one crate with many modules. Issue #4867. 2018-02-21 13:33:51 -05:00
Renamed from tests/proc-macro.rs (Browse further)