about summary refs log tree commit diff
path: root/src/test/ui/impl-trait
AgeCommit message (Collapse)AuthorLines
2018-08-14Update former compile-fail testsMatthew Jasper-3/+3
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+931
2018-08-02Explicitly label any named lifetimes mentioned in error messages.David Wood-0/+2
2018-07-27Auto merge of #52648 - davidtwco:issue-52533, r=nikomatsakisbors-7/+5
[nll] improve the "fully elaborated type" case in region errors Fixes #52533. r? @nikomatsakis
2018-07-27Region inference error messages no longer start with 'free region'David Wood-2/+2
2018-07-27Change label from closure to function where appropriate.David Wood-7/+5
2018-07-27Auto merge of #52650 - oli-obk:associated_existential_types, r=nikomatsakisbors-0/+104
Implement associated existential types r? @nikomatsakis no idea if these work with generic traits. I'm going home for the day :rofl:
2018-07-26Auto merge of #52488 - nikomatsakis:nll-issue-48071-universe-and-sub, r=pnkfelixbors-5/+7
introduce universes to NLL type check This branch aims to fix #48071 and also advance chalk integration a bit at the same time. It re-implements the subtyping/type-equating check so that NLL doesn't "piggy back" on the subtyping code of the old type checker. This new code uses the "universe-based" approach to handling higher-ranked lifetimes, which sidesteps some of the limitations of the current "leak-based" scheme. This avoids the ICE in #48071. At the same time, I aim for this to potentially be a kind of optimization. This NLL code is (currently) not cached, but it also generates constraints without doing as much instantiation, substitution, and folding. Right now, though, it still piggy backs on the `relate_tys` trait, which is a bit unfortunate -- it means we are doing more hashing and things than we have to. I want to measure the see the perf. Refactoring that trait is something I'd prefer to leave for follow-up work. r? @pnkfelix -- but I want to measure perf etc first
2018-07-25improve heuristics for what makes an interesting constraintNiko Matsakis-5/+7
2018-07-25Fix associated existentials for generic traitsOliver Schneider-0/+40
2018-07-24Allow declaring existential types inside blocksOliver Schneider-0/+22
2018-07-23Implement associated existential typesOliver Schneider-0/+64
2018-07-18Move some tests aroundOliver Schneider-36/+0
2018-07-18Add test for using existential types in associated typesOliver Schneider-0/+36
2018-07-18Typeck existential types properlyOliver Schneider-9/+49
2018-07-13Use the correct visibilityOliver Schneider-0/+35
2018-07-09find and highlight the `&` or `'_` in `region_name`Niko Matsakis-1/+1
2018-07-04write code to extract region names and emit new style messageNiko Matsakis-4/+6
2018-06-30Auto merge of #51862 - estebank:lifetime-spans, r=nikomatsakisbors-13/+8
Point to lifetime spans on lifetime errors
2018-06-30Auto merge of #51806 - oli-obk:lowering_cleanups1, r=cramertjbors-2/+2
Lowering cleanups [1/N]
2018-06-28Fix rebaseEsteban Küber-4/+4
2018-06-28Point to lifetime in fn definition on lifetime error noteEsteban Küber-9/+4
2018-06-28Auto merge of #51444 - estebank:impl-static, r=nikomatsakisbors-0/+96
Suggestion for 'static impl Trait return When encountering a named or anonymous sup requirement (for example, `&'a self`) and a `'static` impl Trait return type, suggest adding the `'_` lifetime constraing to the return type. Fix #43719, #51282. ``` error: cannot infer an appropriate lifetime --> $DIR/static-return-lifetime-infered.rs:17:16 | LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> { | ----------------------- this return type evaluates to the `'static` lifetime... LL | self.x.iter().map(|a| a.0) | ------ ^^^^ | | | ...but this borrow... | note: ...can't outlive the anonymous lifetime #1 defined on the method body at 16:5 --> $DIR/static-return-lifetime-infered.rs:16:5 | LL | / fn iter_values_anon(&self) -> impl Iterator<Item=u32> { LL | | self.x.iter().map(|a| a.0) LL | | } | |_____^ help: you can add a constraint to the return type to make it last less than `'static` and match the anonymous lifetime #1 defined on the method body at 16:5 | LL | fn iter_values_anon(&self) -> impl Iterator<Item=u32> + '_ { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ```
2018-06-27Update ui testsOliver Schneider-43/+5
2018-06-27fixupOliver Schneider-6/+44
2018-06-26Don't inspect the generated existential type itemsOliver Schneider-49/+9
2018-06-20Use lifetime name if availableEsteban Küber-1/+1
2018-06-19Add message to `rustc_on_unimplemented` attributes in coreEsteban Küber-6/+6
2018-06-18Auto merge of #51414 - oli-obk:impl_trait_type_def, r=pnkfelixbors-111/+211
Add existential type definitions Note: this does not allow creating named existential types, it just desugars `impl Trait` to a less (but still very) hacky version of actual `existential type` items. r? @nikomatsakis
2018-06-10Fix error codesGuillaume Gomez-4/+4
2018-06-08Add nll test outputEsteban Küber-0/+26
2018-06-08Remove primary label for more readable outputEsteban Küber-6/+6
2018-06-08Suggestion for 'static impl Trait returnEsteban Küber-0/+70
When encountering a named or anonymous sup requirement (for example, `&'a self`) and a `'static` impl Trait return type, suggest adding the `'_` lifetime constraing to the return type.
2018-06-07Add existential type definitonsOliver Schneider-111/+211
2018-05-26Rollup merge of #50987 - estebank:underline-multiple-suggestions, r=petrochencovkennytm-7/+3
Underline multiple suggested replacements in the same line <img width="685" alt="screen shot 2018-05-22 at 21 06 48" src="https://user-images.githubusercontent.com/1606434/40403051-174f3180-5e04-11e8-86b6-261630c5ff80.png"> Follow up to #50943. Fix #50977.
2018-05-24prohibit turbofish in `impl Trait` methodsNiko Matsakis-0/+36
2018-05-24Fix impl Trait suggestionEsteban Küber-6/+2
2018-05-24Account for negative offsets in suggestionsEsteban Küber-1/+1
When suggesting code that has a shorter span than the current code, account for this by keeping the offset as a signed value.
2018-05-22Prevent local paths into libstd from leaking into ui testsOliver Schneider-1/+1
2018-05-21Improve the diagnostic around impl Trait <-> generic param mismatchOliver Schneider-6/+18
2018-05-21Move a test to ui tests so we can observe the output changes betterOliver Schneider-0/+74
2018-05-21Typo caused the wrong "cannot find" errorOliver Schneider-11/+4
2018-04-26Port existing callers of `evaluate_obligation` to the new canonical trait queryAravind Gollakota-0/+2
Except the one in coherence, which needs support for intercrate mode.
2018-04-21Make the unstable StrExt and SliceExt traits private to libcore in not(stage0)Simon Sapin-3/+1
`Float` still needs to be public for libcore unit tests.
2018-04-16Update testsJohn Kåre Alsaker-15/+10
2018-04-05Auto merge of #48709 - tinaun:issue48703, r=nikomatsakisbors-0/+28
remove erroneous error message when checking impl trait params fixes #48703
2018-03-28added testtinaun-0/+28
2018-03-26Stabilize conservative_impl_traitTaylor Cramer-20/+15
2018-03-26Stabilize universal_impl_traitTaylor Cramer-11/+5
2018-03-25Rollup merge of #49046 - Zoxc:error-summary, r=michaelwoeristerkennytm-1/+3
Always print `aborting due to n previous error(s)` r? @michaelwoerister