about summary refs log tree commit diff
path: root/src/test/ui/underscore-lifetime
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-492/+0
2022-12-18higher-ranked lifetime messageMichael Goulet-0/+24
2022-07-25Report elision failures on the AST.Camille GILLOT-22/+14
2022-06-03Fully stabilize NLLJack Huey-58/+4
2022-04-27Recover suggestions to introduce named lifetime under NLLmarmeladema-0/+5
2022-04-25Recover most `impl Trait` and `dyn Trait` lifetime bound suggestions under NLLmarmeladema-0/+5
2022-04-17Bless tests.Camille GILLOT-4/+4
2022-04-05underscore-lifetime nll revisionsJack Huey-7/+19
2021-12-10Tweak wordingEsteban Kuber-1/+1
2021-12-10Use a more accurate `Span` for `'static` obligation from return typeEsteban Kuber-2/+2
2021-12-10Point at return type when it introduces `'static` obligationEsteban Kuber-0/+8
2021-12-10Clean up visual output logicEsteban Kuber-1/+3
2021-11-03Add beginner friendly lifetime elision hint to E0623Nilstrieb-0/+6
Suggest adding a new lifetime parameter when two elided lifetimes should match up but don't Issue #90170 This also changes the tests introduced by the previous commits because of another rustc issue (#90258)
2021-08-18Use more accurate spans when proposing adding lifetime to itemEsteban Kuber-2/+2
2021-08-11Modify structured suggestion outputEsteban Küber-11/+11
* On suggestions that include deletions, use a diff inspired output format * When suggesting addition, use `+` as underline * Color highlight modified span
2020-07-22Further tweak wording of E0759 and introduce E0767Esteban Küber-2/+2
2020-06-15Change E0758 to E0759 to avoid conflict with #72912Esteban Küber-2/+2
2020-06-15small tweaksEsteban Küber-1/+1
2020-06-15Register new eror codeEsteban Küber-0/+1
2020-06-15review comments: wordingEsteban Küber-1/+1
2020-06-15Tweak wording and add error codeEsteban Küber-4/+4
2020-06-15Reduce verbosity of suggestion message and mention lifetime in labelEsteban Küber-2/+2
2020-06-15When `'static` is explicit, suggest constraining argument with itEsteban Küber-1/+1
2020-05-30Tweak wording and spans of `'static` `dyn Trait`/`impl Trait` requirementsEsteban Küber-15/+5
2020-05-30Update nll testsEsteban Küber-0/+11
2020-05-30review comment: tweak wording and account for span overlapEsteban Küber-4/+6
2020-05-30Account for returned `dyn Trait` evaluating to `'static` lifetimeEsteban Küber-8/+20
Provide a suggestion for `dyn Trait + '_` when possible.
2020-05-30Fix NLL outputEsteban Küber-12/+0
2020-05-30Improve output of argument anonymous borrow missing annotation involving ↵Esteban Küber-29/+11
opaque return type Go from ``` error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements --> file8.rs:22:5 | 22 | / move || { 23 | | *dest = g.get(); 24 | | } | |_____^ | note: first, the lifetime cannot outlive the anonymous lifetime #1 defined on the function body at 18:1... --> file8.rs:18:1 | 18 | / fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a 19 | | where 20 | | G: Get<T> 21 | | { ... | 24 | | } 25 | | } | |_^ note: ...so that the types are compatible --> file8.rs:22:5 | 22 | / move || { //~ ERROR cannot infer an appropriate lifetime 23 | | *dest = g.get(); 24 | | } | |_____^ = note: expected `&mut T` found `&mut T` note: but, the lifetime must be valid for the lifetime `'a` as defined on the function body at 18:8... --> file8.rs:18:8 | 18 | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a | ^^ note: ...so that return value is valid for the call --> file8.rs:18:45 | 18 | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a | ^^^^^^^^^^^^^^^^^^^^^^^ ``` to ``` error[E0621]: explicit lifetime required in the type of `dest` --> file8.rs:18:45 | 18 | fn bat<'a, G: 'a, T>(g: G, dest: &mut T) -> impl FnOnce() + '_ + 'a | ------ ^^^^^^^^^^^^^^^^^^^^^^^ lifetime `'a` required | | | help: add explicit lifetime `'a` to the type of `dest`: `&'a mut T` ```
2020-05-27Fix spacing of expected/found notes without a labelEsteban Küber-2/+2
2020-05-12add long error explanation for E0228Jade McGough-1/+2
2020-04-22Tweak wordingEsteban Küber-2/+2
2020-04-22Tweak `'static` suggestion codeEsteban Küber-2/+11
Fix #71196.
2020-02-07performed --bless of 15 ui tests affectedJosh White-1/+13
2020-02-05Account for `fn()` types in lifetime suggestionsEsteban Küber-12/+4
2020-02-05Account for `'_` in suggestionsEsteban Küber-2/+2
2020-02-05review commentsEsteban Küber-8/+8
2020-02-05Suggest `'r` instead of `'lifetime`Esteban Küber-10/+10
2020-02-05When suggesting lifetimes, propose adding the new lifetime to all argumentsEsteban Küber-2/+2
2020-02-05Use spans for input borrowed types unrelated to return typeEsteban Küber-2/+10
2020-01-19review commentsEsteban Küber-5/+5
2020-01-19When encountering an expected named lifetime and none are present, suggest ↵Esteban Küber-6/+32
adding one
2019-12-03Include a span in more `expected...found` notesAaron Hill-3/+7
In most places, we use a span when emitting `expected...found` errors. However, there were a couple of places where we didn't use any span, resulting in hard-to-interpret error messages. This commit attaches the relevant span to these notes, and additionally switches over to using `note_expected_found` instead of manually formatting the message
2019-11-21Change some tests to use the shorter comment styleDylan MacKenzie-6/+3
2019-11-07Update ui testsGuillaume Gomez-0/+1
2019-10-07update ui testsGuillaume Gomez-0/+1
2019-06-03rustc: remove `HirId` from `ArgSource::AsyncFn`David Wood-1/+1
This commit removes the `HirId` from `ArgSource::AsyncFn`, relying on the fact that only `simple_ident` is used in each of the locations that previously took the original pattern from the `ArgSource::AsyncFn`.
2019-05-29Update ui test suite to use dynmemoryruins-7/+7
2019-05-12Change compare mode to use -Zborrowck=mirMatthew Jasper-0/+22
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-17/+2