about summary refs log tree commit diff
path: root/src/test/ui/issues/issue-37884.stderr
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-22/+0
2023-01-08Mention signature rather than fn pointers when comparing impl/trait methodsMichael Goulet-2/+2
2022-07-13Always use CreateParameter mode for function definitions.Camille GILLOT-1/+1
2022-07-06replace `guess_head_span` with `def_span`Takayuki Maeda-7/+2
2021-10-13Remove textual span from diagnostic stringOli Scherer-2/+2
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+2
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-08-22Use smaller def span for functionsAaron Hill-7/+2
Currently, the def span of a funtion encompasses the entire function signature and body. However, this is usually unnecessarily verbose - when we are pointing at an entire function in a diagnostic, we almost always want to point at the signature. The actual contents of the body tends to be irrelevant to the diagnostic we are emitting, and just takes up additional screen space. This commit changes the `def_span` of all function items (freestanding functions, `impl`-block methods, and `trait`-block methods) to be the span of the signature. For example, the function ```rust pub fn foo<T>(val: T) -> T { val } ``` now has a `def_span` corresponding to `pub fn foo<T>(val: T) -> T` (everything before the opening curly brace). Trait methods without a body have a `def_span` which includes the trailing semicolon. For example: ```rust trait Foo { fn bar(); }``` the function definition `Foo::bar` has a `def_span` of `fn bar();` This makes our diagnostic output much shorter, and emphasizes information that is relevant to whatever diagnostic we are reporting. We continue to use the full span (including the body) in a few of places: * MIR building uses the full span when building source scopes. * 'Outlives suggestions' use the full span to sort the diagnostics being emitted. * The `#[rustc_on_unimplemented(enclosing_scope="in this scope")]` attribute points the entire scope body. * The 'unconditional recursion' lint uses the full span to show additional context for the recursive call. All of these cases work only with local items, so we don't need to add anything extra to crate metadata.
2019-11-23Highlight parts of fn in type errorsEsteban Küber-2/+2
When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each.
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-2/+2
2019-10-11Print lifetimes with backticksYuki Okushi-1/+1
2019-03-11Update testsVadim Petrochenkov-4/+4
2018-12-25Remove licensesMark Rousskov-5/+5
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+32