summary refs log tree commit diff
path: root/src/test/ui/impl-trait
AgeCommit message (Collapse)AuthorLines
2019-10-27Rollup merge of #65855 - ObsidianMinor:extended_error/E0666, r=varkorMazdak Farrokhzad-1/+2
Add long error explaination for E0666 In the spirit of the month of spooks, here's a long explanation for E0666 for #61137.
2019-10-27Rollup merge of #65777 - matthewjasper:allow-impl-trait-expansion, r=davidtwcoMazdak Farrokhzad-24/+42
Don't ICE for completely unexpandable `impl Trait` types Save the resolution of these types (to themselves) to the typeck tables so that they will eventually reach E0720. closes #65561
2019-10-26Add detailed explaination for E0666Sydney Acksman-1/+2
2019-10-26Rollup merge of #65773 - estebank:sugg-whitespace, r=CentrilMazdak Farrokhzad-0/+9
Increase spacing for suggestions in diagnostics Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages. r? @Centril
2019-10-25Apply suggestions from code reviewmatthewjasper-2/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-10-24Don't ICE for completely unexpandable `impl Trait` typesMatthew Jasper-24/+42
2019-10-24Increase spacing for suggestions in diagnosticsEsteban Küber-0/+9
Make the spacing between the code snippet and verbose structured suggestions consistent with note and help messages.
2019-10-24Changed APIT with explicit generic args span to specific arg spansSydney Acksman-4/+6
2019-10-21Rollup merge of #65614 - varkor:apit-explicit-generics, r=matthewjasperMazdak Farrokhzad-4/+4
Improve error message for APIT with explicit generic arguments This is disallowed with type or const generics. cc https://github.com/rust-lang/rust/issues/61410.
2019-10-20Improve error message for APIT with explicit generic parametersvarkor-4/+4
This is disallowed with type or const generics.
2019-10-15Handle more cases involving `impl` and `trait`Esteban Küber-2/+5
2019-10-11Print lifetimes with backticksYuki Okushi-9/+9
2019-09-30Fixed grammar in one diagnostic and blessed tests.Alexander Regueiro-6/+6
2019-09-25Rollup merge of #64746 - estebank:elide-impl-trait-obligations-on-err, ↵Mazdak Farrokhzad-46/+60
r=cramertj Remove blanket silencing of "type annotation needed" errors Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneeded errors. Fix #64084.
2019-09-24Add additional tests for type alias impl trait coherenceAaron Hill-0/+71
2019-09-24Remove blanket silencing of "type annotation needed" errorsEsteban Küber-46/+60
Remove blanket check for existence of other errors before emitting "type annotation needed" errors, and add some eager checks to avoid adding obligations when they refer to types that reference `[type error]` in order to reduce unneded errors.
2019-09-22On obligation errors point at the unfulfilled binding when possibleEsteban Küber-3/+3
2019-09-18Add explanation to type mismatch involving type params and assoc typesEsteban Küber-0/+12
2019-09-09Auto merge of #64237 - estebank:tweak-method-not-found, r=Centrilbors-29/+29
Give method not found a primary span label
2019-09-08Give method not found a primary span labelEsteban Küber-29/+29
2019-09-08Update test stderr with results of enabling unused lintsMark Rousskov-7/+5
2019-09-05Rollup merge of #64038 - matthewjasper:deny-mutual-impl-trait-recursion, ↵Mazdak Farrokhzad-0/+60
r=varkor Check impl trait substs when checking for recursive types closes #64004
2019-09-03Rollup merge of #64056 - estebank:arbitrary-self-types, r=CentrilMazdak Farrokhzad-0/+8
Account for arbitrary self types in E0599 Fix https://github.com/rust-lang/rust/issues/62373
2019-09-01Account for arbitrary self types in E0599Esteban Küber-0/+8
2019-08-31Check impl trait substs when checking for recursive typesMatthew Jasper-0/+60
This prevents mutual `async fn` recursion
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-15/+9
2019-08-20--bless post no async_await gates in tests.Mazdak Farrokhzad-7/+7
2019-08-20Remove async_await gates from tests.Mazdak Farrokhzad-3/+2
2019-08-19use static as object-lifetime default for type XX in `Foo<Item=XX>`Niko Matsakis-0/+27
Currently the default is "inherited" from context, so e.g. `&impl Foo<Item = dyn Bar>` would default to `&'x impl Foo<Item = dyn Bar + 'x>`, but this triggers an ICE and is not very consistent. This patch doesn't implement what I expect would be the correct semantics, because those are likely too complex. Instead, it handles what I'd expect to be the common case -- where the trait has no lifetime parameters.
2019-08-19distinguish object-lifetime-default elision from other elisionNiko Matsakis-0/+50
Object-lifetime-default elision is distinct from other forms of elision; it always refers to some enclosing lifetime *present in the surrounding type* (e.g., `&dyn Bar` expands to `&'a (dyn Bar + 'a)`. If there is no enclosing lifetime, then it expands to `'static`. Therefore, in an `impl Trait<Item = dyn Bar>` setting, we don't expand to create a lifetime parameter for the `dyn Bar + 'X` bound. It will just be resolved to `'static`. Annoyingly, the responsibility for this resolution is spread across multiple bits of code right now (`middle::resolve_lifetimes`, `lowering`). The lowering code knows that the default is for an object lifetime, but it doesn't know what the correct result would be. Probably this should be fixed, but what we do now is a surgical fix: we have it generate a different result for elided lifetimes in a object context, and then we can ignore those results when figuring out the lifetimes that are captured in the opaque type.
2019-08-16Update stderr files with --blesssd234678-3/+3
2019-08-16Remove meaningless comments in src/testsd234678-6/+0
2019-08-12typeck: Prohibit RPIT types that inherit lifetimesDavid Wood-5/+13
This commit prohibits return position `impl Trait` types that "inherit lifetimes" from the parent scope. The intent is to forbid cases that are challenging until they can be addressed properly.
2019-08-10Fix calls to resolver from rustdoc and HIR loweringVadim Petrochenkov-1/+1
Cleanup some surrounding code. Support resolution of intra doc links in unnamed block scopes. (Paths from rustdoc now use early resolution and no longer need results of late resolution like all the built ribs.) Fix one test hitting file path limits on Windows.
2019-08-02Fix fallout after rebasevarkor-2/+2
2019-08-02Replace "existential" by "opaque"varkor-10/+10
2019-08-02Update syntax in existing testsvarkor-65/+85
2019-07-30--bless tests due to INCOMPLETE_FEATURES being a lint.Mazdak Farrokhzad-6/+14
2019-07-27tests: Move run-pass tests with naming conflicts to uiVadim Petrochenkov-0/+69
2019-07-27tests: Move run-pass tests without naming conflicts to uiVadim Petrochenkov-0/+1195
2019-07-21normalize use of backticks in compiler messages for librustc/hirSamy Kacimi-1/+1
https://github.com/rust-lang/rust/issues/60532
2019-07-19Auto merge of #62684 - petrochenkov:scopevisit, r=davidtwcobors-11/+10
resolve: Improve candidate search for unresolved macro suggestions Use same scope visiting machinery for both collecting suggestion candidates and actually resolving the names. The PR is better read in per-commit fashion with whitespace changes ignored (the first commit in particular moves some code around). This should be the last pre-requisite for https://github.com/rust-lang/rust/pull/62086. r? @davidtwco
2019-07-18Rollup merge of #62777 - gilescope:self-referencial-to-recursion, r=eddybMark Rousskov-16/+16
Self-referencial type now called a recursive type As per Boat's suggestion - #62539, this makes the error message clearer.
2019-07-18resolve: Attempt to resolve unresolved paths in macro namespaceVadim Petrochenkov-11/+10
2019-07-18Self-referencial type renamed to recursive type.Giles Cope-16/+16
2019-07-09Auto merge of #62221 - jonas-schievink:normalize-impl-trait, r=nikomatsakisbors-0/+197
Normalize projections appearing in `impl Trait` Fixes #60414 This does not try to do the same for `existential type`s (which have the same bug), since that always seems to lead to cycle errors.
2019-07-09rewrite the test to workaround #51525Niko Matsakis-2/+8
2019-07-09Rollup merge of #62090 - ↵Mazdak Farrokhzad-0/+127
davidtwco:ice-async-await-out-of-range-substitution, r=nikomatsakis typeck: merge opaque type inference logic Fixes #55872. See [relevant Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/type.20parameter.20out.20of.20range.20.2355872). r? @nikomatsakis
2019-07-06Remove compile-pass from compiletestYuki Okushi-4/+4
Also change annotations in some tests
2019-07-04Rollup merge of #62317 - JohnTitor:move-tests-to-build-pass, r=CentrilMazdak Farrokhzad-13/+13
Migrate `compile-pass` annotations to `build-pass` This is a part of #62277. As a first step, the `compile-pass` tests are migrated to `build-pass`. r? @cramertj cc @Centril