summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
AgeCommit message (Collapse)AuthorLines
2020-11-06review commentsEsteban Küber-14/+10
2020-11-06Do not ICE with TraitPredicates containing [type error]Esteban Küber-6/+13
Fix #77919.
2020-11-06revert #75443 update mir validatorBastian Kauschke-2/+2
2020-11-06Do not ICE on invalid inputEsteban Küber-7/+13
2020-10-01Rollup merge of #77305 - lcnr:candidate_from_obligation, r=davidtwcoDylan DPC-156/+161
move candidate_from_obligation_no_cache It's only called from `candidate_from_obligation` which is already in this file.
2020-10-01Rollup merge of #77303 - lcnr:const-evaluatable-TooGeneric, r=oli-obk,varkorDylan DPC-34/+150
const evaluatable: improve `TooGeneric` handling Instead of emitting an error in `fulfill`, we now correctly stall on inference variables. As `const_eval_resolve` returns `ErrorHandled::TooGeneric` when encountering generic parameters on which we actually do want to error, we check for inference variables and eagerly emit an error if they don't exist, returning `ErrorHandled::Reported` instead. Also contains a small bugfix for `ConstEquate` where we previously only stalled on type variables. This is probably a leftover from when we did not yet support stalling on const inference variables. r? @oli-obk cc @varkor @eddyb
2020-09-28move candidate_from_obligation_no_cacheBastian Kauschke-156/+161
2020-09-28const evaluatable: improve `TooGeneric` handlingBastian Kauschke-34/+150
2020-09-26Revert "Add an unused field of type `Option<DefId>` to `ParamEnv` struct."Dylan MacKenzie-1/+1
This reverts commit ab83d372ed5b1799d418afe83c468e4c5973cc34.
2020-09-26Rollup merge of #77211 - est31:remove_unused_allow, r=oli-obkRalf Jung-2/+1
Remove unused #[allow(...)] statements from compiler/
2020-09-26Rollup merge of #77093 - lcnr:const-generics-infer-warning, r=varkorRalf Jung-16/+21
merge `need_type_info_err(_const)` I hoped that this would automatically solve #76737 but it doesn't quite seem like it fixes #77092 r? @varkor
2020-09-26rename functionsBastian Kauschke-7/+21
2020-09-26Remove unused #[allow(...)] statements from compiler/est31-2/+1
2020-09-25Rollup merge of #77155 - lcnr:ImplSource, r=ecstatic-morseJonas Schievink-41/+36
remove enum name from ImplSource variants This is quite a lot cleaner in my opinion.
2020-09-25Auto merge of #77041 - lcnr:const-eval-perf, r=ecstatic-morsebors-18/+27
perf: move cold path of `process_obligations` into a separate function cc #76575 This probably won't matter too much in the long run once #69218 is merged so we may not want to merge this. r? `@ecstatic-morse`
2020-09-25Rollup merge of #77121 - duckymirror:html-root-url, r=jyn514Jonas Schievink-1/+1
Updated html_root_url for compiler crates Closes #77103 r? @jyn514
2020-09-24perf: split progress_obligations with inline(never)Bastian Kauschke-18/+27
2020-09-24remove enum name from ImplSource variantsBastian Kauschke-41/+36
2020-09-24assign the correct `DefId` in `nominal_obligations`Bastian Kauschke-4/+16
2020-09-23/nightly/nightly-rustcErik Hofmayer-1/+1
2020-09-23Updated html_root_url for compiler cratesErik Hofmayer-1/+1
2020-09-23Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obkDylan DPC-77/+116
emit errors during AbstractConst building There changes are currently still untested, so I don't expect this to pass CI :laughing: It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this. r? @oli-obk
2020-09-23merge `need_type_info_err(_const)`Bastian Kauschke-16/+7
2020-09-22Auto merge of #76928 - lcnr:opaque-types-cache, r=tmandrybors-2/+11
cache types during normalization partially fixes #75992 reduces the following test from 14 to 3 seconds locally. cc `@Mark-Simulacrum` would it make sense to add that test to `perf`? ```rust #![recursion_limit="2048"] #![type_length_limit="112457564"] pub async fn h0(v: &String, x: &u64) { println!("{} {}", v, x) } pub async fn h1(v: &String, x: &u64) { h0(v, x).await } pub async fn h2(v: &String, x: &u64) { h1(v, x).await } pub async fn h3(v: &String, x: &u64) { h2(v, x).await } pub async fn h4(v: &String, x: &u64) { h3(v, x).await } pub async fn h5(v: &String, x: &u64) { h4(v, x).await } pub async fn h6(v: &String, x: &u64) { h5(v, x).await } pub async fn h7(v: &String, x: &u64) { h6(v, x).await } pub async fn h8(v: &String, x: &u64) { h7(v, x).await } pub async fn h9(v: &String, x: &u64) { h8(v, x).await } pub async fn h10(v: &String, x: &u64) { h9(v, x).await } pub async fn h11(v: &String, x: &u64) { h10(v, x).await } pub async fn h12(v: &String, x: &u64) { h11(v, x).await } pub async fn h13(v: &String, x: &u64) { h12(v, x).await } pub async fn h14(v: &String, x: &u64) { h13(v, x).await } pub async fn h15(v: &String, x: &u64) { h14(v, x).await } pub async fn h16(v: &String, x: &u64) { h15(v, x).await } pub async fn h17(v: &String, x: &u64) { h16(v, x).await } pub async fn h18(v: &String, x: &u64) { h17(v, x).await } pub async fn h19(v: &String, x: &u64) { h18(v, x).await } macro_rules! async_recursive { (29, $inner:expr) => { async { async_recursive!(28, $inner) }.await }; (28, $inner:expr) => { async { async_recursive!(27, $inner) }.await }; (27, $inner:expr) => { async { async_recursive!(26, $inner) }.await }; (26, $inner:expr) => { async { async_recursive!(25, $inner) }.await }; (25, $inner:expr) => { async { async_recursive!(24, $inner) }.await }; (24, $inner:expr) => { async { async_recursive!(23, $inner) }.await }; (23, $inner:expr) => { async { async_recursive!(22, $inner) }.await }; (22, $inner:expr) => { async { async_recursive!(21, $inner) }.await }; (21, $inner:expr) => { async { async_recursive!(20, $inner) }.await }; (20, $inner:expr) => { async { async_recursive!(19, $inner) }.await }; (19, $inner:expr) => { async { async_recursive!(18, $inner) }.await }; (18, $inner:expr) => { async { async_recursive!(17, $inner) }.await }; (17, $inner:expr) => { async { async_recursive!(16, $inner) }.await }; (16, $inner:expr) => { async { async_recursive!(15, $inner) }.await }; (15, $inner:expr) => { async { async_recursive!(14, $inner) }.await }; (14, $inner:expr) => { async { async_recursive!(13, $inner) }.await }; (13, $inner:expr) => { async { async_recursive!(12, $inner) }.await }; (12, $inner:expr) => { async { async_recursive!(11, $inner) }.await }; (11, $inner:expr) => { async { async_recursive!(10, $inner) }.await }; (10, $inner:expr) => { async { async_recursive!(9, $inner) }.await }; (9, $inner:expr) => { async { async_recursive!(8, $inner) }.await }; (8, $inner:expr) => { async { async_recursive!(7, $inner) }.await }; (7, $inner:expr) => { async { async_recursive!(6, $inner) }.await }; (6, $inner:expr) => { async { async_recursive!(5, $inner) }.await }; (5, $inner:expr) => { async { async_recursive!(4, $inner) }.await }; (4, $inner:expr) => { async { async_recursive!(3, $inner) }.await }; (3, $inner:expr) => { async { async_recursive!(2, $inner) }.await }; (2, $inner:expr) => { async { async_recursive!(1, $inner) }.await }; (1, $inner:expr) => { async { async_recursive!(0, $inner) }.await }; (0, $inner:expr) => { async { h19(&String::from("owo"), &0).await; $inner }.await }; } async fn f() { async_recursive!(14, println!("hello")); } fn main() { let _ = f(); } ``` r? `@eddyb` requires a perf run.
2020-09-21reviewBastian Kauschke-13/+8
2020-09-21Add an unused field of type `Option<DefId>` to `ParamEnv` struct.Bram van den Heuvel-1/+1
2020-09-19wordsBastian Kauschke-1/+1
2020-09-19wip emit errors during AbstractConst buildingBastian Kauschke-75/+119
2020-09-19cache types during normalizationBastian Kauschke-2/+11
2020-09-19Auto merge of #76886 - Aaron1011:fix/ensure-stack-predicate, r=Mark-Simulacrumbors-119/+133
Wrap recursive predicate evaluation with `ensure_sufficient_stack` I haven't been able to come up with a minimized test case for #76770, but this fixes a stack overflow in rustc as well.
2020-09-18Wrap recursive predicate evaluation with `ensure_sufficient_stack`Aaron Hill-119/+133
I haven't been able to come up with a minimized test case for #76770, but this fixes a stack overflow in rustc as well.
2020-09-18add `const-evaluatable_checked` check back inBastian Kauschke-16/+16
2020-09-18review, small cleanupBastian Kauschke-18/+21
2020-09-18document `const_evaluatable`Bastian Kauschke-3/+47
2020-09-18remove allow(warnings)Bastian Kauschke-2/+0
2020-09-18support const_evaluatable_checked across crate boundariesBastian Kauschke-1/+16
2020-09-18add function callsBastian Kauschke-0/+18
2020-09-18allow unary operations and ignore StorageLive/Dead stmtsBastian Kauschke-4/+23
2020-09-18use newtype_index for abstract_const::NodeIdBastian Kauschke-14/+10
2020-09-18refactor AbstractConstBuilderBastian Kauschke-58/+67
2020-09-18use abstract consts when unifying ConstKind::UnevaluatedBastian Kauschke-1/+41
2020-09-18initial working stateBastian Kauschke-12/+259
2020-09-16Rollup merge of #76756 - matthiaskrgr:cl123ppy, r=Dylan-DPCTyler Mandry-1/+1
fix a couple of stylistic clippy warnings namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
2020-09-16Rollup merge of #76641 - nox:pointee-random-stuff, r=eddybRalf Jung-6/+1
Some cleanup changes and commenting r? @nikomatsakis Cc @eddyb
2020-09-16Rollup merge of #75304 - Aaron1011:feature/diag-deref-move-out, r=estebankDylan DPC-1/+8
Note when a a move/borrow error is caused by a deref coercion Fixes #73268 When a deref coercion occurs, we may end up with a move error if the base value has been partially moved out of. However, we do not indicate anywhere that a deref coercion is occuring, resulting in an error message with a confusing span. This PR adds an explicit note to move errors when a deref coercion is involved. We mention the name of the type that the deref-coercion resolved to, as well as the `Deref::Target` associated type being used.
2020-09-15fix a couple of stylistic clippy warningsMatthias Krüger-1/+1
namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
2020-09-13Auto merge of #76244 - vandenheuvel:remove__paramenv__def_id, r=nikomatsakisbors-156/+39
Removing the `def_id` field from hot `ParamEnv` to make it smaller This PR addresses https://github.com/rust-lang/rust/issues/74865.
2020-09-12Clean up some language trait items comparisonsAnthony Ramine-6/+1
2020-09-10Note when a a move/borrow error is caused by a deref coercionAaron Hill-1/+8
Fixes #73268 When a deref coercion occurs, we may end up with a move error if the base value has been partially moved out of. However, we do not indicate anywhere that a deref coercion is occuring, resulting in an error message with a confusing span. This PR adds an explicit note to move errors when a deref coercion is involved. We mention the name of the type that the deref-coercion resolved to, as well as the `Deref::Target` associated type being used.
2020-09-10fix tidy, small cleanupBastian Kauschke-5/+1