about summary refs log tree commit diff
path: root/src/test/ui/span/multiline-span-simple.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-16/+0
2022-12-05Tweak "the following other types implement trait"Esteban Küber-9/+4
When *any* of the suggested impls is an exact match, *only* show the exact matches. This is particularly relevant for integer types. fix fmt
2022-04-04Refer to the TraitRef::identity in the message to be clearerEsteban Kuber-1/+1
2022-04-04Dedup logic and improve output for other types that impl traitEsteban Kuber-5/+5
2022-04-04Fix list lengthEsteban Kuber-0/+4
2022-04-04Mention implementers of unsatisfied traitEsteban Kuber-0/+6
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 `?`.
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.
2019-03-11Update testsVadim Petrochenkov-1/+1
2018-12-25Remove licensesMark Rousskov-1/+1
2018-03-14update testsGuillaume Gomez-1/+1
2018-02-26Update UI testsVadim Petrochenkov-1/+1
2018-02-25Update ui testsGuillaume Gomez-0/+1
2018-02-01Add filter to detect local crates for rustc_on_unimplementedEsteban Küber-1/+1
2018-02-01Add filtering options to `rustc_on_unimplemented`Esteban Küber-1/+1
- filter error on the evaluated value of `Self` - filter error on the evaluated value of the type arguments - add argument to include custom note in diagnostic - allow the parser to parse `Self` when processing attributes - add custom message to binops
2017-11-24Merge cfail and ui tests into ui testsOliver Schneider-1/+1
2017-07-02Revert "Change error count messages"Ariel Ben-Yehuda-1/+1
This reverts commit 5558c64f33446225739c1153b43d2e309bb4f50e.
2017-06-01tests: fix fallout from changing the span of binop errors.Eduard-Mihai Burtescu-8/+3
2017-05-24Rollup merge of #42150 - citizen428:feature/error-count-messages, ↵Mark Simulacrum-1/+1
r=Mark-Simulacrum Change error count messages See #33525 for details. r? @Mark-Simulacrum
2017-05-24Change error count messagesMichael Kohl-1/+1
See #33525 for details.
2017-05-17Add better error message when == operator is badly usedGuillaume Gomez-2/+2
2017-04-20Reduce visual clutter of multiline start when possibleEsteban Küber-2/+2
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-10Explicit help message for binop type missmatchEsteban Küber-5/+1
When trying to do a binary operation with missing implementation, for example `1 + Some(2)`, provide an explicit help message: ``` note: no implementation for `{integer} + std::option::Option<{integer}>` ``` Use `rustc_on_unimplemented` for the suggestions. Move cfail test to ui.
2017-01-13Use multiline Diagnostic for "relevant impl" listEsteban Küber-4/+4
Provide the following output: ``` error[E0277]: the trait bound `Bar: Foo<usize>` is not satisfied --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:38:8 | 38 | f1.foo(1usize); | ^^^ the trait `Foo<usize>` is not implemented for `Bar` | = help: the following implementations were found: <Bar as Foo<i8>> <Bar as Foo<i16>> <Bar as Foo<i32>> <Bar as Foo<u8>> and 2 others error: aborting due to previous error ``` instead of ``` error[E0277]: the trait bound `Bar: Foo<usize>` is not satisfied --> $DIR/issue-21659-show-relevant-trait-impls-2.rs:38:8 | 38 | f1.foo(1usize); | ^^^ the trait `Foo<usize>` is not implemented for `Bar` | = help: the following implementations were found: = help: <Bar as Foo<i8>> = help: <Bar as Foo<i16>> = help: <Bar as Foo<i32>> = help: <Bar as Foo<u8>> = help: and 2 others error: aborting due to previous error ```
2016-11-23review commentsEsteban Küber-4/+3
2016-11-22Show multiline spans in full if short enoughEsteban Küber-0/+20
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 | ```