about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
AgeCommit message (Collapse)AuthorLines
2020-10-06Address review commentsMatthew Jasper-4/+37
2020-10-06Fix ICEMatthew Jasper-4/+5
2020-10-06Fix tests and bootstrapMatthew Jasper-8/+16
2020-10-06Ensure that associated types for trait objects satisfy their boundsMatthew Jasper-13/+51
2020-10-06Move some code from rustc_typeck to rustc_trait_selectionMatthew Jasper-0/+56
2020-10-06Remove unused part of return value from `replace_bound_vars_with_placeholders`Matthew Jasper-6/+6
2020-10-06Check associated type bounds for object safety violationsMatthew Jasper-39/+62
2020-10-06Check opaque types satisfy their boundsMatthew Jasper-1/+2
2020-10-06Check projections are well-formed when using projection candidatesMatthew Jasper-26/+43
2020-10-06Make projection wf check the predicates for the projectionMatthew Jasper-11/+25
2020-10-06Split bounds from predicatesMatthew Jasper-13/+14
2020-10-06Rename projection_predicates to item_boundsMatthew Jasper-8/+4
2020-10-06Rollup merge of #77559 - camelid:fix-rustdoc-warnings-invalid-rust-syntax, ↵Yuki Okushi-3/+3
r=lcnr Fix rustdoc warnings about invalid Rust syntax
2020-10-05FixupCamelid-4/+1
2020-10-05Auto merge of #77171 - VFLashM:better_sso_structures, r=oli-obkbors-3/+3
Better sso structures This change greatly expands interface of MiniSet/MiniMap and renames them because they are no longer "Mini".
2020-10-05query_name_of_opt_const_arg -> query_name_opt_const_argBastian Kauschke-2/+2
2020-10-04Fix rustdoc warnings about invalid Rust syntaxCamelid-2/+5
2020-10-05Rollup merge of #77514 - scottmcm:less-once-chain-once, r=estebankDylan DPC-2/+3
Replace some once(x).chain(once(y)) with [x, y] IntoIter Now that we have by-value array iterators that are [already used](https://github.com/rust-lang/rust/blob/25c8c53dd994acb3f4f7c02fe6bb46076393f8b0/compiler/rustc_hir/src/def.rs#L305-L307)... For example, ```diff - once(self.type_ns).chain(once(self.value_ns)).chain(once(self.macro_ns)).filter_map(|it| it) + IntoIter::new([self.type_ns, self.value_ns, self.macro_ns]).filter_map(|it| it) ```
2020-10-05Rollup merge of #75928 - JulianKnodt:non_utf8, r=estebankDylan DPC-0/+5
Remove trait_selection error message in specific case In the case that a trait is not implemented for an ADT with type errors, cancel the error. Fixes #75627
2020-10-04cleanup WithOptConstParam queriesBastian Kauschke-12/+2
2020-10-03Replace some once(x).chain(once(y)) with [x, y] IntoIterScott McMurray-2/+3
Now that we have by-value array iterators...
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-26MiniSet/MiniMap moved and renamed into SsoHashSet/SsoHashMapValerii Lashmanov-3/+3
It is a more descriptive name and with upcoming changes there will be nothing "mini" about them.
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