about summary refs log tree commit diff
path: root/src/test/ui/span/impl-wrong-item-for-trait.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-66/+0
2022-07-01Shorten def_span for more items.Camille GILLOT-1/+1
2022-01-08Link impl items to corresponding trait items in late resolver.Camille GILLOT-17/+11
2022-01-07Update clippy for associated item changesMatthew Jasper-18/+18
2021-02-06path trimming: ignore type aliasesDan Aloni-1/+1
2020-09-02pretty: trim paths of unique symbolsDan Aloni-1/+1
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.
2020-02-08review commentEsteban Küber-1/+1
2019-11-06Suggest missing item from `trait` in `impl`Esteban Küber-1/+1
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2018-12-25Remove licensesMark Rousskov-8/+8
2018-03-14update testsGuillaume Gomez-2/+2
2018-02-26Update UI testsVadim Petrochenkov-14/+14
2018-02-25Update ui testsGuillaume Gomez-0/+2
2017-12-19Point at def span in "missing in impl" errorEsteban Küber-31/+14
2017-12-14Remove NOTE/HELP annotations from UI testsVadim Petrochenkov-37/+35
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-34/+34
2017-07-06remove associated_consts feature gateSean McArthur-38/+38
2017-07-02report the total number of errors on compilation failureAriel Ben-Yehuda-1/+1
Prior to this PR, when we aborted because a "critical pass" failed, we displayed the number of errors from that critical pass. While that's the number of errors that caused compilation to abort in *that place*, that's not what people really want to know. Instead, always report the total number of errors, and don't bother to track the number of errors from the last pass that failed. This changes the compiler driver API to handle errors more smoothly, and therefore is a compiler-api-[breaking-change]. Fixes #42793.
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-1/+1
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-05-24Change error count messagesMichael Kohl-1/+1
See #33525 for details.
2017-04-20Reduce visual clutter of multiline start when possibleEsteban Küber-12/+8
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-04-09Always show end line of multiline annotationsEsteban Küber-6/+3
```rust error[E0046]: not all trait items implemented, missing: `Item` --> $DIR/issue-23729.rs:20:9 | 20 | impl Iterator for Recurrence { | _________^ starting here... 21 | | //~^ ERROR E0046 22 | | //~| NOTE missing `Item` in implementation 23 | | //~| NOTE `Item` from trait: `type Item;` ... | 36 | | } 37 | | } | |_________^ ...ending here: missing `Item` in implementation | = note: `Item` from trait: `type Item;` ``` instead of ```rust error[E0046]: not all trait items implemented, missing: `Item` --> $DIR/issue-23729.rs:20:9 | 20 | impl Iterator for Recurrence { | ^ missing `Item` in implementation | = note: `Item` from trait: `type Item;` ```
2016-12-26More systematic error reporting in path resolutionVadim Petrochenkov-0/+6
2016-12-03Rollup merge of #38065 - estebank:fix-37618, r=jonathandturnerCorey Farwell-3/+3
Show `Trait` instead of `<Struct as Trait>` in E0323 For a given file ``` trait Foo { fn bar(&self); } pub struct FooConstForMethod; impl Foo for FooConstForMethod { const bar: u64 = 1; } ``` show ``` error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` ``` instead of ``` error[E0323]: item `bar` is an associated const, which doesn't match its trait `<FooConstForMethod as Foo>` ``` Fix #37618
2016-11-28Show `Trait` instead of `<Struct as Trait>` in E0323Esteban Küber-3/+3
For a given file ``` trait Foo { fn bar(&self); } pub struct FooConstForMethod; impl Foo for FooConstForMethod { const bar: u64 = 1; } ``` show ``` error[E0323]: item `bar` is an associated const, which doesn't match its trait `Foo` ``` instead of ``` error[E0323]: item `bar` is an associated const, which doesn't match its trait `<FooConstForMethod as Foo>` ```
2016-11-22Show multiline spans in full if short enoughEsteban Küber-14/+40
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-05Include type of missing trait methods in errorEsteban Küber-0/+64
Provide either a span pointing to the original definition of missing trait items, or a message with the inferred definitions.