about summary refs log tree commit diff
path: root/src/test/ui/specialization
AgeCommit message (Collapse)AuthorLines
2022-02-14further update `fuzzy_match_tys`lcnr-0/+2
2022-02-12Update chalk testsMatthew Jasper-10/+9
2022-01-21Override rustc version in ui and mir-opt tests to get stable hashesThe 8472-1/+1
Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so no test-dependent normalization is needed. Hashes for the standard library still change so some normalizations are still needed.
2022-01-17Update term for use in more placeskadmin-1/+1
Replace use of `ty()` on term and use it in more places. This will allow more flexibility in the future, but slightly worried it allows items which are consts which only accept types.
2021-12-13Include rustc version in `rustc_span::StableCrateId`pierwill-1/+1
Normalize symbol hashes in compiletest. Remove DefId sorting
2021-12-11Tweak assoc type obligation spansEsteban Kuber-14/+14
* Point at RHS of associated type in obligation span * Point at `impl` assoc type on projection error * Reduce verbosity of recursive obligations * Point at source of binding lifetime obligation * Tweak "required bound" note * Tweak "expected... found opaque (return) type" labels * Point at set type in impl assoc type WF errors
2021-11-20Point at `impl` blocks when they introduce unmet obligationsEsteban Kuber-2/+6
Group obligations by `impl` block that introduced them.
2021-11-20Do not mention associated items when they introduce an obligationEsteban Kuber-5/+0
2021-11-20Point at source of trait bound obligations in more placesEsteban Kuber-0/+5
Be more thorough in using `ItemObligation` and `BindingObligation` when evaluating obligations so that we can point at trait bounds that introduced unfulfilled obligations. We no longer incorrectly point at unrelated trait bounds (`substs-ppaux.verbose.stderr`). In particular, we now point at trait bounds on method calls. We no longer point at "obvious" obligation sources (we no longer have a note pointing at `Trait` saying "required by a bound in `Trait`", like in `associated-types-no-suitable-supertrait*`). Address part of #89418.
2021-11-06Move some tests to more reasonable directoriesCaio-0/+27
2021-10-05Consider unfulfilled obligations in binop errorsEsteban Kuber-0/+8
When encountering a binop where the types would have been accepted, if all the predicates had been fulfilled, include information about the predicates and suggest appropriate `#[derive]`s if possible. Point at trait(s) that needs to be `impl`emented.
2021-10-04Rollup merge of #89413 - matthewjasper:spec-marker-fix, r=nikomatsakisJubilee-0/+42
Correctly handle supertraits for min_specialization Supertraits of specialization markers could circumvent checks for min_specialization. Elaborating predicates prevents this. r? ````@nikomatsakis````
2021-10-02Consistently use 'supertrait'.Bruce Mitchener-2/+2
A subset of places referred to 'super-trait', so this changes them to all use 'supertrait'. This matches 'supertype' and some other usages. An exception is 'auto-trait' which is consistently used in that manner.
2021-09-30Elaborate predicates in min_specialization checksMatthew Jasper-0/+42
Supertraits of specialization markers could circumvent checks for min_specialization. Elaborating predicates prevents this.
2021-09-15Move some tests to more reasonable directoriesCaio-0/+55
2021-08-30`feature(const_generics)` -> `feature(const_param_types)`lcnr-2/+1
2021-08-30rename const_evaluatable_checked to generic_const_exprsEllen-1/+1
:sparkles:
2021-08-16Use note to point at bound introducing requirementEsteban Küber-24/+44
2021-08-12Use a more accurate span on assoc types WF checksEsteban Kuber-2/+2
2021-08-11Modify structured suggestion outputEsteban Küber-4/+4
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-07-16Make GATs no longer incompleteJack Huey-11/+2
2021-07-06Revert "Revert "Update tests""bjorn3-1/+1
This reverts commit 715c68fe90c6f1d0b3004ad18f16e0811f209992.
2021-06-07Revert "Update tests"bjorn3-1/+1
This reverts commit c76b1b031753fc08a18a3906d828683476c1e595.
2021-05-30Update testsbjorn3-1/+1
2021-04-23Add test for issue #51892marmeladema-0/+29
2021-04-23Add test for issue #33017marmeladema-0/+62
2021-04-12Turn old edition lints (anonymous-parameters, keyword-idents) into ↵Manish Goregaokar-1/+1
warn-by-default on 2015
2021-04-08Rollup merge of #83689 - estebank:cool-bears-hot-tip, r=davidtwcoDylan DPC-3/+15
Add more info for common trait resolution and async/await errors * Suggest `Pin::new`/`Box::new`/`Arc::new`/`Box::pin` in more cases * Point at `impl` and type defs introducing requirements on E0277
2021-04-06Point at `impl` and type defs introducing requirements on E0277Esteban Küber-3/+15
2021-04-06Remove trailing `:` from E0119 messageEsteban Küber-6/+6
2021-04-02Rollup merge of #83673 - hi-rustin:rustin-patch-suggestion, r=estebankDylan DPC-4/+4
give full path of constraint in suggest_constraining_type_param close https://github.com/rust-lang/rust/issues/83513
2021-04-01Rollup merge of #83699 - JohnTitor:issue-68830, r=Dylan-DPCDylan DPC-0/+32
Add a regression test for issue-68830 Closes #68830
2021-03-31Track bound varsJack Huey-1/+1
2021-03-31Add a regression test for issue-68830JohnTitor-0/+32
2021-03-31give full path of constraint in suggest_constraining_type_paramhi-rustin-4/+4
revert file bless with nll mode
2021-02-21reword `;` suggestions to have consistent wordingEsteban Küber-1/+1
2021-02-17In some limited cases, suggest `where` bounds for non-type paramsEsteban Küber-0/+4
Partially address #81971.
2021-01-26Avoid describing a method as 'not found' when bounds are unsatisfiedAaron Hill-4/+4
Fixes #76267 When there is a single applicable method candidate, but its trait bounds are not satisfied, we avoid saying that the method is "not found". Insted, we update the error message to directly mention which bounds are not satisfied, rather than mentioning them in a note.
2021-01-16fold_with not super_fold_with in TypeFoldable impl for PredicateJack Huey-1/+1
2021-01-16Remove PredicateKind::AtomJack Huey-1/+1
2020-12-29Remove `compile-fail` test suiteVadim Petrochenkov-2/+49
2020-11-23Rename `optin_builtin_traits` to `auto_traits`Camelid-1/+1
They were originally called "opt-in, built-in traits" (OIBITs), but people realized that the name was too confusing and a mouthful, and so they were renamed to just "auto traits". The feature flag's name wasn't updated, though, so that's what this PR does. There are some other spots in the compiler that still refer to OIBITs, but I don't think changing those now is worth it since they are internal and not particularly relevant to this PR. Also see <https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/opt-in.2C.20built-in.20traits.20(auto.20traits).20feature.20name>.
2020-10-17Suggest minimal subset features in `incomplete_features` lintYuki Okushi-0/+45
2020-10-06Update to chalk 0.31. Implement some unimplemented. Ignore some tests in ↵Jack Huey-2/+3
compare mode chalk don't finish.
2020-10-06Avoid cycles from projection boundsMatthew Jasper-29/+17
Only check the own predicates of associated types when confirming projection candidates. Also consider implied bounds when comparing trait and impl methods.
2020-10-06Check projections are well-formed when using projection candidatesMatthew Jasper-0/+101
2020-10-06Separate bounds and predicates for associated/opaque typesMatthew Jasper-7/+7
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-1/+1
2020-09-03specialization_graph: avoid trimmed paths for OverlapErrorDan Aloni-3/+3
2020-09-02pretty: trim paths of unique symbolsDan Aloni-29/+29
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.