summary refs log tree commit diff
path: root/src/test/ui/specialization
AgeCommit message (Collapse)AuthorLines
2022-08-05Auto merge of #95977 - FabianWolff:issue-92790-dead-tuple, r=estebankbors-2/+2
Warn about dead tuple struct fields Continuation of #92972. Fixes #92790. The language team has already commented on this in https://github.com/rust-lang/rust/pull/92972#issuecomment-1021511970; I have incorporated their requests here. Specifically, there is now a new allow-by-default `unused_tuple_struct_fields` lint (name bikesheddable), and fields of unit type are ignored (https://github.com/rust-lang/rust/pull/92972#issuecomment-1021815408), so error messages look like this: ``` error: field is never read: `1` --> $DIR/tuple-struct-field.rs:6:21 | LL | struct Wrapper(i32, [u8; LEN], String); | ^^^^^^^^^ | help: change the field to unit type to suppress this warning while preserving the field numbering | LL | struct Wrapper(i32, (), String); | ~~ ``` r? `@joshtriplett`
2022-08-03Warn about dead tuple struct fieldsFabian Wolff-2/+2
2022-08-03Delay a bug when failed to normalize trait ref during specializationMichael Goulet-0/+58
2022-07-15remove `impl_implied_bounds` from `FnCtxt`lcnr-5/+3
2022-07-07Track implicit `Sized` obligations in type paramsEsteban Küber-2/+2
Suggest adding a `?Sized` bound if appropriate on E0599 by inspecting the HIR Generics. (Fix #98539)
2022-07-01Improve spans for specialization errorMichael Goulet-11/+11
2022-07-01Shorten def_span for more items.Camille GILLOT-177/+96
2022-06-26Add regression test for #79224Yuki Okushi-0/+53
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2022-06-25Rollup merge of #98298 - TaKO8Ki:point-to-type-param-definition, ↵Matthias Krüger-2/+2
r=compiler-errors Point to type parameter definition when not finding variant, method and associated item fixes #77391
2022-06-22point to type param definition when not finding variant, method and assoc typeTakayuki Maeda-2/+2
use `def_ident_span` , `body_owner_def_id` instead of `in_progress_typeck_results`, `guess_head_span` use `body_id.owner` directly add description to label
2022-06-16 fix one more case of trailing spaceklensy-1/+1
2022-06-11Handle empty where-clause betterMichael Goulet-1/+1
2022-04-05Rollup merge of #95525 - ohno418:suggest-derivable-trait-E0277, ↵Dylan DPC-0/+4
r=compiler-errors Suggest derivable trait on E0277 error Closes https://github.com/rust-lang/rust/issues/95099 .
2022-04-05Suggest derivable trait on E0277ohno418-0/+4
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-2/+1
When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the following other types implement trait `Foo`: Option<T> i32 str note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` Mention implementers of traits in `ImplObligation`s. Do not mention other `impl`s for closures, ranges and `?`.
2022-03-24Properly track `ImplObligation`sEsteban Kuber-2/+1
Instead of probing for all possible impls that could have caused an `ImplObligation`, keep track of its `DefId` and obligation spans for accurate error reporting. Follow up to #89580. Addresses #89418. Remove some unnecessary clones. Tweak output for auto trait impl obligations.
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