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
7198687bb2
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
Alexander Regueiro
c3e182cf43
rustc: doc comments
2019-02-10 23:42:32 +00:00
Taiki Endo
2be0993c4e
Revert removed #![feature(nll)]
2019-02-10 16:13:30 +09:00
Guillaume Gomez
8b886e07f5
Remove images' url to make it work even without internet connection
2019-02-07 11:06:19 +01:00
Taiki Endo
9f4a11c637
librustc_plugin => 2018
2019-02-06 23:56:39 +09:00
bors
ceb2512144
Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakis
...
Implement basic input validation for built-in attributes
Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax").
For some subset of attributes (found by crater run), errors are lowered to deprecation warnings.
NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.
2019-01-16 15:01:20 +00:00
Igor Matuszewski
59d7d7d54b
Querify local plugin_registrar_fn
2019-01-13 23:53:58 +01:00
Vadim Petrochenkov
41c65992c5
Implement basic input validation for built-in attributes
2019-01-13 14:17:19 +03:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
John Kåre Alsaker
0c4d551146
Fix recursion limits
2018-12-23 10:46:03 +01:00
Alexander Regueiro
ee89c088b0
Various minor/cosmetic improvements to code
2018-12-07 23:53:34 +00:00
Vadim Petrochenkov
8ab115c21d
Unsupport #[derive(Trait)] sugar for #[derive_Trait] legacy plugin attributes
2018-12-07 03:30:01 +03:00