about summary refs log tree commit diff
path: root/src/test/ui
AgeCommit message (Collapse)AuthorLines
2019-04-04Auto merge of #59517 - Zoxc:new-queries, r=oli-obkbors-109/+109
Move query definitions over to the proc macro r? @oli-obk
2019-04-02Rollup merge of #59166 - seanmonstar:trait-alias-import, r=alexregMazdak Farrokhzad-0/+44
resolve: collect trait aliases along with traits It seems trait aliases weren't being collected as `TraitCandidates` in resolve, this should change that. (I can't compile the full compiler locally, so relying on CI...) Fixes https://github.com/rust-lang/rust/issues/56485 r? @alexreg
2019-04-01Refactor async fn return type loweringTaylor Cramer-26/+81
async fn now lowers directly to an existential type declaration rather than reusing the `impl Trait` return type lowering. As part of this, it lowers all argument-position elided lifetimes using the in-band-lifetimes machinery, creating fresh parameter names for each of them, using each lifetime parameter as a generic argument to the generated existential type. This doesn't currently successfully allow multiple argument-position elided lifetimes since `existential type` doesn't yet support multiple lifetimes where neither outlive the other. This requires a separate fix.
2019-04-01resolve all in scope trait aliases, then elaborate their boundsSean McArthur-0/+44
2019-04-01Rollup merge of #59041 - saleemjaffer:trait_doc_comment_better_error_msg, ↵Mazdak Farrokhzad-0/+17
r=pnkfelix fixes rust-lang#56766 fixes #56766
2019-04-01Rollup merge of #58919 - estebank:impl-trait-return-lifetime, r=pnkfelixMazdak Farrokhzad-11/+21
Suggest using anonymous lifetime in `impl Trait` return Fix #48467. r? @nikomatsakis
2019-03-31Rollup merge of #58805 - fabric-and-ink:redundant_import, r=petrochenkovMazdak Farrokhzad-11/+90
Lint for redundant imports Add lint for redundant imports. The changes are suggested by @petrochenkov. Closes #10178.
2019-03-31Suggest using anonymous lifetime in `impl Trait` return without hacksEsteban Küber-14/+18
Fallback to `static_impl_trait` for nice error message by peeking at the return type and the lifetime type. Point at the return type instead of the return expr/stmt in NLL mode.
2019-03-31Rollup merge of #59574 - JohnTitor:distinguish-error-vs-warning, r=CentrilMazdak Farrokhzad-2/+2
Distinguish message for external macros depending on error level fixes #57716 (I picked you because assigned to this issue.) r? @estebank
2019-03-31Rollup merge of #59572 - davidtwco:issue-59508, r=varkorMazdak Farrokhzad-13/+85
Include bounds in generic re-ordering diagnostic Fixes #59508. r? @estebank cc @varkor
2019-03-31Only mention const generics if enabled.David Wood-14/+46
This commit updates the generic parameter re-ordering diagnostic to only mention const generics if the feature is enabled.
2019-03-31Include bounds in generic reordering diagnostic.David Wood-0/+40
This commit extends the existing generic re-ordering diagnostic to include any bounds on the generic parameter, thus producing correct suggestions.
2019-03-31Distinguish depending on error levelYuki OKUSHI-2/+2
Remove unnecessary comment
2019-03-30Handle glob import in redundancy checkFabian Drinck-9/+0
2019-03-30Change message to present tenseFabian Drinck-4/+4
2019-03-30Add glob import to redundancy testFabian Drinck-6/+36
2019-03-30Fix testsFabian Drinck-5/+13
2019-03-30Replace REDUNDANT_IMPORT with UNUSED_IMPORTSFabian Drinck-63/+14
2019-03-30Edit ui testsFabian Drinck-0/+2
2019-03-30Distinguish between imported and defined itemsFabian Drinck-1/+1
2019-03-30Bless testsFabian Drinck-0/+69
2019-03-30Improve warningFabian Drinck-7/+4
2019-03-30Add lint for redundant importsFabian Drinck-0/+31
Co-authored-by: Stephan Schauerte <stephan.schauerte@gmail.com>
2019-03-30Update testsJohn Kåre Alsaker-109/+109
2019-03-30Rollup merge of #59463 - ↵Mazdak Farrokhzad-0/+454
pnkfelix:issue-56327-skip-dyn-keyword-lint-under-macros, r=matthewjasper skip dyn keyword lint under macros This PR is following my own intuition that `rustfix` should never inject bugs into working code (even if that comes at the expense of it failing to fix things that will become bugs). Fix #56327
2019-03-30Rollup merge of #59455 - estebank:borrow-sugg-shorthand-field, r=davidtwcoMazdak Farrokhzad-4/+70
Account for short-hand field syntax when suggesting borrow Fix #52965.
2019-03-30Rollup merge of #59453 - estebank:recover-tuple-parse, r=petrochenkovMazdak Farrokhzad-8/+171
Recover from parse error in tuple syntax
2019-03-30Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, ↵Mazdak Farrokhzad-55/+206
r=petrochenkov,QuietMisdreavus RFC 2008: Enum Variants Part of #44109. See [Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/rfc-2008/near/132663140) for previous discussion. r? @petrochenkov cc @nikomatsakis
2019-03-29Suggest using anonymous lifetime in `impl Trait` returnEsteban Küber-3/+9
2019-03-29revert change to test file as per review requestEsteban Küber-2/+1
2019-03-29Rollup merge of #59486 - varkor:dead-code-impl, r=sanxiynMazdak Farrokhzad-0/+17
Visit `ImplItem` in `dead_code` lint Fixes https://github.com/rust-lang/rust/issues/47131.
2019-03-29Rollup merge of #59473 - estebank:borrow-sugg-inside-macro, r=davidtwcoMazdak Farrokhzad-4/+33
Do not emit incorrect borrow suggestion involving macros and fix overlapping multiline spans Fix #58298.
2019-03-29Rollup merge of #59467 - hgallagher1993:local_branch, r=estebankMazdak Farrokhzad-84/+173
Better diagnostic for binary operation on BoxedValues Fixes #59458
2019-03-28fix text after rebaseEsteban Küber-0/+8
2019-03-29Rollup merge of #59394 - mark-i-m:dup-matcher-bindings-2, r=CentrilMazdak Farrokhzad-5/+10
warn -> deny duplicate match bindings This is the next step of https://github.com/rust-lang/rust/issues/57742 r? @Centril - [x] Decide whether to go to deny-by-default or hard error. - My preference is to make this deny-by-default, rather than going straight to a hard error. The CI should fail because I haven't updated the ui test yet. I'll update it when we decide which to do. - [x] Update [test](https://github.com/mark-i-m/rust/blob/c25d6b83441e0c060ee0273193ef27b29e1318cd/src/test/ui/macros/macro-multiple-matcher-bindings.rs) - [ ] ~Crater run~ see https://github.com/rust-lang/rust/pull/59394#issuecomment-477817351
2019-03-28Implement `#[non_exhaustive]` on variants.David Wood-55/+206
This commit removes the check that disallows the `#[non_exhaustive]` attribute from being placed on enum variants and removes the associated tests. Further, this commit lowers the visibility of enum variant constructors when the variant is marked as non-exhaustive.
2019-03-28deny duplicate matcher bindings by defaultmark-5/+10
2019-03-28Add check for when left and right overlap and change span for explanation to ↵hgallagher1993-42/+9
point at operator
2019-03-28Rollup merge of #59429 - estebank:for-loop-move-nll, r=petrochenkovMazdak Farrokhzad-22/+14
When moving out of a for loop head, suggest borrowing it in nll mode Follow up to #59195 for NLL.
2019-03-28Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obkMazdak Farrokhzad-108/+108
compiletest: make path normalization smarter Fixes #59109.
2019-03-28Rollup merge of #59371 - dlrobertson:rename_va_list_copy, r=joshtriplettMazdak Farrokhzad-19/+19
ffi: rename VaList::copy to VaList::with_copy Rename `VaList::copy` to `VaList::with_copy` r? @joshtriplett
2019-03-28Revise and generalize the macros-unlinted tests.Felix S. Klock II-2/+85
Review feedback asked for the test to be generalized to include macros 2.0; that generalization is dyn-2015-idents-in-decl-macros-unlinted.rs As a drive-by, I also decided to revise the test to make it clear *why* we cannot generally lint these cases. (I already had similar demonstrations in dyn-2015-edition-keyword-ident-lint.rs, but it does not hurt to try to emphasize matters.) I also added some commentary on the cases where we could choose to make the lint smarter, namely the situations where a macro is *definitely* using `dyn` as an identifier (because it is using it as a path component).
2019-03-28Revise test slightly so that `dyn` in macro invocation *must* be parsed as ↵Felix S. Klock II-4/+4
keyword in test. Back-story: After reflection this morning, I realized that the previous form of this test would allow the macro invocation to treat the `dyn` input as a raw-identifier rather than a keyword, and since the input was discarded by that version of the macro, the test would pass despite the detail that the input `dyn` should not have been parsed as a raw-identifier. This revision fixes that oversight, by actually *using* the macro input to construct a `Box<dyn Trait>` type.
2019-03-28Recover from parse error in tuple syntaxEsteban Küber-9/+165
2019-03-28Rollup merge of #59198 - estebank:recovered-pattern, r=zackmdavisMazdak Farrokhzad-27/+4
Do not complain about unmentioned fields in recovered patterns When the parser has to recover from malformed code in a pattern, do not complain about missing fields. Fix #59145.
2019-03-27Expand testEsteban Küber-2/+30
2019-03-27Account for short-hand field syntax when suggesting borrowEsteban Küber-4/+42
2019-03-27Account for fully overlapping multiline annotationsEsteban Küber-12/+9
When two multiline span labels point at the same span, we special case the output to avoid weird behavior: ``` foo( _____^ |_____| || bar, || ); || ^ ||______| |______foo baz ``` instead showing ``` foo( _____^ | bar, | ); | ^ | | |______foo baz ```
2019-03-27Add testEsteban Küber-0/+35
2019-03-27Do not suggest borrowing when the span comes from a macroEsteban Küber-4/+1