about summary refs log tree commit diff
path: root/src/test/compile-fail-fulldeps
AgeCommit message (Collapse)AuthorLines
2017-02-05Rename CustomDerive to ProcMacroDerive for macros 1.1Josh Driver-3/+3
2017-02-02Auto merge of #39384 - wesleywiser:fix_fixmes, r=alexcrichtonbors-2/+0
Resolve a bunch of fixmes Resolves 56 fixmes in test code related to `box` syntax.
2017-02-02Auto merge of #38932 - petrochenkov:privctor, r=jseyfriedbors-7/+0
Privatize constructors of tuple structs with private fields This PR implements the strictest version of such "privatization" - it just sets visibilities for struct constructors, this affects everything including imports. ``` visibility(struct_ctor) = min(visibility(struct), visibility(field_1), ..., visibility(field_N)) ``` Needs crater run before proceeding. Resolves https://github.com/rust-lang/rfcs/issues/902 r? @nikomatsakis
2017-01-31Removes FIXMEs related to #22405Wesley Wiser-2/+0
2017-01-31[Gate Tests] - marking feature testsColm Seale-0/+3
Removal of the lang feature gate tests whitelist #39059 r? @est31
2017-01-29Fix the falloutVadim Petrochenkov-7/+0
2017-01-20Rollup merge of #38842 - abonander:proc_macro_attribute, r=jseyfriedAlex Crichton-2/+94
Implement `#[proc_macro_attribute]` This implements `#[proc_macro_attribute]` as described in https://github.com/rust-lang/rfcs/pull/1566 The following major (hopefully non-breaking) changes are included: * Refactor `proc_macro::TokenStream` to use `syntax::tokenstream::TokenStream`. * `proc_macro::tokenstream::TokenStream` no longer emits newlines between items, this can be trivially restored if desired * `proc_macro::TokenStream::from_str` does not try to parse an item anymore, moved to `impl MultiItemModifier for CustomDerive` with more informative error message * Implement `#[proc_macro_attribute]`, which expects functions of the kind `fn(TokenStream, TokenStream) -> TokenStream` * Reactivated `#![feature(proc_macro)]` and gated `#[proc_macro_attribute]` under it * `#![feature(proc_macro)]` and `#![feature(custom_attribute)]` are mutually exclusive * adding `#![feature(proc_macro)]` makes the expansion pass assume that any attributes that are not built-in, or introduced by existing syntax extensions, are proc-macro attributes * Fix `feature_gate::find_lang_feature_issue()` to not use `unwrap()` * This change wasn't necessary for this PR, but it helped debugging a problem where I was using the wrong feature string. * Move "completed feature gate checking" pass to after "name resolution" pass * This was necessary for proper feature-gating of `#[proc_macro_attribute]` invocations when the `proc_macro` feature flag isn't set. Prototype/Litmus Test: [Implementation](https://github.com/abonander/anterofit/blob/proc_macro/service-attr/src/lib.rs#L13) -- [Usage](https://github.com/abonander/anterofit/blob/proc_macro/service-attr/examples/post_service.rs#L35)
2017-01-17Teach Diagnostics to highlight textEsteban Küber-1/+0
2017-01-16Implement `#[proc_macro_attribute]`Austin Bonander-0/+93
* Add support for `#[proc_macro]` * Reactivate `proc_macro` feature and gate `#[proc_macro_attribute]` under it * Have `#![feature(proc_macro)]` imply `#![feature(use_extern_macros)]`, error on legacy import of proc macros via `#[macro_use]`
2017-01-15Refactor `proc_macro::TokenStream` to use ↵Austin Bonander-2/+1
`syntax::tokenstream::TokenStream`; fix tests for changed semantics
2017-01-12resolve: Do not use "resolve"/"resolution" in error messagesVadim Petrochenkov-2/+2
2017-01-06Auto merge of #38792 - jseyfried:improve_macros_11_diagnostics, r=nikomatsakisbors-0/+43
proc macros 1.1: improve diagnostics Fixes #38586. r? @nrc
2017-01-05Auto merge of #38689 - pnkfelix:dont-check-stability-on-private-items, ↵bors-0/+229
r=nikomatsakis Dont check stability for items that are not pub to universe. Dont check stability for items that are not pub to universe. In other words, skip it for private and even `pub(restricted)` items, because stability checks are only relevant to things visible in other crates. Fix #38412.
2017-01-03Regression test and exploratory unit test.Felix S. Klock II-0/+229
2017-01-03Add regression test.Jeffrey Seyfried-0/+43
2017-01-02rustc: Stabilize the `proc_macro` featureAlex Crichton-105/+0
This commit stabilizes the `proc_macro` and `proc_macro_lib` features in the compiler to stabilize the "Macros 1.1" feature of the language. Many more details can be found on the tracking issue, #35900. Closes #35900
2016-12-26More systematic error reporting in path resolutionVadim Petrochenkov-2/+2
2016-12-15Require `#[proc_macro_derive]` functions to be `pub`.Jeffrey Seyfried-1/+6
2016-12-07remove useless lifetimes on LateLintPass impl methodsOliver Schneider-2/+2
2016-12-07remove useless lifetime outlives boundsOliver Schneider-6/+6
2016-12-06annotate stricter lifetimes on LateLintPass methods to allow them to forward ↵Oliver Schneider-2/+2
to a Visitor
2016-12-02Allow --test to be used on proc-macro cratesJosh Driver-22/+0
2016-11-28rustc: rework stability to be on-demand for type-directed lookup.Eduard Burtescu-8/+10
2016-11-21Fix fallout in `rustdoc` and tests.Jeffrey Seyfried-8/+9
2016-11-19Auto merge of #37826 - keeperofdakeys:proc-macro-test, r=alexcrichtonbors-0/+22
Show a better error when using --test with #[proc_macro_derive] Fixes https://github.com/rust-lang/rust/issues/37480 Currently using `--test` with a crate that contains a `#[proc_macro_derive]` attribute causes an error. This PR doesn't attempt to fix the issue itself, or determine what tesing of a proc_macro_derive crate should be - just to provide a better error message.
2016-11-18Add testsJosh Driver-0/+22
2016-11-16Add regression test.Jeffrey Seyfried-0/+49
2016-11-10Support `#[macro_reexport]`ing custom derives.Jeffrey Seyfried-5/+10
2016-11-09Rollup merge of #37614 - keeperofdakeys:proc_macro, r=jseyfriedEduard-Mihai Burtescu-4/+99
macros 1.1: Allow proc_macro functions to declare attributes to be mark as used This PR allows proc macro functions to declare attribute names that should be marked as used when attached to the deriving item. There are a few questions for this PR. - Currently this uses a separate attribute named `#[proc_macro_attributes(..)]`, is this the best choice? - In order to make this work, the `check_attribute` function had to be modified to not error on attributes marked as used. This is a pretty large change in semantics, is there a better way to do this? - I've got a few clones where I don't know if I need them (like turning `item` into a `TokenStream`), can these be avoided? - Is switching to `MultiItemDecorator` the right thing here? Also fixes https://github.com/rust-lang/rust/issues/37563.
2016-11-08Revert "Point macros 1.1 errors to the input item"Josh Driver-2/+2
This reverts commit 3784067edcbcd0614f6c4c88f6445ca17ae27ff6. Any errors in the derived output now point at the derive attribute instead of the item.
2016-11-08Allow proc_macro functions to whitelist specific attributesJosh Driver-2/+97
By using a second attribute `attributes(Bar)` on proc_macro_derive, whitelist any attributes with the name `Bar` in the deriving item. This allows a proc_macro function to use custom attribtues without a custom attribute error or unused attribute lint.
2016-11-08Auto merge of #36843 - petrochenkov:dotstab, r=nikomatsakisbors-1/+0
Stabilize `..` in tuple (struct) patterns I'd like to nominate `..` in tuple and tuple struct patterns for stabilization. This feature is a relatively small extension to existing stable functionality and doesn't have known blockers. The feature first appeared in Rust 1.10 6 months ago. An example of use: https://github.com/rust-lang/rust/pull/36203 Closes https://github.com/rust-lang/rust/issues/33627 r? @nikomatsakis
2016-11-04Add error when proc_macro_derive is used not on functionsest31-0/+6
Fixes #37590
2016-11-03Stabilize `..` in tuple (struct) patternsVadim Petrochenkov-1/+0
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-3/+2
2016-10-27Preparations and cleanupVadim Petrochenkov-1/+1
Diagnostics for struct path resolution errors in resolve and typeck are unified. Self type is treated as a type alias in few places (not reachable yet). Unsafe cell is seen in constants even through type aliases. All checks for struct paths in typeck work on type level.
2016-10-21Auto merge of #37174 - mikhail-m1:dnlle, r=jonathandturnerbors-4/+5
improve "Doesn't live long enough" error I've fixed only with same case issue #36537 part of #35233 r? @jonathandturner
2016-10-20improve "Doesn't live long enough" errorMikhail Modin-4/+5
2016-10-19Future proof `#[no_link]`.Jeffrey Seyfried-3/+2
2016-10-19Rollup merge of #37198 - jseyfried:future_proof_macros_11, r=nrcEduard-Mihai Burtescu-27/+1
macros 1.1: future proofing and cleanup This PR - uses the macro namespace for custom derives (instead of a dedicated custom derive namespace), - relaxes the shadowing rules for `#[macro_use]`-imported custom derives to match the shadowing rules for ordinary `#[macro_use]`-imported macros, and - treats custom derive `extern crate`s like empty modules so that we can eventually allow, for example, `extern crate serde_derive; use serde_derive::Serialize;` backwards compatibly. r? @alexcrichton
2016-10-15Treat custom derive extern crates like empty modules.Jeffrey Seyfried-27/+1
2016-10-14Avoid many CrateConfig clones.Nicholas Nethercote-1/+1
This commit changes `ExtCtx::cfg()` so it returns a `CrateConfig` reference instead of a clone. As a result, it also changes all of the `cfg()` callsites to explicitly clone... except one, because the commit also changes `macro_parser::parse()` to take `&CrateConfig`. This is good, because that function can be hot, and `CrateConfig` is expensive to clone. This change almost halves the number of heap allocations done by rustc for `html5ever` in rustc-benchmarks suite, which makes compilation 1.20x faster.
2016-10-06rustc: Rename rustc_macro to proc_macroAlex Crichton-131/+131
This commit blanket renames the `rustc_macro` infrastructure to `proc_macro`, which reflects the general consensus of #35900. A follow up PR to Cargo will be required to purge the `rustc-macro` name as well.
2016-09-28Rollup merge of #36782 - alexcrichton:rustc-macro-expand-order, r=nrcJonathan Turner-64/+0
rustc: Tweak expansion order of custom derive This commit alters the expansion order of custom macros-1.1 style `#[derive]` modes. Instead of left-to-right the expansion now happens in three categories, each of which is internally left-to-right: * Old-style custom derive (`#[derive_Foo]`) is expanded * New-style custom derive (macros 1.1) is expanded * Built in derive modes are expanded This gives built in derive modes maximal knowledge about the struct that's being expanded and also avoids pesky issues like exposing `#[structural_match]` or `#[rustc_copy_clone_marker]`. cc #35900
2016-09-27rustc: Tweak expansion order of custom deriveAlex Crichton-64/+0
This commit alters the expansion order of custom macros-1.1 style `#[derive]` modes. Instead of left-to-right the expansion now happens in three categories, each of which is internally left-to-right: * Old-style custom derive (`#[derive_Foo]`) is expanded * New-style custom derive (macros 1.1) is expanded * Built in derive modes are expanded This gives built in derive modes maximal knowledge about the struct that's being expanded and also avoids pesky issues like exposing `#[structural_match]` or `#[rustc_copy_clone_marker]`. cc #35900
2016-09-27Fix fallout in tests.Jeffrey Seyfried-1/+0
2016-09-15Remove irrelevant test.Jeffrey Seyfried-44/+0
2016-09-13Refactor `ExtCtxt` to use a `Resolver` instead of a `MacroLoader`.Jeffrey Seyfried-2/+2
2016-09-08Point compile-fail errors to the input item instead of the deriveDavid Tolnay-3/+3
2016-09-04Replace `_, _, _` with `..`Vadim Petrochenkov-2/+3