about summary refs log tree commit diff
path: root/src/test/ui/traits
AgeCommit message (Collapse)AuthorLines
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
2018-08-19Lift some Sized checks.Masaki Hara-0/+1
2018-08-14Merged migrated compile-fail tests and ui tests. Fixes #46841.David Wood-0/+2901