about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2020-01-08review comment: wordingEsteban Küber-6/+8
2020-01-08Point at the def span of trait refs E0277Esteban Küber-6/+37
2020-01-08review commentsEsteban Küber-17/+23
2020-01-08Point at opaque and closure type definitions in type errorsEsteban Küber-5/+92
2020-01-09Rollup merge of #67781 - cjgillot:passes-const, r=oli-obkYuki Okushi-158/+0
Move `is_min_const_fn` query to librustc_mir. The only two uses of the associated methods are in `librustc_mir` and `librustdoc`. Please tell me if there is a better choice. cc #65031
2020-01-08Move `is_min_const_fn` query to librustc_mir.Camille GILLOT-2/+0
The only two uses of the associated methods are in librustc_mir and librustdoc. Please tell me if there is a better choice.
2020-01-08Move constness.rs to librustc_mir.Camille GILLOT-156/+0
2020-01-08Display more informative ICEYuki Okushi-5/+9
2020-01-08- remove syntax::{span_warn!, span_err!, span_fatal!. struct_err!}Mazdak Farrokhzad-50/+69
- 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-2/+2
2020-01-07Move magic traits queries to rustc::traits::drop.Camille GILLOT-199/+205
2020-01-07Move required_region_bounds to rustc::infer::opaque_types.Camille GILLOT-68/+70
2020-01-07Move free_region_map to rustc::ty.Camille GILLOT-5/+5
2020-01-07Move structural_match to rustc::traits.Camille GILLOT-5/+4
2020-01-07Move ty::wf to traits.Camille GILLOT-5/+7
2020-01-07Make traits::util::* free functions.Camille GILLOT-166/+175
2020-01-07Move subst_and_normalize_erasing_regionsto rustc::ty.Camille GILLOT-26/+24
2020-01-07Move normalize_erasing_regions to rustc::ty.Camille GILLOT-1/+1
2020-01-07Make ↵Camille GILLOT-47/+50
rustc::traits::object_safety::{astconv_object_safety_violations,is_vtable_safe_method,object_safety_violations} free functions.
2020-01-07Make ↵Camille GILLOT-56/+55
rustc::traits::error_reporting::{recursive_type_with_infinite_size_error, report_object_safety_error} free functions.
2020-01-07Make rustc::infer::error_reporting::{note_and_explain_free_region, ↵Camille GILLOT-125/+164
note_and_explain_region} free functions.
2020-01-07Remove private methods from TyCtxt impl block: rustc::ty::print::pretty.Camille GILLOT-16/+16
2020-01-07Remove private methods from TyCtxt impl block: rustc::ty::outlives.Camille GILLOT-27/+23
2020-01-07Remove trivial function.Camille GILLOT-6/+2
2020-01-07Remove private methods from TyCtxt impl block: rustc::trait::object_safety.Camille GILLOT-501/+508
2020-01-07Remove private methods from TyCtxt impl block: rustc::middle::stability.Camille GILLOT-25/+23
2020-01-07Remove private methods from TyCtxt impl block: rustc::infer::error_reporting.Camille GILLOT-108/+109
2020-01-07Rollup merge of #67909 - varkor:obsolete-const-print, r=davidtwcoYuki Okushi-12/+5
Fix ICE in const pretty printing and resolve FIXME Consts now have a `fmt::Display` impl, so we can just use that to pretty-print. This resolves an ICE in https://github.com/rust-lang/rust/issues/61936, though it hits more ICEs afterwards. I couldn't find a test case that was resolved by this that didn't hit errors later on.
2020-01-07Rollup merge of #67898 - matthewjasper:newtype-index-hygiene, r=CentrilYuki Okushi-2/+1
Improve hygiene of `newtype_index` `newtype_index` no longer needs `rustc_index::vec::Idx` to be in scope. r? @Centril
2020-01-07Rollup merge of #67727 - Dylan-DPC:stabilise/remove_item, r=alexcrichtonYuki Okushi-1/+0
Stabilise vec::remove_item Closes #40062 r? @alexcrichton
2020-01-06Improve hygiene of `newtype_index`Matthew Jasper-2/+1
Also add unit tests
2020-01-06remove usage of feature gatedylan_DPC-1/+0
2020-01-06Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisabors-283/+262
Nix `rustc_hir` reexports in rustc::hir r? @Zoxc cc @Mark-Simulacrum
2020-01-06Rollup merge of #67906 - varkor:silence-toogeneric, r=nagisaDylan DPC-0/+6
Silence `TooGeneric` error This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later. Fixes https://github.com/rust-lang/rust/issues/66962. r? @eddyb
2020-01-06Rollup merge of #67800 - Aaron1011:fix/mir-generic-instance, r=oli-obkDylan DPC-2/+27
Fix ICE involving calling `Instance.ty` during const evaluation Fixes #67639 `Instance.ty` assumes that we are in a fully monomorphic context (e.g. codegen), and can therefore use an empty `ParamEnv` when performing normalization. Howver, the MIR constant evaluator code ends up calling `Instance.ty` as a result of us attemptign to 'speculatively' const-evaluate generic functions during const propagation. As a result, we may end up with projections involving type parameters (e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize. Normalization expects us to have proper predicates in the `ParamEnv` for such projections, and will ICE if we don't. This commit adds a new method `Instance.ty_env`, which takes a `ParamEnv` for use during normalization. The MIR const-evaluator code is changed to use this method, passing in the proper `ParamEnv` for the context at hand.
2020-01-06Fix ICE in const pretty printing and resolve FIXMEvarkor-12/+5
Consts now have a `fmt::Display` impl, so we can just use that to pretty-print.
2020-01-05Silence `TooGeneric` errorvarkor-0/+6
This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
2020-01-05Fix typoAaron Hill-1/+1
2020-01-05Rename Instance.ty to Instance.monomorphic_tyAaron Hill-7/+3
2020-01-05s/projections/params/Aaron Hill-1/+1
2020-01-05Run rustfmtAaron Hill-1/+2
2020-01-05Change 'panic!' to 'bug!'Aaron Hill-1/+1
Co-Authored-By: Wesley Wiser <wwiser@gmail.com>
2020-01-05Fix ICE involving calling `Instance.ty` during const evaluationAaron Hill-0/+28
Fixes #67639 `Instance.ty` assumes that we are in a fully monomorphic context (e.g. codegen), and can therefore use an empty `ParamEnv` when performing normalization. Howver, the MIR constant evaluator code ends up calling `Instance.ty` as a result of us attemptign to 'speculatively' const-evaluate generic functions during const propagation. As a result, we may end up with projections involving type parameters (e.g. <T as MyTrait>::Bar>) in the type we are trying to normalize. Normalization expects us to have proper predicates in the `ParamEnv` for such projections, and will ICE if we don't. This commit adds a new method `Instance.ty_env`, which takes a `ParamEnv` for use during normalization. The MIR const-evaluator code is changed to use this method, passing in the proper `ParamEnv` for the context at hand.
2020-01-05Correctly check for opaque types in `assoc_ty_def`Matthew Jasper-1/+1
2020-01-05Rollup merge of #67881 - varkor:scattering-of-backticks, r=CentrilDylan DPC-10/+10
Add backticks to various diagnostics
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-271/+261
2020-01-05librustc/hir.rs -> librustc/hir/mod.rsMazdak Farrokhzad-0/+0
2020-01-05simplify reexports in rustc::hirMazdak Farrokhzad-12/+1
2020-01-05Auto merge of #67777 - Zoxc:time-refactor, r=wesleywiserbors-154/+15
Use self profile infrastructure for -Z time and -Z time-passes There's no longer indentation for -Z time and -Z time-passes and duplicate timers between self profiling and -Z time-passes have been removed. r? @wesleywiser
2020-01-05Use self profile infrastructure for -Z time and -Z time-passesJohn Kåre Alsaker-154/+15