summary refs log tree commit diff
path: root/src/libsyntax_pos/symbol.rs
AgeCommit message (Collapse)AuthorLines
2019-09-13Support "soft" feature-gating using a lintVadim Petrochenkov-0/+1
Use it for feature-gating `#[bench]`
2019-08-11add basic lint testing for misuse of mem::zeroed and mem::uninitializedRalf Jung-0/+3
2019-08-03Move special treatment of `derive(Copy, PartialEq, Eq)` from expansion ↵Vadim Petrochenkov-1/+0
infrastructure to elsewhere
2019-08-03Auto merge of #63180 - varkor:trait-alias-impl-trait, r=Centrilbors-1/+1
Change opaque type syntax from `existential type` to type alias `impl Trait` This implements a new feature gate `type_alias_impl_trait` (this is slightly different from the originally proposed feature name, but matches what has been used in discussion since), deprecating the old `existential_types` feature. The syntax for opaque types has been changed. In addition, the "existential" terminology has been replaced with "opaque", as per previous discussion and the RFC. This makes partial progress towards implementing https://github.com/rust-lang/rust/issues/63063. r? @Centril
2019-08-02Replace "existential" by "opaque"varkor-1/+0
2019-08-02Switch existential_type to type_alias_impl_traitvarkor-0/+1
2019-08-02libsyntax_pos: Unconfigure tests during normal buildVadim Petrochenkov-36/+3
2019-07-23cleanup: Remove `extern crate serialize as rustc_serialize`sVadim Petrochenkov-1/+1
2019-07-19Auto merge of #62684 - petrochenkov:scopevisit, r=davidtwcobors-0/+1
resolve: Improve candidate search for unresolved macro suggestions Use same scope visiting machinery for both collecting suggestion candidates and actually resolving the names. The PR is better read in per-commit fashion with whitespace changes ignored (the first commit in particular moves some code around). This should be the last pre-requisite for https://github.com/rust-lang/rust/pull/62086. r? @davidtwco
2019-07-18Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddybbors-0/+1
rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
2019-07-18resolve: Visit all scopes to collect suggestion candidates for unresolved macrosVadim Petrochenkov-0/+1
2019-07-11Remove feature gate `dropck_parametricity` completelyLzu Tao-1/+0
Therefore we also remove `#[unsafe_destructor_blind_to_params]` attribute completly.
2019-07-11hygiene: Introduce a helper method for creating new expansionsVadim Petrochenkov-0/+2
Creating a fresh expansion and immediately generating a span from it is the most common scenario. Also avoid allocating `allow_internal_unstable` lists for derive markers repeatedly. And rename `ExpnInfo::with_unstable` to `ExpnInfo::allow_unstable`, seems to be a better fitting name.
2019-07-07syntax: Add feature gate.David Wood-0/+1
This commit adds a `const_in_array_repeat_expressions` feature gate and only create `Candidate::Repeat` if it is enabled.
2019-07-07Rollup merge of #62213 - QuietMisdreavus:cfg-doctest, r=GuillaumeGomezMazdak Farrokhzad-0/+2
rustdoc: set cfg(doctest) when collecting doctests Note: This PR builds on top of https://github.com/rust-lang/rust/pull/61199; only the last commit is specific to this PR. As discussed in https://github.com/rust-lang/rust/pull/61199, we want the ability to isolate items to only when rustdoc is collecting doctests, but we can't use `cfg(test)` because of libcore's `#![cfg(not(test))]`. This PR proposes a new cfg flag, `cfg(doctest)`, specific to this situation, rather than reusing an existing flag. I've isolated it behind a feature gate so that we can contain the effects to nightly only. (A stable workaround that can be used in lieu of `#[cfg(doctest)]` is `#[cfg(rustdoc)] #[doc(hidden)]`, at least once https://github.com/rust-lang/rust/pull/61351 lands.) Tracking issue: https://github.com/rust-lang/rust/issues/62210
2019-07-07syntax: Pre-intern names of all built-in macrosVadim Petrochenkov-1/+19
They always end up interned anyway
2019-07-06rustdoc: set cfg(doctest) when collecting doctestsQuietMisdreavus-0/+2
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-05Rollup merge of #61545 - flip1995:internal_lints, r=oli-obkMazdak Farrokhzad-0/+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-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-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-0/+6
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-10Implement RFC 2645 (transparent enums and unions)Michael Bradshaw-0/+2
Tracking issue: #60405
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-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-05-27Use `Symbol` more in lint APIsOliver Scherer-0/+10
2019-05-27Use `Symbol` equality in `may_begin_with` and `parse_nt`.Nicholas Nethercote-0/+7
2019-05-27Use `Symbol` equality in `is_ident_named`.Nicholas Nethercote-0/+2
2019-05-27Pre-intern "0", "1", ..., "9", and use where appropriate.Nicholas Nethercote-2/+18