diff options
| author | bors <bors@rust-lang.org> | 2022-01-31 11:24:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-01-31 11:24:03 +0000 |
| commit | 86f5e177bca8121e1edc9864023a8ea61acf9034 (patch) | |
| tree | feaed126198ded6aecf5af5512277c1acff222f0 /compiler/rustc_trait_selection/src/traits/codegen.rs | |
| parent | 415c9f95884caebd0be9b837ef0885d1ffde1b9b (diff) | |
| parent | 2070b221163760b7ed86d511082af72d3de4ce06 (diff) | |
| download | rust-86f5e177bca8121e1edc9864023a8ea61acf9034.tar.gz rust-86f5e177bca8121e1edc9864023a8ea61acf9034.zip | |
Auto merge of #93498 - matthiaskrgr:rollup-k5shwrc, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #90277 (Improve terminology around "after typeck") - #92918 (Allow eliding GATs in expression position) - #93039 (Don't suggest inaccessible fields) - #93155 (Switch pretty printer to block-based indentation) - #93214 (Respect doc(hidden) when suggesting available fields) - #93347 (Make `char::DecodeUtf16::size_hist` more precise) - #93392 (Clarify documentation on char::MAX) - #93444 (Fix some CSS warnings and errors from VS Code) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/codegen.rs')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/codegen.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/codegen.rs b/compiler/rustc_trait_selection/src/traits/codegen.rs index 848aba7c912..759bc696981 100644 --- a/compiler/rustc_trait_selection/src/traits/codegen.rs +++ b/compiler/rustc_trait_selection/src/traits/codegen.rs @@ -18,7 +18,6 @@ use rustc_middle::ty::{self, TyCtxt}; /// that type check should guarantee to us that all nested /// obligations *could be* resolved if we wanted to. /// -/// Assumes that this is run after the entire crate has been successfully type-checked. /// This also expects that `trait_ref` is fully normalized. pub fn codegen_fulfill_obligation<'tcx>( tcx: TyCtxt<'tcx>, @@ -101,7 +100,7 @@ pub fn codegen_fulfill_obligation<'tcx>( /// Finishes processes any obligations that remain in the /// fulfillment context, and then returns the result with all type /// variables removed and regions erased. Because this is intended -/// for use after type-check has completed, if any errors occur, +/// for use outside of type inference, if any errors occur, /// it will panic. It is used during normalization and other cases /// where processing the obligations in `fulfill_cx` may cause /// type inference variables that appear in `result` to be @@ -124,7 +123,10 @@ where if !errors.is_empty() { infcx.tcx.sess.delay_span_bug( rustc_span::DUMMY_SP, - &format!("Encountered errors `{:?}` resolving bounds after type-checking", errors), + &format!( + "Encountered errors `{:?}` resolving bounds outside of type inference", + errors + ), ); } |
