| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
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
|
|
The only two uses of the associated methods are in librustc_mir and
librustdoc. Please tell me if there is a better choice.
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rustc::traits::object_safety::{astconv_object_safety_violations,is_vtable_safe_method,object_safety_violations} free functions.
|
|
rustc::traits::error_reporting::{recursive_type_with_infinite_size_error, report_object_safety_error} free functions.
|
|
note_and_explain_region} free functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Improve hygiene of `newtype_index`
`newtype_index` no longer needs `rustc_index::vec::Idx` to be in scope.
r? @Centril
|
|
Stabilise vec::remove_item
Closes #40062
r? @alexcrichton
|
|
Also add unit tests
|
|
|
|
Nix `rustc_hir` reexports in rustc::hir
r? @Zoxc cc @Mark-Simulacrum
|
|
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
|
|
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.
|
|
Consts now have a `fmt::Display` impl, so we can just use that to pretty-print.
|
|
This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
|
|
|
|
|
|
|
|
|
|
Co-Authored-By: Wesley Wiser <wwiser@gmail.com>
|
|
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.
|
|
|
|
Add backticks to various diagnostics
|
|
|
|
|
|
|
|
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
|
|
|