about summary refs log tree commit diff
path: root/src/librustc_span
AgeCommit message (Collapse)AuthorLines
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-1/+1
2020-03-05Remove eh_unwind_resume lang itemAmanieu d'Antras-2/+0
2020-03-05Add a new test to reach const_limit setting, although with wrong WARNINGs yetChristoph Schmidler-1/+1
rename feature to const_eval_limit
2020-03-05Prepare const_limit feature gate and attributeChristoph Schmidler-0/+1
2020-03-03use conditions directlyMatthias Krüger-1/+1
2020-03-03Use .next() instead of .nth(0) on iterators.Matthias Krüger-3/+3
2020-03-01Rollup merge of #69580 - matthiaskrgr:map_clone, r=CentrilYuki Okushi-1/+1
use .copied() instead of .map(|x| *x) on iterators
2020-03-01Auto merge of #69592 - petrochenkov:nosyntax, r=Centrilbors-1/+1
Rename `libsyntax` to `librustc_ast` This was the last rustc crate that wasn't following the `rustc_*` naming convention. Follow-up to https://github.com/rust-lang/rust/pull/67763.
2020-02-29Rollup merge of #69572 - matthiaskrgr:try_err_and_iter_on_ref, r=CentrilDylan DPC-2/+2
use .iter() instead of .into_iter() on references
2020-02-29Make it build againVadim Petrochenkov-1/+1
2020-02-29use .copied() instead of .map(|x| *x) on iteratorsMatthias Krüger-1/+1
2020-02-29use .iter() instead of .into_iter() on references.Matthias Krüger-2/+2
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-1/+1
2020-02-27Remove spotlight usageGuillaume Gomez-2/+0
2020-02-26rustc_span: Add `Symbol::to_ident_string` for use in diagnostic messagesVadim Petrochenkov-0/+8
2020-02-26Rollup merge of #69387 - petrochenkov:idprint, r=Mark-SimulacrumDylan DPC-8/+59
Deduplicate identifier printing a bit https://github.com/rust-lang/rust/pull/67010 introduced a couple more subtly different ways to print an identifier. This PR attempts to restore the order. The most basic identifier printing interface is `Formatter`-based now, so `String`s are not allocated unless required. r? @Mark-Simulacrum
2020-02-23Deduplicate identifier printing a bitVadim Petrochenkov-8/+59
2020-02-22Rename CodeMap to SourceMap follow upMaxim Zholobak-4/+4
2020-02-20Rollup merge of #69266 - Zoxc:fix-source-map-race, r=wesleywiserDylan DPC-19/+47
Fix race condition when allocating source files in SourceMap This makes allocating address space in the source map an atomic operation. `rustc` does not currently do this in parallel, so this bug can't trigger, but parsing files in parallel could trigger it, and that is something we want to do. Fixes https://github.com/rust-lang/rust/issues/69261. r? @wesleywiser
2020-02-20Auto merge of #69256 - nnethercote:misc-inlining, r=Centrilbors-0/+2
Miscellaneous inlining improvements These commits inline some hot functions that aren't currently inlined, for some speed wins. r? @Centril
2020-02-18Fix race condition when allocating source files in SourceMapJohn Kåre Alsaker-19/+47
2020-02-18Inline `Symbol::decode` and `Interner::intern`.Nicholas Nethercote-0/+2
2020-02-15parser: `macro_rules` is a weak keywordVadim Petrochenkov-1/+4
2020-02-11Auto merge of #68491 - pnkfelix:hide-niches-under-unsafe-cell, r=olibors-0/+2
Hide niches under UnsafeCell Hide any niche of T from type-construction context of `UnsafeCell<T>`. Fix #68303 Fix #68206
2020-02-11Rollup merge of #66498 - bjorn3:less_feature_flags, r=Dylan-DPCDylan DPC-2/+0
Remove unused feature gates I think many of the remaining unstable things can be easily be replaced with stable things. I have kept the `#![feature(nll)]` even though it is only necessary in `libstd`, to make regressions of it harder.
2020-02-10Add `#[repr(no_niche)]`.Felix S. Klock II-0/+2
This repr-hint makes a struct/enum hide any niche within from its surrounding type-construction context. It is meant (at least initially) as an implementation detail for resolving issue 68303. We will not stabilize the repr-hint unless someone finds motivation for doing so. (So, declaration of `no_niche` feature lives in section of file where other internal implementation details are grouped, and deliberately leaves out the tracking issue number.) incorporated review feedback, and fixed post-rebase.
2020-02-09Update for #68718bjorn3-0/+1
2020-02-09Auto merge of #68975 - Dylan-DPC:rollup-jzab8oh, r=Dylan-DPCbors-1/+220
Rollup of 7 pull requests Successful merges: - #68718 (Move `rustc_hir::def_id` to `rustc_span::def_id`) - #68834 (Fix and test implementation of BTreeMap's first/last_entry, pop_first/last) - #68857 (perf: Reduce Vec allocations in normalization by passing &mut Vec) - #68918 (Don't use the word "unwrap" to describe "unwrap" methods) - #68946 (Mark several functions and methods in core::cmp as #[must_use]) - #68958 (Clean up E0277 and E0282 explanations) - #68960 (codegen: misc cleanups around debuginfo scopes and locations.) Failed merges: r? @ghost
2020-02-09Auto merge of #68376 - Centril:move-ref-patterns, r=matthewjasperbors-0/+1
Initial implementation of `#![feature(move_ref_pattern)]` Following up on #45600, under the gate `#![feature(move_ref_pattern)]`, `(ref x, mut y)` is allowed subject to restrictions necessary for soundness. The match checking implementation and tests for `#![feature(bindings_after_at)]` is also adjusted as necessary. Closes #45600. Tracking issue: #68354. r? @matthewjasper
2020-02-09Rollup merge of #68718 - Aaron1011:move-def-hir-span, r=petrochenkovDylan DPC-1/+220
Move `rustc_hir::def_id` to `rustc_span::def_id` This will allow `HygieneData` to refer to `DefId` and `DefIndex`, which will enable proper serialization of Span hygiene information. This also reduces the number of things imported from `rustc_hir`, which might make it easier to remove dependencies on it.
2020-02-08Move librustc_hir/def_id.rs to librustc_span/def_id.rsAaron Hill-1/+220
For noww, librustc_hir re-exports the `def_id` module from librustc_span, so the rest of rustc can continue to reference rustc_hir::def_id
2020-02-07Rollup merge of #68164 - tmiasko:no-sanitize, r=nikomatsakisDylan DPC-0/+4
Selectively disable sanitizer instrumentation Add `no_sanitize` attribute that allows to opt out from sanitizer instrumentation in an annotated function.
2020-02-07Remove unused feature gates from libsyntax_posbjorn3-3/+0
2020-02-06rustc_errors: split macro backtrace rendering from <*macros> hacks.Eduard-Mihai Burtescu-8/+0
2020-02-05Selectively disable sanitizer instrumentationTomasz Miąsko-0/+4
Add `no_sanitize` attribute that allows to opt out from sanitizer instrumentation in an annotated function.
2020-02-04Implement remaining `unchecked` arithmetic intrinsicsDylan MacKenzie-0/+5
2020-02-02introduce `#![feature(move_ref_pattern)]`Mazdak Farrokhzad-0/+1
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.