about summary refs log tree commit diff
path: root/src/test/ui/range
AgeCommit message (Collapse)AuthorLines
2021-02-09./x.py test --blessTomasz Miąsko-275/+11
2021-01-13Update code to account for extern ABI requirementMark Rousskov-1/+1
2020-10-06Fix tests from rebaseMatthew Jasper-1/+3
2020-10-06Separate bounds and predicates for associated/opaque typesMatthew Jasper-1/+1
2020-09-02pretty: trim paths of unique symbolsDan Aloni-90/+90
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-27Abort when catch_unwind catches a foreign exceptionAmanieu d'Antras-6/+9
2020-08-16hir: simplify `is_range_literal`David Wood-1/+5
This commit simplifies `is_range_literal` by checking for `QPath::LangItem` containing range-related lang items, rather than using a heuristic. Co-authored-by: Matthew Jasper <mjjasper1@gmail.com> Signed-off-by: David Wood <david@davidtw.co>
2020-07-14Remove `Sized` `on_unimplemented` noteEsteban Küber-1/+0
2020-07-02Audit uses of `span_suggestion_short`Yuki Okushi-32/+65
2020-06-22Change heuristic for determining range literalAyaz Hafiz-0/+43
Currently, rustc uses a heuristic to determine if a range expression is not a literal based on whether the expression looks like a function call or struct initialization. This fails for range literals whose lower/upper bounds are the results of function calls. A possibly-better heuristic is to check if the expression contains `..`, required in range literals. Of course, this is also not perfect; for example, if the range expression is a struct which includes some text with `..` this will fail, but in general I believe it is a better heuristic. A better alternative altogether is to add the `QPath::LangItem` enum variant suggested in #60607. I would be happy to do this as a precursor to this patch if someone is able to provide general suggestions on how usages of `QPath` need to be changed later in the compiler with the `LangItem` variant. Closes #73553
2020-04-11rustc: Add a warning count upon completionRoccoDev-1/+1
2020-03-05Remove eh_unwind_resume lang itemAmanieu d'Antras-10/+6
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+42
2020-01-24Normalise notes with the/isvarkor-1/+1
2020-01-09Update testsVadim Petrochenkov-11/+251
2019-11-18Surround types with backticks in type errorsEsteban Küber-1/+1
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-48/+48
2019-07-03Migrate compile-pass annotations to build-passYuki Okushi-3/+3
2019-04-22Remove double trailing newlinesvarkor-6/+0
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-1/+1
2019-03-11Update testsVadim Petrochenkov-3/+3
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-1/+1
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-25Remove licensesMark Rousskov-113/+23
2018-11-15Rollup merge of #55852 - varkor:dotdotequals-lint, r=zackmdavisPietro Albini-2/+2
Rewrite `...` as `..=` as a `MachineApplicable` 2018 idiom lint Fixes https://github.com/rust-lang/rust/issues/51043.
2018-11-10Use non-short suggestion for parenthesised ..=varkor-1/+1
2018-11-10Rewrite `...` as `..=` as a MachineApplicable 2018 idiom lintvarkor-2/+2
2018-11-10Auto merge of #55626 - nikic:update-emscripten, r=alexcrichtonbors-1/+1
Update emscripten This updates emscripten to 1.38.15, which is based on LLVM 6.0.1 and would allow us to drop code for handling LLVM 4. The main issue I ran into is that exporting statics through `EXPORTED_FUNCTIONS` no longer works. As far as I understand exporting non-functions doesn't really make sense under emscripten anyway, so I've modified the symbol export code to not even try. Closes #52323.
2018-11-08Fix some tests for wasm32-unknown-emscriptenNikita Popov-1/+1
2018-11-07Removed `#[rustc_error]` from tests that are all `// compile-pass`.Felix S. Klock II-33/+9
I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
2018-10-09Fix test for windows osPaweł Romanowski-6/+10
2018-10-08Attempt to fix #54505 tests for wasmPaweł Romanowski-11/+12
2018-10-02Address review commentsPaweł Romanowski-74/+24
2018-10-02Fix range borrowing suggestions logicPaweł Romanowski-3/+313
2018-09-29First stab at fixing #54505Paweł Romanowski-0/+327
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+438