about summary refs log tree commit diff
path: root/src/libsyntax_pos
AgeCommit message (Collapse)AuthorLines
2019-07-07Rollup merge of #62042 - petrochenkov:macstab, r=matthewjasperMazdak Farrokhzad-1/+19
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-07syntax: Pre-intern names of all built-in macrosVadim Petrochenkov-1/+19
They always end up interned anyway
2019-07-07rustc: Remove `dylib` crate type from most rustc cratesAlex Crichton-1/+1
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-06`#[rustc_transparent_macro]` -> `#[rustc_macro_transparency = ...]`Vadim Petrochenkov-1/+1
2019-07-06`#[rustc_doc_only_macro]` -> `#[rustc_builtin_macro]`Vadim Petrochenkov-1/+1
2019-07-06Enforce 'cond: bool' in while-expr + improve reachability diags.Mazdak Farrokhzad-2/+3
2019-07-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-1/+4
Implement another internal lints cc #49509 This adds ~~two~~ one internal lint~~s~~: 1. LINT_PASS_IMPL_WITHOUT_MACRO: Make sure, that the `{declare,impl}_lint_pass` macro is used to implement lint passes. cc #59669 2. ~~USAGE_OF_TYCTXT_AND_SPAN_ARGS: item 2 on the list in #49509~~ ~~With 2. I wasn't sure, if this lint should be applied everywhere. That means a careful review of 0955835 would be great. Also 73fb9b4 allows this lint on some functions. Should I also apply this lint there?~~ TODO (not directly relevant for review): - [ ] https://github.com/rust-lang/rust/pull/59316#discussion_r280186517 (not sure yet, if this works or how to query for `rustc_private`, since it's not in [`Features`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/feature_gate/struct.Features.html) :thinking: cc @eddyb) - [x] https://github.com/rust-lang/rust/pull/61735#discussion_r292389870 - [x] Check explicitly for the `{declare,impl}_lint_pass!` macros r? @oli-obk
2019-07-03Add separate 'async_closure' feature gate.Mazdak Farrokhzad-0/+1
2019-07-02feature-gate member constraints outside of async-awaitNiko Matsakis-0/+1
Minimizes risk.
2019-06-29Rollup merge of #62104 - Zoxc:query-info, r=eddybMazdak Farrokhzad-0/+3
Inform the query system about properties of queries at compile time
2019-06-25Auto merge of #60732 - jswrenn:arbitrary_enum_discriminant, r=pnkfelixbors-0/+1
Implement arbitrary_enum_discriminant Implements RFC rust-lang/rfcs#2363 (tracking issue #60553).
2019-06-25Add some #[inline] attributesJohn Kåre Alsaker-0/+3
2019-06-24Use symbols in lint tool listflip1995-0/+1
2019-06-24Enable internal lints in bootstrapflip1995-1/+0
2019-06-24Only allow {declare,impl}_lint_pass macros for implementing LintPassflip1995-0/+3
2019-06-23let_chains: Add feature gate.Mazdak Farrokhzad-0/+1
2019-06-21Implement arbitrary_enum_discriminantJohn Wrenn-0/+1
2019-06-18hygiene: Avoid some unnecessary `ExpnInfo` clonesVadim Petrochenkov-5/+5
2019-06-18syntax: Move `default_transparency` into `ExpnInfo`Vadim Petrochenkov-25/+17
2019-06-18syntax: Introduce `default`/`with_unstable` constructors for `ExpnInfo`Vadim Petrochenkov-0/+23
2019-06-17don't ICE on large filesAleksey Kladov-3/+9
This is an extremely marginal error, so the cost of properly threading `Handler` everywhere just not seemed justified. However, it's useful to panic when we create a file, and not when we slice strings with overflown indexes somewhere in the guts of the compiler. For this reason, while we provide safe `try_new_source_file`, we don't change the existing public interface and just panic more or less cleanly.
2019-06-16Auto merge of #60730 - matthewjasper:optimize-false-edges, r=pnkfelixbors-0/+1
Optimize matches Attempt to fix or improve #60571 This is breaking some diagnostics because the MIR for match arms isn't in source order any more. cc @centril
2019-06-15Rollup merge of #61813 - matthewjasper:remove-unnecessary-symbol-ops, ↵Mazdak Farrokhzad-0/+4
r=petrochenkov Remove some unnecessary symbol interner ops * Don't gensym symbols that don't need to worry about colliding with other symbols * Use symbol constants instead of interning string literals in a few places. * Don't generate a module in `__register_diagnostic` r? @petrochenkov
2019-06-14Use `sym` constansts for `PrimitiveTypeTable` keysMatthew Jasper-0/+2
2019-06-14Avoid some unnecessary symbol interner operationsMatthew Jasper-0/+2
2019-06-13Call str::eq and <[T]>::eq for match comparisonsMatthew Jasper-0/+1
We used to call the less efficient `<&str>::eq` and `<&[T]>::eq`.
2019-06-12Auto merge of #60669 - c410-f3r:attrs-fn, r=petrochenkovbors-0/+1
Allow attributes in formal function parameters Implements https://github.com/rust-lang/rust/issues/60406. This is my first contribution to the compiler and since this is a large and complex project, I am not fully aware of the consequences of the changes I have made. **TODO** - [x] Forbid some built-in attributes. - [x] Expand cfg/cfg_attr
2019-06-12Rollup merge of #61568 - Mark-Simulacrum:symbol-fmt-macros, r=estebankMazdak Farrokhzad-3/+21
Use Symbol, Span in libfmt_macros I'm not super happy with this, personally, but I think it might be a decent start -- happy to take suggestions as to how to expand this or change things further. r? @estebank Fixes #60795
2019-06-11Auto merge of #61735 - eddyb:must-use-life, r=oli-obkbors-0/+1
Add deny(unused_lifetimes) to all the crates that have deny(internal). @Zoxc brought up, regarding #61722, that we don't force the removal of unused lifetimes. Turns out that it's not that bad to enable for compiler crates (I wonder why it's not `warn` by default?). I would've liked to enable `single_use_lifetimes` as well, but https://github.com/rust-lang/rust/issues/53738 makes it unusable for now. For the `rustfmt` commit, I used https://github.com/rust-lang/rustfmt/issues/1324#issuecomment-482109952, and manually filtered out some noise. r? @oli-obk cc @rust-lang/compiler
2019-06-11Add deny(unused_lifetimes) to all the crates that have deny(internal).Eduard-Mihai Burtescu-0/+1
2019-06-10Implement RFC 2645 (transparent enums and unions)Michael Bradshaw-0/+2
Tracking issue: #60405
2019-06-09Introduce InnerSpan abstractionMark Rousskov-3/+15
This should be used when trying to get at subsets of a larger span, especially when the larger span is not available in the code attempting to work with those subsets (especially common in the fmt_macros crate). This is usually a good replacement for (BytePos, BytePos) and (usize, usize) tuples. This commit also removes from_inner_byte_pos, since it took usize arguments, which is error prone.
2019-06-09Use Symbol for named arguments in fmt_macrosMark Rousskov-0/+6
2019-06-09Allow attributes in formal function parametersCaio-0/+1
2019-06-08Introduce `#[rustc_dummy]` attribute and use it in testsVadim Petrochenkov-0/+1
Unlike other built-in attributes, this attribute accepts any input
2019-06-08Turn `#[allocator]` into a built-in attribute and rename it to ↵Vadim Petrochenkov-0/+1
`#[rustc_allocator]`
2019-06-08Remove unused `#![feature(custom_attribute)]`sVadim Petrochenkov-1/+0
2019-06-07Auto merge of #61209 - matthewjasper:const-tuple-constructors, r=oli-obkbors-0/+1
Make tuple constructors real const fns Mir construction special cases `Ctor(...)` to be lowered as `Ctor { 0: ... }`, which means this doesn't come up much in practice, but it seems inconsistent not to allow this. r? @oli-obk
2019-06-06Make constructors actually be const functionsMatthew Jasper-0/+1
2019-06-06Some code cleanup and tidy/test fixesVadim Petrochenkov-3/+2
2019-06-06syntax: Remove duplicate span from `token::Ident`Vadim Petrochenkov-13/+17
2019-06-05Fixed rebase fallout.Alexander Regueiro-0/+1
2019-06-05Addressed points raised in review.Alexander Regueiro-2/+2
2019-06-05Add `modernize_and_adjust` methods.Nicholas Nethercote-0/+16
These combine two `HygieneData::with` calls into one.
2019-06-05Add a useful comment about this file.Nicholas Nethercote-0/+20
2019-06-05Add `walk_chain`.Nicholas Nethercote-0/+15
This combines multiple `HygieneData::with` calls on a hot path.
2019-06-05Add `SyntaxContext::hygienic_eq`.Nicholas Nethercote-0/+8
This combines multiple `HygieneData::with` calls into one, by combining parts of `hygienic_eq` and `adjust_ident`.
2019-06-05Add and use `SyntaxContext::outer_and_expn_info`.Nicholas Nethercote-0/+10
This combines two `HygieneData::with` calls into one on a hot path.
2019-06-05Optimize `glob_adjust` and `reverse_glob_adjust`.Nicholas Nethercote-23/+27
They can each now do a single `HygieneData::with` call by replacing the `SyntaxContext` and `Mark` methods with the equivalent methods from `HygieneData`.
2019-06-05Add `HygieneData::apply_mark`.Nicholas Nethercote-4/+6
This combines two `HygieneData::with` calls into one.