about summary refs log tree commit diff
path: root/src/test/ui/try-block
AgeCommit message (Collapse)AuthorLines
2021-11-28Rollup merge of #90131 - camsteffen:fmt-args-span-fix, r=cjgillotMatthias Krüger-0/+2
Fix a format_args span to be expansion I found this while exploring solutions for rust-lang/rust-clippy#7843. r? `@m-ou-se`
2021-11-20Do not mention associated items when they introduce an obligationEsteban Kuber-20/+0
2021-11-18Move some tests to more reasonable directoriesCaio-0/+11
2021-11-06Move some tests to more reasonable directoriesCaio-0/+18
2021-10-29Fix a format_args span to be expansionCameron Steffen-0/+2
2021-10-15Bless testsCameron Steffen-1/+1
2021-09-09Use more accurate spans for "unused delimiter" lintEsteban Kuber-5/+33
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-07-19Various diagnostics clean ups/tweaksEsteban Küber-4/+20
* Always point at macros, including derive macros * Point at non-local items that introduce a trait requirement * On private associated item, point at definition
2021-05-18Auto merge of #84767 - scottmcm:try_trait_actual, r=lcnrbors-26/+23
Implement the new desugaring from `try_trait_v2` ~~Currently blocked on https://github.com/rust-lang/rust/issues/84782, which has a PR in https://github.com/rust-lang/rust/pull/84811~~ Rebased atop that fix. `try_trait_v2` tracking issue: https://github.com/rust-lang/rust/issues/84277 Unfortunately this is already touching a ton of things, so if you have suggestions for good ways to split it up, I'd be happy to hear them. (The combination between the use in the library, the compiler changes, the corresponding diagnostic differences, even MIR tests mean that I don't really have a great plan for it other than trying to have decently-readable commits. r? `@ghost` ~~(This probably shouldn't go in during the last week before the fork anyway.)~~ Fork happened.
2021-05-12Show macro name in 'this error originates in macro' messageAaron Hill-1/+1
When there are multiple macros in use, it can be difficult to tell which one was responsible for producing an error.
2021-05-06Better rustc_on_unimplemented, and UI test fixesScott McMurray-26/+23
2021-03-06Move some tests to more suitable subdirsYuki Okushi-0/+75
2021-02-17try-back-block-type test: Use TryFromSliceError for From testIan Jackson-8/+4
Using `i32` is rather fragile because it has many implementations - and indeed I'm about to add one. TryFromSliceError is nice because it doesn't seem likely to grow new conversions. We still have one conversion, from Infallible. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2021-02-06path trimming: ignore type aliasesDan Aloni-2/+2
2020-12-31Consistently call editions "Rust 20xx" in messages.Mara Bos-1/+1
2020-10-06Fix tests from rebaseMatthew Jasper-7/+15
2020-10-06Separate bounds and predicates for associated/opaque typesMatthew Jasper-1/+1
2020-10-03Run attributes check at crate levelGuillaume Gomez-2/+2
2020-09-07Rollup merge of #76274 - scottmcm:fix-76271, r=petrochenkovDylan DPC-0/+12
Allow try blocks as the argument to return expressions Fixes #76271 I don't think this needs to be edition-aware (phew) since `return try` in 2015 is also the start of an expression, just with a struct literal instead of a block (`return try { x: 4, y: 5 }`).
2020-09-02Allow try blocks as the argument to return expressionsScott McMurray-0/+12
Fixes 76271
2020-09-02pretty: trim paths of unique symbolsDan Aloni-23/+23
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-11Rollup merge of #75359 - lcnr:unused-delims-trim, r=oli-obkYuki Okushi-1/+1
unused_delims: trim expr improves rustfix output.
2020-08-10Add missing primary labelEsteban Küber-1/+1
2020-08-10unused_delims: trim exprBastian Kauschke-1/+1
2020-07-02Audit uses of `span_suggestion_short`Yuki Okushi-7/+37
2020-04-14allow try as scrutinee, e.g. `match try ...`Bastian Kauschke-15/+85
2020-04-11rustc: Add a warning count upon completionRoccoDev-0/+2
2020-03-22Normalize wording of privacy access labelsEsteban Küber-1/+5
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-1/+1
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-1/+1
2020-01-24Normalise notes with the/isvarkor-1/+1
2019-11-23Rework raw ident suggestionsEsteban Küber-5/+0
Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion.
2019-11-18Surround types with backticks in type errorsEsteban Küber-4/+4
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-12/+0
2019-11-18review comments: tweak prefix stringsEsteban Küber-4/+4
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-2/+2
2019-11-10Make error and warning annotations mandatory in UI testsTomasz Miąsko-3/+3
This change makes error and warning annotations mandatory in UI tests. The only exception are tests that use error patterns to match compiler output and don't have any annotations.
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+1
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-13Update ui testsGuillaume Gomez-0/+1
2019-10-01fix test after rebaseAlex Zatelepin-4/+14
2019-10-01address review commentsAlex Zatelepin-4/+4
2019-10-01add testsAlex Zatelepin-4/+108
2019-09-06Fixed grammar/style in error messages and reblessed tests.Alexander Regueiro-3/+3
2019-05-17Explain that ? converts the error type using FromEsteban Küber-0/+1
2019-04-22Remove double trailing newlinesvarkor-3/+0
2019-04-19Rollup merge of #60064 - estebank:issue-59980, r=varkorMazdak Farrokhzad-4/+4
Point at try `?` on errors affecting the err match arm of the desugared code Fix #59980.
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-4/+3
2019-04-17Give custom error for E0277 on `?` error caseEsteban Küber-2/+2
2019-04-17Point at try `?` on errors affecting the err match arm of the desugared codeEsteban Küber-2/+2