rust/src/test/ui-fulldeps
bors 40e4b6ee3d Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton
resolve: Implement prelude search for macro paths, implement tool attributes

When identifier is macro path is resolved in scopes (i.e. the first path segment - `foo` in `foo::mac!()` or `foo!()`), scopes are searched in the same order as for non-macro paths - items in modules, extern prelude, tool prelude (see later), standard library prelude, language prelude, but with some extra shadowing restrictions (names from globs and macro expansions cannot shadow names from outer scopes). See the comment in `fn resolve_lexical_macro_path_segment` for more details.

"Tool prelude" currently contains two "tool modules" `rustfmt` and `clippy`, and is searched immediately after extern prelude.
This makes the [possible long-term solution](https://github.com/rust-lang/rfcs/blob/master/text/2103-tool-attributes.md#long-term-solution) for tool attributes exactly equivalent to the existing extern prelude scheme, except that `--extern=my_crate` making crate names available in scope is replaced with something like `--tool=my_tool` making tool names available in scope.

The `tool_attributes` feature is still unstable and `#![feature(tool_attributes)]` now implicitly enables `#![feature(use_extern_macros)]`. `use_extern_macros` is a prerequisite for `tool_attributes`, so their stabilization will happen in the same order.
If `use_extern_macros` is not enabled, then tool attributes are treated as custom attributes (this is temporary, anyway).

Fixes https://github.com/rust-lang/rust/issues/52576
Fixes https://github.com/rust-lang/rust/issues/52512
Fixes https://github.com/rust-lang/rust/issues/51277
cc https://github.com/rust-lang/rust/issues/52269
2018-08-02 21:39:14 +00:00
..
auxiliary Add a test for the declare_tool_lint macro 2018-07-30 16:10:55 +02:00
custom-derive Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
proc-macro resolve: Implement prelude search for macro paths 2018-08-01 12:08:41 +03:00
rust-2018 rustc: Disallow machine applicability in foreign macros 2018-07-30 07:48:59 -07:00
deprecated-derive.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
deprecated-derive.stderr Update UI tests 2018-02-26 20:24:02 +03:00
invalid-punct-ident-1.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
invalid-punct-ident-1.stderr proc_macro: Validate inputs to Punct::new and Ident::new 2018-05-15 23:24:16 +03:00
invalid-punct-ident-2.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
invalid-punct-ident-2.stderr proc_macro: Validate inputs to Punct::new and Ident::new 2018-05-15 23:24:16 +03:00
invalid-punct-ident-3.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
invalid-punct-ident-3.stderr proc_macro: Validate inputs to Punct::new and Ident::new 2018-05-15 23:24:16 +03:00
invalid-punct-ident-4.rs Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
invalid-punct-ident-4.stderr proc_macro: Validate inputs to Punct::new and Ident::new 2018-05-15 23:24:16 +03:00
lifetimes.rs rustc: Stabilize much of the proc_macro feature 2018-07-16 07:58:06 -07:00
lifetimes.stderr Represent lifetimes as two joint tokens in proc macros 2018-05-15 23:54:08 +03:00
lint-group-plugin.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
lint-group-plugin.stderr Update UI tests 2018-02-26 20:24:02 +03:00
lint-plugin-cmdline-allow.rs rustc: Rearchitect lints to be emitted more eagerly 2017-08-09 09:13:51 -07:00
lint-plugin-cmdline-allow.stderr Update UI tests 2018-02-26 20:24:02 +03:00
lint-plugin-cmdline-load.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
lint-plugin-cmdline-load.stderr Update UI tests 2018-02-26 20:24:02 +03:00
lint-plugin-forbid-attrs.rs Do the same things for fulldeps tests 2017-12-14 23:26:40 +03:00
lint-plugin-forbid-attrs.stderr Lint the use of async as an identifier 2018-07-14 20:44:19 +02:00
lint-plugin.rs Introduce 'run-pass' header to 'ui' tests in compiletest. Fix issue #36516. 2017-06-02 23:28:22 +08:00
lint-plugin.stderr Update UI tests 2018-02-26 20:24:02 +03:00
lint_tool_test.rs Add a test for the declare_tool_lint macro 2018-07-30 16:10:55 +02:00
lint_tool_test.stderr Add a test for the declare_tool_lint macro 2018-07-30 16:10:55 +02:00
resolve-error.rs rustc: Stabilize much of the proc_macro feature 2018-07-16 07:58:06 -07:00
resolve-error.stderr Fix stability annotations for already stable bits of proc macro API 1.1 2018-05-16 00:09:15 +03:00
unnecessary-extern-crate.rs merge UNNECESSARY_EXTERN_CRATE and UNUSED_EXTERN_CRATES 2018-06-01 11:00:18 -04:00
unnecessary-extern-crate.stderr rework to report errors from crates in a consistent order 2018-06-01 11:00:18 -04:00