about summary refs log tree commit diff
path: root/src/test/ui/compare-method
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-482/+0
2023-01-08Mention signature rather than fn pointers when comparing impl/trait methodsMichael Goulet-12/+12
2022-12-28Make trait/impl where clause mismatch on region error a bit more actionableMichael Goulet-0/+11
2022-09-26address reviewb-naber-3/+3
2021-12-11Tweak assoc type obligation spansEsteban Kuber-9/+15
* 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 bounds when comparing impl items to traitEsteban Kuber-26/+26
2021-11-06type error go brrrrrrrrEllen-0/+44
2021-08-11Modify structured suggestion outputEsteban Küber-1/+1
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2021-04-08Provide verbose suggestion for new output typeEsteban Küber-4/+5
2021-04-08Suggest return typeEsteban Küber-2/+20
2021-04-08Suggest changing impl parameter types to match traitEsteban Küber-2/+57
This is particularly useful for cases where arbitrary self types are used, like in custom `Future`s.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-3/+3
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.
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-2/+2
2019-11-02Update testsDmitry Kadashev-1/+4
Update the tests to reflect changes to how type mismatch errors are reported (two previous commits).
2019-09-18Add explanation to type mismatch involving type params and assoc typesEsteban Küber-0/+2
2019-03-11Update testsVadim Petrochenkov-4/+4
2018-12-25Remove licensesMark Rousskov-93/+14
2018-05-16Remove empty filesJane Lusby-0/+0
2018-03-14update testsGuillaume Gomez-8/+8
2018-02-26Update UI testsVadim Petrochenkov-28/+28
2018-02-25Update ui testsGuillaume Gomez-0/+8
2017-12-18Point at def span in "impl has stricter requirements" diagnosticEsteban Küber-25/+19
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-3/+3
2017-11-16fix error messages relating to removing lint for E0276Niko Matsakis-10/+2
2017-08-09rustc: Rearchitect lints to be emitted more eagerlyAlex Crichton-2/+2
In preparation for incremental compilation this commit refactors the lint handling infrastructure in the compiler to be more "eager" and overall more incremental-friendly. Many passes of the compiler can emit lints at various points but before this commit all lints were buffered in a table to be emitted at the very end of compilation. This commit changes these lints to be emitted immediately during compilation using pre-calculated lint level-related data structures. Linting today is split into two phases, one set of "early" lints run on the `syntax::ast` and a "late" set of lints run on the HIR. This commit moves the "early" lints to running as late as possible in compilation, just before HIR lowering. This notably means that we're catching resolve-related lints just before HIR lowering. The early linting remains a pass very similar to how it was before, maintaining context of the current lint level as it walks the tree. Post-HIR, however, linting is structured as a method on the `TyCtxt` which transitively executes a query to calculate lint levels. Each request to lint on a `TyCtxt` will query the entire crate's 'lint level data structure' and then go from there about whether the lint should be emitted or not. The query depends on the entire HIR crate but should be very quick to calculate (just a quick walk of the HIR) and the red-green system should notice that the lint level data structure rarely changes, and should hopefully preserve incrementality. Overall this resulted in a pretty big change to the test suite now that lints are emitted much earlier in compilation (on-demand vs only at the end). This in turn necessitated the addition of many `#![allow(warnings)]` directives throughout the compile-fail test suite and a number of updates to the UI test suite.
2017-07-08Make sufficiently old or low-impact compatibility lints deny-by-defaultVadim Petrochenkov-18/+9
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-8/+8
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-05-24Change error count messagesMichael Kohl-8/+8
See #33525 for details.
2017-04-20Reduce visual clutter of multiline start when possibleEsteban Küber-6/+4
When a span starts on a line with nothing but whitespace to the left, and there are no other annotations in that line, simplify the visual representation of the span. Go from: ```rust error[E0072]: recursive type `A` has infinite size --> file2.rs:1:1 | 1 | struct A { | _^ starting here... 2 | | a: A, 3 | | } | |_^ ...ending here: recursive type has infinite size | ``` To: ```rust error[E0072]: recursive type `A` has infinite size --> file2.rs:1:1 | 1 | / struct A { 2 | | a: A, 3 | | } | |_^ recursive type has infinite size ``` Remove `starting here...`/`...ending here` labels from all multiline diagnostics.
2017-02-04note individual lint name set via lint group attribute in notesZack M. Davis-2/+4
Warning or error messages set via a lint group attribute (e.g. `#[deny(warnings)]`) should still make it clear which individual lint (by name) was triggered, similarly to how we include "on by default" language for default lints. This—and, while we're here, the existing "on by default" language—can be tucked into a note rather than cluttering the main error message. This occasions the slightest of refactorings (we now have to get the diagnostic-builder with the main message first, before matching on the lint source). This is in the matter of #36846.
2017-01-20Test fixes from the rollupAlex Crichton-12/+2
2017-01-17Teach Diagnostics to highlight textEsteban Küber-1/+1
2016-11-22Show multiline spans in full if short enoughEsteban Küber-8/+16
When dealing with multiline spans that span few lines, show the complete span instead of restricting to the first character of the first line. For example, instead of: ``` % ./rustc foo.rs error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied --> foo.rs:13:9 | 13 | foo(1 + bar(x, | ^ trait `{integer}: std::ops::Add<()>` not satisfied | ``` show ``` % ./rustc foo.rs error[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied --> foo.rs:13:9 | 13 | foo(1 + bar(x, | ________^ starting here... 14 | | y), | |_____________^ ...ending here: trait `{integer}: std::ops::Add<()>` not satisfied | ```
2016-11-01move compile-fail tests to ui testsNiko Matsakis-7/+313
gets more comprehensive coverage in `ui`
2016-11-01update ref fileNiko Matsakis-8/+0
2016-11-01compare-method lintNiko Matsakis-9/+36
2016-11-01cleanup error reporting and add `ui` testsNiko Matsakis-0/+113