about summary refs log tree commit diff
path: root/src/librustc_passes/stability.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-697/+0
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-08Eliminate the `SessionGlobals` from `librustc_ast`.Nicholas Nethercote-8/+5
By moving `{known,used}_attrs` from `SessionGlobals` to `Session`. This means they are accessed via the `Session`, rather than via TLS. A few `Attr` methods and `librustc_ast` functions are now methods of `Session`. All of this required passing a `Session` to lots of functions that didn't already have one. Some of these functions also had arguments removed, because those arguments could be accessed directly via the `Session` argument. `contains_feature_attr()` was dead, and is removed. Some functions were moved from `librustc_ast` elsewhere because they now need to access `Session`, which isn't available in that crate. - `entry_point_type()` --> `librustc_builtin_macros` - `global_allocator_spans()` --> `librustc_metadata` - `is_proc_macro_attr()` --> `Session`
2020-07-20Migrate rustc_depr uses to use deprecation attributeMark Rousskov-53/+75
This should not be a change in behavior.
2020-07-15Introduce restricted-std feature.Eric Huss-1/+2
2020-07-15Add and use more static symbols.Nicholas Nethercote-1/+1
Note that the output of `unpretty-debug.stdout` has changed. In that test the hash values are normalized from a symbol numbers to small numbers like "0#0" and "0#1". The increase in the number of static symbols must have caused the original numbers to contain more digits, resulting in different pretty-printing prior to normalization.
2020-07-05Use for<'tcx> fn pointers in Providers, instead of having Providers<'tcx>.Eduard-Mihai Burtescu-1/+1
2020-07-03Use 'tcx for references to AccessLevels wherever possible.Eduard-Mihai Burtescu-4/+4
2020-06-27use LocalDefId in module checkingBastian Kauschke-2/+2
2020-04-28Use the query system to allocate.Camille GILLOT-1/+1
2020-04-24fix a couple more uses of def_kindmark-1/+1
2020-04-24Remove redundant `descr`/`descriptive_variant` methods from HIR.Eduard-Mihai Burtescu-10/+12
2020-04-16don't clone types that are copy (clippy::clone_on_copy)Matthias Krüger-1/+1
2020-04-03Minor follow-up after renaming librustc(_middle)Yuki Okushi-1/+1
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-5/+5
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-5/+5
2020-03-30rustc -> rustc_middle part 1Mazdak Farrokhzad-1/+1
2020-03-20remove redundant returns (clippy::needless_return)Matthias Krüger-1/+1
2020-03-16use direct imports for `rustc::{lint, session}`.Mazdak Farrokhzad-3/+3
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-6/+6
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-3/+3
2020-03-14Make downstream crates compile.Camille GILLOT-1/+1
2020-03-06fix various typosMatthias Krüger-1/+1
2020-03-01Rollup merge of #69569 - matthiaskrgr:nonminimal_bool, r=mark-SimulacrumDylan DPC-1/+1
simplify boolean expressions
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-29simplify boolean expressionsMatthias Krüger-1/+1
2020-02-24parser: tweak item kind wordingMazdak Farrokhzad-1/+1
2020-02-20Auto merge of #69072 - ecstatic-morse:associated-items, r=petrochenkovbors-2/+2
O(log n) lookup of associated items by name Resolves #68957, in which compile time is quadratic in the number of associated items. This PR makes name lookup use binary search instead of a linear scan to improve its asymptotic performance. As a result, the pathological case from that issue now runs in 8 seconds on my local machine, as opposed to many minutes on the current stable. Currently, method resolution must do a linear scan through all associated items of a type to find one with a certain name. This PR changes the result of the `associated_items` query to a data structure that preserves the definition order of associated items (which is used, e.g., for the layout of trait object vtables) while adding an index of those items sorted by (unhygienic) name. When doing name lookup, we first find all items with the same `Symbol` using binary search, then run hygienic comparison to find the one we are looking for. Ideally, this would be implemented using an insertion-order preserving, hash-based multi-map, but one is not readily available. Someone who is more familiar with identifier hygiene could probably make this better by auditing the uses of the `AssociatedItems` interface. My goal was to preserve the current behavior exactly, even if it seemed strange (I left at least one FIXME to this effect). For example, some places use comparison with `ident.modern()` and some places use `tcx.hygienic_eq` which requires the `DefId` of the containing `impl`. I don't know whether those approaches are equivalent or which one should be preferred.
2020-02-19Make lookup of associated item by name O(log n)Dylan MacKenzie-2/+2
2020-02-18Propagate `rustc_const_unstable` to childrenDylan MacKenzie-11/+54
2020-02-18Use early return when forbidding unstable attrsDylan MacKenzie-117/+129
2020-02-16Other crates.Camille GILLOT-1/+1
2020-02-11Run RustFmtjumbatm-4/+4
2020-02-11Invert control in struct_lint_level.jumbatm-8/+6
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-02-08Make `associated_items` query return a sliceJonas Schievink-0/+1
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-1/+1
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-01-27don't clone types that are copy, round two.Matthias Krüger-2/+2
2020-01-18remove rustc_error_codes deps except in rustc_driverMazdak Farrokhzad-2/+0
2020-01-17Use named fields for `hir::ItemKind::Impl`Dylan MacKenzie-5/+5
2020-01-16don't clone types that are copyMatthias Krüger-1/+1
found via clippy
2020-01-11simplify feature_err importsMazdak Farrokhzad-1/+1
2020-01-10nix syntax::errors & prefer rustc_errors over errorsMazdak Farrokhzad-1/+1
2020-01-08normalize rustc::hir::intravisit importsMazdak Farrokhzad-1/+1
2020-01-08intravisit: abstract over HIR MapMazdak Farrokhzad-3/+10
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-0/+1
- remove syntax::{help!, span_help!, span_note!} - remove unused syntax::{struct_span_fatal, struct_span_err_or_warn!, span_err_or_warn!} - lintify check_for_bindings_named_same_as_variants + conflicting_repr_hints - inline syntax::{struct_span_warn!, diagnostic_used!} - stringify_error_code! -> error_code! & use it more. - find_plugin_registrar: de-fatalize an error - de-fatalize metadata errors - move type_error_struct! to rustc_typeck - struct_span_err! -> rustc_errors
2020-01-07Rename traits::drop -> traits::misc.Camille GILLOT-1/+1
2020-01-07Move magic traits queries to rustc::traits::drop.Camille GILLOT-1/+2
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-3/+4
2020-01-04canonicalize FxHash{Map,Set} importsMazdak Farrokhzad-1/+1
2020-01-02Normalize `syntax::symbol` imports.Mazdak Farrokhzad-1/+1