about summary refs log tree commit diff
path: root/src/librustc_plugin
AgeCommit message (Collapse)AuthorLines
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-16ItemKindcsmoe-1/+1
2018-07-12Deny bare trait objects in the rest of rustljedrz-0/+2
2018-06-27Implement `#[macro_export(local_inner_macros)]`Vadim Petrochenkov-0/+3
2018-05-17Pass crate editions to macro expansions, update testsVadim Petrochenkov-2/+6
2018-05-05Misc tweaksJohn Kåre Alsaker-3/+0
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-16Auto merge of #48524 - abonander:check-macro-stability, r=petrochenkovbors-2/+5
check stability of macro invocations I haven't implemented tests yet but this should be a pretty solid prototype. I think as-implemented it will also stability-check macro invocations in the same crate, dunno if we want that or not. I don't know if we want this to go through `rustc::middle::stability` or not, considering the information there wouldn't be available at the time of macro expansion (even for external crates, right?). r? @nrc closes #34079 cc @petrochenkov @durka @jseyfried #38356
2018-03-07check stability of macro invocationsAustin Bonander-2/+5
2018-03-05Turn features() into a query.Michael Woerister-1/+1
2018-02-20stage0 cfg cleanupMark Simulacrum-1/+0
2018-01-16Don't include DefIndex in plugin- and proc-macro registrar fn symbol.Michael Woerister-2/+2
2018-01-04rustc: Don't use relative paths for extended errorsAlex Crichton-0/+1
These no longer work now that Cargo changes the cwd of rustc while it's running. Instead use an absolute path that's set by rustbuild.
2018-01-01Fix broken links in internal docsMalo Jaffré-1/+1
2017-12-04rustc_back: move dynamic_lib to rustc_metadata.Irina-Gabriela Popa-3/+1
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-22Auto merge of #44008 - RalfJung:staged1, r=alexcrichtonbors-0/+1
Make sure crates not opting in to staged_api don't use staged_api This also fixes the problem that with `-Zforce-unstable-if-unmarked` set, crates could not use `#[deprecated]`. If you prefer, I can instead submit another version which just fixes this problem, but still allows the staged API attributes for all crates when `-Zforce-unstable-if-unmarked` is set. I have prepared that at <https://github.com/RalfJung/rust/tree/staged2>. As yet another alternative, @alexcrichton suggested to turn this error into a lint, but that seems to be much more work, so is it worth it? Cc @alexcrichton #43975
2017-08-21rustc_plugin: use staged APIRalf Jung-0/+1
2017-08-19rustc: Remove some dead codeVadim Petrochenkov-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-5/+5
Like #43008 (f668999), but _much more aggressive_.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-4/+18
2017-08-06de-orphan extended informationZack M. Davis-0/+2
Bizarrely, librustc_passes, librustc_plugin, librustc_mir, and libsyntax weren't getting their error explanations registered. Resolves #35284.
2017-06-23Removed as many "```ignore" as possible.kennytm-3/+13
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-15Update older URLs pointing to the first edition of the BookWonwoo Choi-2/+2
`compiler-plugins.html` is moved into the Unstable Book. Explanation is slightly modified to match the change.
2017-05-13Support #[allow] etc logic on a per macro levelest31-1/+2
This commit extends the current unused macro linter to support directives like #[allow(unused_macros)] or #[deny(unused_macros)] directly next to the macro definition, or in one of the modules the macro is inside. Before, we only supported such directives at a per crate level, due to the crate's NodeId being passed to session.add_lint. We also had to implement handling of the macro's NodeId in the lint visitor.
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-3/+4
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2017-04-18kill a bunch of one off tasksNiko Matsakis-2/+0
2017-04-13remove `LinkMeta` from `SharedCrateContext`Niko Matsakis-2/+2
A number of things were using `crate_hash` that really ought to be using `crate_disambiguator` (e.g., to create the plugin symbol names). They have been updated. It is important to remove `LinkMeta` from `SharedCrateContext` since it contains a hash of the entire crate, and hence it will change whenever **anything** changes (which would then require rebuilding **everything**).
2017-03-29Merge `ExpnId` and `SyntaxContext`.Jeffrey Seyfried-2/+2
2017-03-27Fix various useless derefs and slicingsOliver Schneider-3/+3
2017-03-10Remove ability for plugins to register a MIR passSimonas Kazlauskas-11/+0
In recent months there have been a few different people investigating how to make a plugin that registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper. The interface to register MIR passes was added primarily for miri (& later was found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use this interface anymore it seems like a good time to remove this "feature". For prototyping purposes a similar interface can be added by developers themselves in their custom rustc build.
2017-01-22Remove unused `extern crate`s.Jeffrey Seyfried-2/+0
2017-01-22Warn on unused `#[macro_use]` imports.Jeffrey Seyfried-3/+1
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-29Fallout from updating bootstrap CargoAlex Crichton-0/+1
2016-12-28rustc: separate TraitItem from their parent Item, just like ImplItem.Eduard-Mihai Burtescu-0/+3
2016-12-23Allow legacy custom derive authors to disable warnings in downstream crates.Jeffrey Seyfried-0/+18
2016-11-21Cleanup `InternedString`.Jeffrey Seyfried-1/+1
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-2/+2
2016-11-20Refactor `MetaItemKind` to use `Name`s instead of `InternedString`s.Jeffrey Seyfried-2/+2
2016-11-16fallout from separating impl-items from implsNiko Matsakis-0/+3
Basically adding `visit_impl_item` in various places and so forth.
2016-11-16refactor Visitor into ItemLikeVisitor and intravisit::VisitorNiko Matsakis-3/+3
There are now three patterns (shallow, deep, and nested visit). These are described in detail on the docs in `itemlikevisit::ItemLikeVisitor`.
2016-10-31Changed most vec! invocations to use square bracesiirelu-5/+5
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-7/+3
2016-10-22Remove `CrateReader`, use `CrateLoader` instead.Jeffrey Seyfried-3/+3
2016-09-26Forbid user-defined macros named "macro_rules".Jeffrey Seyfried-0/+3
2016-09-23reviewer comments and rebasingNick Cameron-6/+2
2016-09-22Adds a `ProcMacro` form of syntax extensionNick Cameron-0/+2
This commit adds syntax extension forms matching the types for procedural macros 2.0 (RFC #1566), these still require the usual syntax extension boiler plate, but this is a first step towards proper implementation and should be useful for macros 1.1 stuff too. Supports both attribute-like and function-like macros.