about summary refs log tree commit diff
path: root/src/test/ui/traits
AgeCommit message (Collapse)AuthorLines
2019-04-22update tests for migrate mode by defaultMatthew Jasper-20/+6
2019-04-18hide `--explain` hint if error has no extended infoAndy Russell-16/+8
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-01resolve all in scope trait aliases, then elaborate their boundsSean McArthur-0/+44
2019-03-27Better diagnostic for binary operation on BoxedValueshgallagher1993-2/+4
2019-03-23Tweak spans for E0599Esteban Küber-12/+4
2019-03-11Update NLL testsVadim Petrochenkov-1/+1
2019-03-11Update testsVadim Petrochenkov-64/+64
2019-02-12Added tests.Alexander Regueiro-0/+21
2019-02-07Update testsvarkor-7/+3
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-01-22Stabilize Any::get_type_id and rename to type_idSimon Sapin-2/+1
FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
2019-01-19Rollup merge of #57502 - nikomatsakis:fix-trait-alias-1b, r=nikomatsakisMazdak Farrokhzad-0/+49
make trait-aliases work across crates This is rebase of a small part of @alexreg's PR #55994. It focuses just on the changes that integrate trait aliases properly into crate metadata, excluding the stylistic edits and the trait objects. The stylistic edits I also rebased and can open a separate PR. The trait object stuff I found challenging and decided it basically needed to be reimplemented. For now I've excluded it. Since this is really @alexreg's work (I really just rebased) I am going to make it r=me once it is working. Fixes #56488. Fixes #57023.
2019-01-14Rollup merge of #57540 - estebank:eval-more, r=petrochenkovMazdak Farrokhzad-8/+10
Modify some parser diagnostics to continue evaluating beyond the parser Continue evaluating further errors after parser errors on: - trailing type argument attribute - lifetime in incorrect location - incorrect binary literal - missing `for` in `impl Trait for Foo` - type argument in `where` clause - incorrect float literal - incorrect `..` in pattern - associated types - incorrect discriminator value variant error and others. All of these were found by making `continue-parse-after-error` `true` by default to identify errors that would need few changes. There are now only a handful of errors that have any change with `continue-parse-after-error` enabled. These changes make it so `rust` _won't_ stop evaluation after finishing parsing, enabling type checking errors to be displayed on the existing code without having to fix the parse errors. Each commit has an individual diagnostic change with their corresponding tests. CC #48724.
2019-01-12Suggest correct location for lifetime parameters in useEsteban Küber-7/+9
2019-01-11Continue parsing after lifetime in incorrect locationEsteban Küber-1/+1
2019-01-10new trait alias testsNiko Matsakis-0/+49
Co-authored-by: Alexander Regueiro <alexreg@me.com>
2019-01-09clarify resolve typo suggestionAndy Russell-1/+1
Include the kind of the binding that we're suggesting, and use a structured suggestion.
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-5/+5
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-26Fixed more tests.Alexander Regueiro-8/+16
2018-12-25Remove licensesMark Rousskov-709/+147
2018-12-24make non_camel_case_types an early lintAndy Russell-9/+11
2018-12-18improve tests as suggested by review commentsAriel Ben-Yehuda-2/+92
2018-12-16fix trait objects with a Self-having projection vaAriel Ben-Yehuda-0/+57
This follows ALT2 in the issue. Fixes #56288.
2018-12-08fix span for invalid number of parameters in trait methodGuillaume Gomez-1/+1
2018-12-04Update testsOliver Scherer-8/+8
2018-11-22Do not point at associated types from other cratesEsteban Küber-5/+0
This is a somewhat arbitrary restriction in order to be consistent in the output of the tests regardless of target platform.
2018-11-22Reword and fix testEsteban Küber-1/+1
2018-11-22Point at the associated type's def spanEsteban Küber-0/+5
2018-11-11Rollup merge of #55687 - alexreg:fix-24010, r=scalexmPietro Albini-2/+2
Take supertraits into account when calculating associated types Fixes #24010 and #23856. Applies to trait aliases too. As a by-product, this PR also makes repeated bindings of the same associated item in the same definition a hard error. This was previously a warning with a note about it becoming a hard error in the future. See #50589 for more info. I talked about this with @nikomatsakis recently, but only very superficially, so this shouldn't stop anyone from assigning it to themself to review and r+. N.B. The "WIP" commits represent imperfect attempts to solve the problem just for trait objects, but I've left them in for reference for the sake of whomever is reviewing this. CC @carllerche @theemathas @durka @mbrubeck
2018-11-07Only do check for trait objects, not trait or trait alias definitions.Alexander Regueiro-2/+2
2018-11-07Added error for duplicate bindings of associated type.Alexander Regueiro-17/+0
2018-11-07Added tests.Alexander Regueiro-0/+17
2018-11-07Removed `#[rustc_error]` from tests that are all `// compile-pass`.Felix S. Klock II-23/+7
I also added `// skip-codegen` to each one, to address potential concerns that this change would otherwise slow down our test suite spending time generating code for files that are really just meant to be checks of compiler diagnostics. (However, I will say: My preference is to not use `// skip-codegen` if one can avoid it. We can use all the testing of how we drive LLVM that we can get...) (Updated post rebase.)
2018-11-03Auto merge of #55101 - alexreg:trait-aliases, r=nikomatsakisbors-82/+96
Implement trait aliases (RFC 1733) Extends groundwork done in https://github.com/rust-lang/rust/pull/45047, and fully implements https://github.com/rust-lang/rfcs/pull/1733. CC @durka @nikomatsakis
2018-11-03Added WF checking for trait alias definitions.Alexander Regueiro-71/+61
2018-11-03Extended elaboration for trait aliases to include arbitrary bounds.Alexander Regueiro-5/+6
2018-11-03Add more tests.Alexander Regueiro-42/+89
2018-11-03Added tests.Alexander Regueiro-82/+58
2018-11-01update tests that have changed outputMichael Hewson-42/+9
I’m not sure why these tests have different output now, but they do. In all cases, the error message that is missing looks like this: “the trait bound `dyn Trait: Trait` is not satisfied” My guess is that the error message is going away because object-safety now involves trait solving, and these extra error messages are no longer leaking out.
2018-10-21Use new region infer errors for explaining borrowsMatthew Jasper-3/+4
This gives at least some explanation for why a borrow is expected to last for a certain free region. Also: * Reports E0373: "closure may outlive the current function" with NLL. * Special cases the case of returning a reference to (or value referencing) a local variable or temporary (E0515). * Special case assigning a reference to a local variable in a closure to a captured variable.
2018-10-16Check the type of statics and constants for `Sized`nessOliver Scherer-6/+3
2018-10-11structured suggestion for E0223 ambiguous associated typeZack M. Davis-9/+3
It looks like we tend to use angle-brackets around the placeholder in the few other places we use `Applicability::HasPlaceholders`, but that would be confusing here, so ...
2018-10-04Convert conservative_impl_trait.rs to compile-passJonas Schievink-0/+18
2018-08-24updates tests to use new error codeMatthew Russo-5/+5
2018-08-20Fix diagnostic regressionvarkor-6/+6
2018-08-20Update new ui testsvarkor-10/+10
2018-08-19Fix some remaining testsvarkor-2/+2
2018-08-19Refactor generic argument count check in astconvvarkor-1/+1
2018-08-19Revert broken testvarkor-0/+1
2018-08-19"Fix" annoying testvarkor-1/+0