about summary refs log tree commit diff
path: root/src/test/ui/suggestions
AgeCommit message (Collapse)AuthorLines
2020-03-24resolve: Remove `rustc_attrs` as a standalone feature gateVadim Petrochenkov-4/+1
Now it only gates specific built-in attributes
2020-03-23Rollup merge of #70300 - aleksator:66636_reword_unused_variable_warning, ↵Mazdak Farrokhzad-1/+1
r=Dylan-DPC Reword unused variable warning Fixes #66636
2020-03-23Reword unused variable warningAlex Tokarev-1/+1
2020-03-22Add span label to primary error spanEsteban Küber-3/+3
2020-03-22Increase verbosity when suggesting subtle code changesEsteban Küber-82/+136
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-2/+2
2020-03-12update testsMark Mansi-3/+3
2020-03-08Rollup merge of #69561 - JohnTitor:clean-up-unstable-book, r=Mark-SimulacrumMazdak Farrokhzad-1/+0
Clean up unstable book - #58402's feature was renamed to `tidy_test_never_used_anywhere_else` and it is now used for tidy only - `read_initializer` link is wrong and the doc should be auto-generated so removed - Add dummy doc for `link_cfg` - Stop generating `compiler_builtins_lib` doc in favor of b8ccc0f8a60ac16fdc00f4b2e36e1a5db8b78295 - Make `rustc_attrs` tracking issue "None"
2020-03-06When encountering an Item in a pat context, point at the item defEsteban Küber-0/+27
2020-03-01Make `rustc_attrs` tracking issue NoneYuki Okushi-1/+0
2020-02-29Auto merge of #69255 - estebank:e0599-details, r=varkorbors-5/+85
Add more context to E0599 errors Point at the intermediary unfulfilled trait bounds. Fix #52523, fix #61661, cc #36513, fix #68131, fix #64417, fix #61768, cc #57457, cc #9082, fix #57994, cc #64934, cc #65149.
2020-02-28Ignore output for some platforms with diverging test outputEsteban Küber-4/+8
Get around #53081.
2020-02-28Reword messageEsteban Küber-2/+2
2020-02-28Reduce verbosity when suggesting restricting type paramsEsteban Küber-12/+0
2020-02-28keep predicate order and tweak outputEsteban Küber-6/+10
2020-02-28Review comments: split requirement text to multiple lines for readabilityEsteban Küber-4/+8
2020-02-28Suggest constraining type parametersEsteban Küber-0/+75
2020-02-28Point at closure definitionsEsteban Küber-1/+1
2020-02-28Show information of chain of bound obligationsEsteban Küber-1/+6
When the obligation that couldn't be fulfilled is specific to a nested obligation, maintain both the nested and parent obligations around for more accurate and detailed error reporting.
2020-02-28Reduce vebosity of E0599Esteban Küber-14/+4
2020-02-28Add more context to E0599 errorsEsteban Küber-5/+15
Point at the intermediary unfullfilled trait bounds.
2020-02-28Rollup merge of #69452 - Centril:typeck-pat, r=estebankMazdak Farrokhzad-1/+5
typeck: use `Pattern` obligation cause more for better diagnostics r? @estebank
2020-02-25check_pat_ref: use pattern_causeMazdak Farrokhzad-1/+5
2020-02-22Add note regarding argument orderingvarkor-0/+8
2020-02-22Move generic arg / param validation to `create_substs_for_generic_args`varkor-14/+15
2020-02-19Tweak binding lifetime suggestion textEsteban Küber-6/+5
We already have a structured suggestion, but the wording made it seem like that wasn't the case. Fix #65286. r? @varkor
2020-02-14Suggest a comma if a struct initializer field fails to parseAaron Hill-0/+36
Currently, we emit a "try adding a comma" suggestion if a comma is missing in a struct definition. However, we emit no such suggestion if a comma is missing in a struct initializer. This commit adds a "try adding a comma" suggestion when we don't find a comma during the parsing of a struct initializer field. The change to `src/test/ui/parser/removed-syntax-with-1.stderr` isn't great, but I don't see a good way of avoiding it.
2020-02-13Rollup merge of #69082 - estebank:boxfuture-box-pin, r=tmandryDylan DPC-0/+49
When expecting `BoxFuture` and using `async {}`, suggest `Box::pin` Fix #68197, cc #69083.
2020-02-12Add trait `Self` filtering to `rustc_on_unimplemented`Esteban Küber-62/+16
2020-02-12Account for `Pin::new(_)` and `Pin::new(Box::new(_))` when `Box::pin(_)` ↵Esteban Küber-10/+13
would be applicable
2020-02-12Account for `Box::new(impl Future)` and emit help `use Box::pin`Esteban Küber-19/+61
2020-02-12Remove std lib `Span` from expected boxed future testEsteban Küber-28/+19
2020-02-12When expecting `BoxFuture` and using `async {}`, suggest `Box::pin`Esteban Küber-0/+59
2020-02-12Rollup merge of #68981 - estebank:silence, r=davidtwcoDylan DPC-0/+22
Account for type params on method without parentheses Account for those type parameters in the structured suggestion when forgetting to call method: ``` error[E0615]: attempted to take value of method `collect` on type `std::vec::IntoIter<_>` --> $DIR/method-missing-parentheses.rs:2:32 | LL | let _ = vec![].into_iter().collect::<usize>; | ^^^^^^^--------- | | | help: use parentheses to call the method: `collect::<usize>()` ```
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-5/+5
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-10review comment: wordingEsteban Küber-2/+2
2020-02-09Auto merge of #67665 - Patryk27:master, r=zackmdavisbors-20/+36
Improve reporting errors and suggestions for trait bounds Fix #66802 - When printing errors for unsized function parameter, properly point at the parameter instead of function's body. - Improve `consider further restricting this bound` (and related) messages by separating human-oriented hints from the machine-oriented ones.
2020-02-09--bless --compare-mode=nllMatthias Prechtl-5/+5
2020-02-09Improve reporting errors and suggestions for trait boundsPatryk Wychowaniec-20/+36
2020-02-09Auto merge of #68689 - estebank:where-clause-sugg-missing-fn, r=varkorbors-4/+117
When suggesting associated fn with type parameters, include in the structured suggestion Address #50734. ``` error[E0046]: not all trait items implemented, missing: `foo`, `bar`, `baz` --> file.rs:14:1 | 14 | impl TraitA<()> for S { | ^^^^^^^^^^^^^^^^^^^^^ missing `foo`, `bar`, `baz` in implementation | = help: implement the missing item: `fn foo<T>(_: T) -> Self where T: TraitB, TraitB::Item = A { unimplemented!() }` = help: implement the missing item: `fn bar<T>(_: T) -> Self { unimplemented!() }` = help: implement the missing item: `fn baz<T>(_: T) -> Self where T: TraitB, <T as TraitB>::Item: std::marker::Copy { unimplemented!() }` ``` It doesn't work well for associated types with `ty::Predicate::Projection`s as we need to resugar `T: Trait, Trait::Assoc = K` → `T: Trait<Assoc = K>`.
2020-02-08review commentEsteban Küber-7/+7
2020-02-08Account for type params on method without parensEsteban Küber-0/+22
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-4/+5
2020-02-06rustc_errors: hide "in this macro invocation" when redundant, more explicitly.Eduard-Mihai Burtescu-4/+1
2020-02-06rustc: rename -Zexternal-macro-backtrace to -Zmacro-backtrace.Eduard-Mihai Burtescu-4/+4
2020-02-05Account for `impl Trait`Esteban Küber-0/+16
Address #49287
2020-02-05review comments: wordingEsteban Küber-2/+2
2020-02-05Account for `fn()` types in lifetime suggestionsEsteban Küber-20/+8
2020-02-05review commentsEsteban Küber-6/+6
2020-02-05Suggest `'r` instead of `'lifetime`Esteban Küber-0/+61