summary refs log tree commit diff
path: root/src/librustc_span
AgeCommit message (Collapse)AuthorLines
2020-01-26rustc_span: return an impl Iterator instead of a Vec from macro_backtrace.Eduard-Mihai Burtescu-17/+19
2020-01-26rustc_span: replace MacroBacktrace with ExpnData.Eduard-Mihai Burtescu-18/+2
2020-01-26rustc_span: move pretty syntax from macro_backtrace to ExpnKind::descr.Eduard-Mihai Burtescu-16/+10
2020-01-26Don't use ExpnKind::descr to get the name of a bang macro.Eduard-Mihai Burtescu-2/+4
2020-01-23unused-parens: implement for block return valuesTyler Lanphear-2/+2
2020-01-21Auto merge of #65672 - ecstatic-morse:unified-dataflow-proto, r=pnkfelixbors-0/+3
A single framework for gen-kill and generic dataflow problems This is the prototype implementation discussed in rust-lang/compiler-team#202. You can read a high-level description of it in [the proposal](https://hackmd.io/@39Qr_z9cQhasi25sGjmFnA/Skvd9rztS) for that design meeting. This would eventually supersede the existing `BitDenotation` interface. r? @ghost cc @rust-lang/compiler (esp. @eddyb and @pnkfelix)
2020-01-16Do not ICE on malformed suggestion spansEsteban Küber-4/+7
2020-01-14Improve graphviz visualization for new frameworkDylan MacKenzie-0/+3
2020-01-12Use `report_in_external_macro` for internal lintsAfnan Enayet-0/+1
Add the option to report lints in external macros for rustc internal lints
2020-01-12Rollup merge of #68045 - Centril:liberate-lints, r=Mark-SimulacrumMazdak Farrokhzad-0/+5
Move more of `rustc::lint` into `rustc_lint` Based on https://github.com/rust-lang/rust/pull/67806. Here we try to consolidate more of the linting infra into `rustc::lint`. Some high-level notes: - We now store an `Lrc<dyn Any + Send + Sync>` as opposed to `Lrc<LintStore>` in the `GlobalCtxt`. This enables us to avoid referring to the type, breaking a cyclic dependency, and so we can move things from `rustc::lint` to `rustc_lint`. - `in_derive_expansion` is, and needs to, be moved as a method on `Span`. - We reduce the number of ways on `tcx` to emit a lint so that the developer UX is more streamlined. - `LintLevelsBuilder` is moved to `rustc_lint::levels`, leaving behind `LintLevelMap/Set` in a purified form due to current constraints (hopefully fixable in the future after https://github.com/rust-lang/rust/pull/68133). - `struct_lint_level` is moved to `rustc::lint` due to current dependency constraints. - `rustc::lint::context` is moved to `rustc_lint::context`. - The visitors in `rustc::lint` are moved to `rustc_lint::passes`.
2020-01-11Rollup merge of #68114 - ecstatic-morse:fix-feature-gating, r=CentrilMazdak Farrokhzad-1/+0
Don't require `allow_internal_unstable` unless `staged_api` is enabled. #63770 changed `qualify_min_const_fn` to require `allow_internal_unstable` for *all* crates that used an unstable feature, regardless of whether `staged_api` was enabled or the `fn` that used that feature was stably const. In practice, this meant that every crate in the ecosystem that wanted to use nightly features added `#![feature(const_fn)]`, which skips `qualify_min_const_fn` entirely. After this PR, crates that do not have `#![feature(staged_api)]` will only need to enable the feature they are interested in. For example, `#![feature(const_if_match)]` will be enough to enable `if` and `match` in constants. Crates with `staged_api` (e.g., `libstd`) require `#[allow_internal_unstable]` to be added to a function if it uses nightly features unless that function is also marked `#[rustc_const_unstable]`. This prevents proliferation of `#[allow_internal_unstable]` into functions that are not callable in a `const` context on stable. r? @oli-obk (author of #63770) cc @Centril
2020-01-11move in_derive_expansion as Span methodMazdak Farrokhzad-0/+5
2020-01-11Rollup merge of #68084 - estebank:ice-68000, r=varkorMazdak Farrokhzad-1/+1
Do not ICE on unicode next point Use `shrink_to_hi` instead of `next_point` and fix `next_point`. Fix #68000, fix #68091, fix #68092.
2020-01-10Remove unnecessary `const_fn` feature gatesDylan MacKenzie-1/+0
This flag opts out of the min-const-fn checks entirely, which is usually not what we want. The few cases where the flag is still necessary have been annotated.
2020-01-10Fix `next_point` to be unicode awareEsteban Küber-1/+1
2020-01-10Introduce `#![feature(half_open_range_patterns)]`.Mazdak Farrokhzad-0/+1
This feature adds `X..`, `..X`, and `..=X` patterns.
2020-01-09Add `const_trait_bound_opt_out` feature gateDylan MacKenzie-0/+1
2020-01-09Add `const_trait_impl` feature gateDylan MacKenzie-0/+1
2020-01-08span_to_lines: account for DUMMY_SPMazdak Farrokhzad-2/+3
2020-01-06Improve hygiene of `newtype_index`Matthew Jasper-1/+0
Also add unit tests
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-03Auto merge of #67768 - wesleywiser:dnm_test_perf_65244, r=Mark-Simulacrumbors-2/+0
Revert #65244 for performance reasons This reverts commit f35517ee861dc012ccc26083dd4520045e2c4f6f. Revert #65244 so we can see if it is the cause of the performance issue in #67706 cc https://github.com/rust-lang/rust/issues/67644
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-31Revert "core: add IntoFuture trait and support for await"Wesley Wiser-2/+0
This reverts commit f35517ee861dc012ccc26083dd4520045e2c4f6f.
2019-12-30Make things build againVadim Petrochenkov-2/+2
2019-12-30Rename directories for some crates from `syntax_x` to `rustc_x`Vadim Petrochenkov-0/+5794
`syntax_expand` -> `rustc_expand` `syntax_pos` -> `rustc_span` `syntax_ext` -> `rustc_builtin_macros`