Commit Graph

148 Commits

Author SHA1 Message Date
Vadim Petrochenkov 175d325ccb rustc_metadata: Move some code around
Plugin search doesn't need a crate loader, only crate locator
2019-10-24 20:51:33 +03:00
Vadim Petrochenkov 2cda75c48f rustc_metadata: Remove unnecessary use of crate store in plugin loader 2019-10-24 20:51:33 +03:00
Mark Rousskov 4e8d1b2292 Add some documentation 2019-10-22 16:53:28 -04:00
Mark Rousskov dab3bd6cda Create lint store during plugin registration
Remove lint store from Session
2019-10-17 19:41:21 -04:00
Mark Rousskov 24545128eb Take lint passes as constructor functions 2019-10-17 19:16:41 -04:00
Mark Rousskov 7fef39791a Make get_lints be a static function
This moves from calling get_lints on instantiated pass objects to the
raw object
2019-10-17 19:16:41 -04:00
Mazdak Farrokhzad d420d719c4 move syntax::ext to new crate syntax_expand 2019-10-16 10:59:53 +02:00
varkor 7bc94cc3c2 Rename Item.node to Item.kind 2019-09-26 18:21:48 +01:00
Shotaro Yamada 0423c2a7a3 Remove unused dependencies 2019-09-23 15:25:00 +09:00
Mark Rousskov 41b39fce98 Remove rustc_diagnostic_macros feature 2019-09-05 12:35:18 -04:00
Mark Rousskov b437240cee Replace diagnostic plugins with macro_rules 2019-09-05 12:35:15 -04:00
Simon Sapin c561abeea2 Restore the rustc_plugin crate in the sysroot
It was accidentally removed in a rebase of https://github.com/rust-lang/rust/pull/62727

Fixes https://github.com/rust-lang/rust/issues/63729
2019-08-20 13:30:50 +02:00
Simon Sapin d0bbc6062d Deprecate using rustc_plugin without the rustc_driver dylib.
CC https://github.com/rust-lang/rust/pull/59800
https://github.com/rust-lang/rust/commit/7198687bb2df13a3298ef1e8f594753073d6b9e8

Fix https://github.com/rust-lang/rust/issues/62717
2019-08-20 00:21:32 +02:00
Vadim Petrochenkov 434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
Matthew Jasper 199931ce91 Make register_[long_]diagnostics hygienic 2019-07-13 10:25:57 +01:00
Mazdak Farrokhzad 3250b8ee59 Rollup merge of #62042 - petrochenkov:macstab, r=matthewjasper
Support stability and deprecation checking for all macros

RELNOTES: Deprecation attributes on macros now have effect.

Fixes https://github.com/rust-lang/rust/issues/34079
Fixes https://github.com/rust-lang/rust/issues/49912
Unblocks https://github.com/rust-lang/rust/pull/62086
Unblocks https://github.com/rust-lang/rust/pull/61000
2019-07-07 17:00:17 +02:00
Vadim Petrochenkov 03ac05338c syntax: Remove NodeId from SyntaxExtension 2019-07-07 13:04:06 +03:00
John Kåre Alsaker 7198687bb2 Link compiler plugins to rustc_driver 2019-07-07 03:23:02 +02:00
Alex Crichton 345ba505ec rustc: Remove dylib crate type from most rustc crates
Now that procedural macros no longer link transitively to libsyntax,
this shouldn't be needed any more! This commit is an experiment in
removing all dynamic libraries from rustc except for librustc_driver
itself. Let's see how far we can get with that!
2019-07-07 03:23:00 +02:00
ljedrz 37d7e1f22a rename hir::map::local_def_id_from_hir_id to local_def_id 2019-07-04 12:53:12 +02:00
Mazdak Farrokhzad 8867ba19de Rollup merge of #62258 - petrochenkov:idclean, r=Centril
syntax: Unsupport `foo! bar { ... }` macros in the parser

Their support in expansion was removed in https://github.com/rust-lang/rust/pull/61606.

Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).

cc https://github.com/rust-lang-nursery/wg-grammar/issues/51
2019-07-04 01:38:49 +02:00
Jeremy Stucki ec711767a7 Remove needless lifetimes 2019-07-03 10:01:02 +02:00
Vadim Petrochenkov 3f39dc1b90 syntax: Unsupport foo! bar { ... } macros in the parser
Unreserve `macro_rules` as a macro name
2019-07-01 12:20:54 +03:00
Vadim Petrochenkov 961ba8f9ef syntax: Factor out common fields from SyntaxExtension variants 2019-06-18 10:48:56 +03:00
Eduard-Mihai Burtescu f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu fff08cb043 Run rustfmt --file-lines ... for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu 17cdd356da rustc: replace TyCtxt<'tcx, 'gcx, 'tcx> with TyCtxt<'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 37799a5552 rustc: replace TyCtxt<'a, 'gcx, 'tcx> with TyCtxt<'tcx, 'gcx, 'tcx>. 2019-06-12 13:38:27 +03:00
Vadim Petrochenkov 93eb63c9a5 syntax: Rename variants of SyntaxExtension for consistency 2019-06-10 21:34:26 +03:00
Vadim Petrochenkov 8edbbacbca syntax: Remove SyntaxExtension::DeclMacro
It's a less powerful duplicate of `SyntaxExtension::NormalTT`
2019-06-10 21:33:31 +03:00
Vadim Petrochenkov 97f4e700c2 syntax: Remove SyntaxExtension::IdentTT and IdentMacroExpander 2019-06-10 21:19:40 +03:00
Esteban Küber 609ffa1a89 Reword malformed attribute input diagnostics
- Handle empty `cfg_attr` attribute
- Reword empty `derive` attribute error
- Use consistend error message: "malformed `attrname` attribute input"
- Provide suggestions when possible
- Move note/help to label/suggestion
- Use consistent wording "ill-formed" -> "malformed"
- Move diagnostic logic out of parser
2019-05-25 11:55:50 -07:00
Vadim Petrochenkov a1885cdba3 Restore the old behavior of the rustdoc keyword check + Fix rebase 2019-05-22 20:20:12 +03:00
John Kåre Alsaker a1f2dceaeb Move edition outside the hygiene lock and avoid accessing it 2019-05-21 18:17:05 +02:00
Nicholas Nethercote ea9fac5687 Return a Symbol from name_or_empty functions. 2019-05-13 09:31:32 +10:00
Nicholas Nethercote 999c1fc281 Remove the equality operation between Symbol and strings.
And also the equality between `Path` and strings, because `Path` is made
up of `Symbol`s.
2019-05-13 09:31:30 +10:00
Nicholas Nethercote fb084a48e2 Pass a Symbol to check_name, emit_feature_err, and related functions. 2019-05-13 09:29:22 +10:00
Manish Goregaokar 577b0b9c62 Rollup merge of #60131 - agnxy:doc-link, r=ehuss
Fix broken link in rustc_plugin doc

fix #57489
r? @steveklabnik
2019-05-05 12:37:26 -07:00
Andrew Xu f77b602a78 Fix broken link in rustc_plugin doc 2019-04-20 15:45:47 +08:00
Yuki OKUSHI 9ad56e3b94 Rename modules 2019-04-17 18:21:34 +09:00
Yuki OKUSHI 5f3b8d0883 Rename diagnostics to error_codes 2019-04-17 18:19:14 +09:00
Vadim Petrochenkov db74efce69 Make meta-item API compatible with LocalInternedString::get soundness fix 2019-03-17 17:04:58 +03:00
Vadim Petrochenkov 0cf96131f4 Refactor away NestedMetaItemKind
Remove methods `Attribute::span` and `MetaItem::span` duplicating public fields
2019-03-16 23:14:42 +03:00
Vadim Petrochenkov 8371caf5ee syntax: Do not accidentally treat multi-segment meta-items as single-segment 2019-03-16 23:13:15 +03:00
ljedrz 77fa041fc1 hir: remove NodeId from Item 2019-03-02 07:48:52 +01:00
bors b244f61b77 Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnik
Cosmetic improvements to doc comments

This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase).

r? @steveklabnik

Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12 19:09:24 +00:00
bors c84e797642 Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkov
Require a list of features in `#[allow_internal_unstable]`

The blanket-permission slip is not great and will likely give us trouble some point down the road.
2019-02-12 12:10:10 +00:00
Oliver Scherer b681433b9d Use Rc<[Symbol]> instead of Vec<Symbol> to reduce # of allocs 2019-02-11 15:08:17 +01:00
Oliver Scherer 87d5383ec3 Rename the exp field to mirror its uses 2019-02-11 15:08:17 +01:00
Oliver Scherer d3c212c552 Require a list of features to allow in allow_internal_unstable 2019-02-11 15:08:16 +01:00