about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/codegen.rs
AgeCommit message (Collapse)AuthorLines
2022-12-08Move codegen_select_candidate to a rustc_traitsMichael Goulet-88/+0
2022-12-06Avoid noting cause code (which is usually misc, b/c codegen) for opaque type ↵Michael Goulet-1/+1
reveal overflow
2022-11-25get rid of to_poly_trait_predicateOli Scherer-2/+1
2022-11-16Convert predicates into Predicate in the Obligation constructorOli Scherer-1/+1
2022-10-07Change InferCtxtBuilder from enter to buildCameron Steffen-46/+47
2022-10-07Introduce TypeErrCtxtCameron Steffen-2/+2
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't need to.
2022-09-19Make cycle errors recoverableJoshua Nelson-0/+10
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
2022-09-09rename `codegen_fulfill_obligation`lcnr-1/+1
2022-09-01tracing::instrument cleanupOli Scherer-2/+0
2022-08-03Rollup merge of #99746 - compiler-errors:more-trait-engine, r=jackh726Matthias Krüger-2/+2
Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot` Not sure if this change is worthwhile, but couldn't hurt re: chalkification r? types
2022-08-02Rollup merge of #99156 - lcnr:omoe-wa, r=wesleywiserMatthias Krüger-2/+0
`codegen_fulfill_obligation` expect erased regions it's a query, so by erasing regions before calling it, we get better caching. This doesn't actually change anything as its already the status quo.
2022-07-26Use TraitEngine in more places that don't specifically need ↵Michael Goulet-2/+2
FulfillmentCtxt::new_in_snapshot
2022-07-21move `considering_regions` to the infcxlcnr-1/+3
2022-07-20take opaq typesouz-a-3/+6
2022-07-11cg_fulfill_obligation: expect erased regionslcnr-2/+0
2022-05-11Gracefully fail to resolve associated items instead of `delay_span_bug`.Camille GILLOT-75/+16
2022-03-31Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errorsDylan DPC-2/+2
Spellchecking compiler comments This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30Spellchecking compiler commentsYuri Astrakhan-2/+2
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2022-03-30Don't ICE when opaque types get their hidden type constrained again.Oli Scherer-13/+6
Contrary to popular belief, `codegen_fulfill_obligation` does not get used solely in codegen, so we cannot rely on `param_env` being set to RevealAll and thus revealing the hidden types instead of constraining them.
2022-03-28Fail more aggressivelyOli Scherer-4/+5
2022-03-28Revert "Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk"Oli Scherer-0/+5
This reverts commit 6499c5e7fc173a3f55b7a3bd1e6a50e9edef782d, reversing changes made to 78450d2d602b06d9b94349aaf8cece1a4acaf3a8.
2022-03-16rustc_error: make ErrorReported impossible to constructmark-4/+4
There are a few places were we have to construct it, though, and a few places that are more invasive to change. To do this, we create a constructor with a long obvious name.
2022-03-02rename ErrorReported -> ErrorGuaranteedmark-4/+4
2022-02-18Rollup merge of #93024 - compiler-errors:inline-mir-bad-bounds, r=estebankMatthias Krüger-0/+2
Do not ICE when inlining a function with un-satisfiable bounds Fixes #93008 This is kinda a hack... but it's the fix I thought had the least blast-radius. We use `normalize_param_env_or_error` to verify that the predicates in the param env are self-consistent, since with RevealAll, a bad predicate like `<&'static () as Clone>` will be evaluated with an empty ParamEnv (since it references no generics), and we'll raise an error for it.
2022-02-11Revert "Auto merge of #92007 - oli-obk:lazy_tait2, r=nikomatsakis"Oli Scherer-5/+0
This reverts commit e7cc3bddbe0d0e374d05e7003e662bba1742dbae, reversing changes made to 734368a200904ef9c21db86c595dc04263c87be0.
2022-02-09Ensure that queries only return Copy types.Camille GILLOT-2/+2
2022-02-02Fix some doctests where the main function returns an opaque typeOli Scherer-0/+5
2022-01-31Rollup merge of #90277 - pierwill:fix-70258-inference-terms, r=jackh726Matthias Krüger-3/+5
Improve terminology around "after typeck" Closes #70258.
2022-01-17Fix Inline MIR pass on a function with un-satisfiable boundsMichael Goulet-0/+2
2021-12-15Remove `in_band_lifetimes` from `rustc_trait_selection`Sylvan Bowdler-1/+1
2021-11-08Make select_* methods return Vec for TraitEngineDeadbeef-1/+2
2021-11-06Improve terminology around "after typeck"pierwill-3/+5
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-02-13Use debug log level for developer oriented logsTomasz Miąsko-1/+1
The information logged here is of limited general interest, while at the same times makes it impractical to simply enable logging and share the resulting logs due to the amount of the output produced. Reduce log level from info to debug for developer oriented information. For example, when building cargo, this reduces the amount of logs generated by `RUSTC_LOG=info cargo build` from 265 MB to 79 MB. Continuation of changes from 81350.
2020-11-16compiler: fold by valueBastian Kauschke-4/+4
2020-10-23review commentsEsteban Küber-1/+4
2020-10-18Move orphan module-name/mod.rs files into module-name.rs filesest31-0/+129