about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-09-05or-patterns: fix pprust-expr-roundtrip due to AST change.Mazdak Farrokhzad-3/+3
2019-09-05resolve: test consistent or-patterns being allowed.Mazdak Farrokhzad-38/+132
2019-09-05resolve: test binding mode consistency for or-patterns.Mazdak Farrokhzad-0/+98
2019-09-05resolve: add test for missing bindings in or-patterns.Mazdak Farrokhzad-0/+324
2019-09-05resolve: account for general or-patterns in consistency checking.Mazdak Farrokhzad-4/+11
2019-09-05resolve: add tests for already-bound check.Mazdak Farrokhzad-0/+136
2019-09-05resolve: already-bound-check: account for or-patterns.Mazdak Farrokhzad-3/+4
Also document `ast::Pat::walk`.
2019-09-05Rollup merge of #64128 - Centril:unused-parens-pat, r=davidtwcoMazdak Farrokhzad-47/+192
unused_parens: account for or-patterns and `&(mut x)` Fixes https://github.com/rust-lang/rust/issues/55342. Fixes https://github.com/rust-lang/rust/issues/64106. cc https://github.com/rust-lang/rust/issues/54883 cc https://github.com/rust-lang/rust/pull/64111 r? @oli-obk
2019-09-05Rollup merge of #64110 - estebank:receiver-type, r=CentrilMazdak Farrokhzad-99/+133
Refer to "`self` type" instead of "receiver type" Fix https://github.com/rust-lang/rust/issues/42603.
2019-09-05Rollup merge of #64043 - matthewjasper:underscore-import-tests, r=alexcrichtonMazdak Farrokhzad-0/+54
Add some more tests for underscore imports
2019-09-05Rollup merge of #64038 - matthewjasper:deny-mutual-impl-trait-recursion, ↵Mazdak Farrokhzad-2/+94
r=varkor Check impl trait substs when checking for recursive types closes #64004
2019-09-05Rollup merge of #64031 - Centril:param-attrs-no-macros-test, r=nikomatsakisMazdak Farrokhzad-0/+299
Harden `param_attrs` test wrt. usage of a proc macro `#[attr]` The `param-attrs-builtin-attrs.rs` test file uses the `#[test]` attribute which should cover this but `#[test]` isn't a proc macro attribute so we add another test to be on the safe side. This intends to address https://github.com/rust-lang/rust/pull/64010#issuecomment-526564316. r? @nikomatsakis cc @c410-f3r @petrochenkov cc https://github.com/rust-lang/rust/issues/60406
2019-09-04Auto merge of #63825 - nathanwhit:check-run-results, r=Mark-Simulacrumbors-82/+30
Allow checking of run-pass execution output in compiletest Closes #63751 Adds a `check-run-results` flag to compiletest headers, which if enabled checks the output of the execution of a run-pass test's binary against expected output.
2019-09-03review commentsEsteban Küber-2/+2
2019-09-03unused_parens: fix for or-patterns + &(mut x)Mazdak Farrokhzad-47/+192
2019-09-03Rollup merge of #64104 - Mark-Simulacrum:intrinsic-fn-ptr-ice, r=estebankMazdak Farrokhzad-0/+37
Emit error on intrinsic to fn ptr casts I'm not sure if a type error is the best way of doing this but it seemed like a relatively correct place to do it, and I expect this is a pretty rare case to hit anyway. Fixes #15694
2019-09-03Rollup merge of #64056 - estebank:arbitrary-self-types, r=CentrilMazdak Farrokhzad-0/+67
Account for arbitrary self types in E0599 Fix https://github.com/rust-lang/rust/issues/62373
2019-09-03Rollup merge of #64049 - estebank:if-else-type-err, r=CentrilMazdak Farrokhzad-96/+9
Emit a single error on if expr with expectation and no else clause Fix https://github.com/rust-lang/rust/issues/60254. r? @Centril
2019-09-02account for DUMMY_SP and correct wordingEsteban Küber-9/+11
2019-09-02On object safety violation, point at source when possibleEsteban Küber-62/+92
2019-09-02Refer to "`self` type" instead of "receiver type"Esteban Küber-48/+50
2019-09-02Emit error on intrinsic to fn ptr castsMark Rousskov-0/+37
2019-09-02Auto merge of #63692 - iluuu1994:issue-49660, r=sfacklerbors-0/+77
Test that Wrapping arithmetic ops are implemented for all int types Closes #49660
2019-09-02Auto merge of #63834 - andjo403:rustdoc-linker-remove, r=Mark-Simulacrumbors-1/+1
remove the unstable rustdoc parameter --linker use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-09-01Auto merge of #63870 - estebank:async-fn-call, r=oli-obkbors-2081/+1234
Suggest call fn ctor passed as arg to fn with type param bounds _Reviewer note: the relevant changes are in the second commit, the first is simple and mechanical, but verbose._ When forgetting to call a fn in an argument position to an fn that has a generic bound: ```rust async fn foo() {} fn bar(f: impl Future<Output=()>) {} fn main() { bar(foo); // <- should be `bar(foo());` } ``` suggest calling it: ``` error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::future::Future` is not satisfied --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:5 | LL | fn bar(f: impl Future<Output=()>) {} | --------------------------------- required by `bar` ... LL | bar(foo); | ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}` | = help: it looks like you forgot to use parentheses to call the function: `foo()` ``` Fix #63100. Follow up to #63833 and #63337.
2019-09-01Account for arbitrary self types in E0599Esteban Küber-0/+67
2019-09-01review commentEsteban Küber-2/+2
2019-09-01Auto merge of #64036 - matthewjasper:kill-borrows-on-self-assign, r=estebankbors-0/+20
Kill borrows from assignments after generating new borrows Closes #63719
2019-09-01remove the unstable rustdoc parameter --linkerAndreas Jonson-1/+1
use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-08-31Emit a single error on if expr with expectation and no else clauseEsteban Küber-96/+9
2019-08-31Fix nll testsEsteban Küber-37/+24
2019-08-31Auto merge of #63703 - tommilligan:warn-empty-doctest, r=ollie27bors-0/+32
rustdoc: warn on empty doc test Closes #60319. A doc test that only contains whitespace should result in a warning. This PR adds detection of empty doc tests to `check-code-block-syntax`, as having an invalid doc test is mutually exclusive with an empty doc test.
2019-08-31Add some more tests for underscore importsMatthew Jasper-0/+54
2019-08-31Check impl trait substs when checking for recursive typesMatthew Jasper-0/+92
This prevents mutual `async fn` recursion
2019-08-31Slightly clean up the error for recursive `async fn`Matthew Jasper-2/+2
* Make it clear that type erasure is required, not just pointer indirection. * Don't make the message specific to direct recursion.
2019-08-31Kill borrows from assignments after generating new borrowsMatthew Jasper-0/+20
2019-08-31Suggest call fn ctor passed as arg to fn with type param boundsEsteban Küber-0/+56
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-2044/+1154
2019-08-31Auto merge of #63991 - Centril:unique-improper-ctype, r=rkruppebors-13/+23
`improper_ctypes`: guard against accidental change to `Unique<T>` r? @eddyb
2019-08-31Harden param_attrs test wrt. usage of proc macro attrs.Mazdak Farrokhzad-0/+299
2019-08-31improper_ctypes: guard against accidental change to Unique<T>.Mazdak Farrokhzad-13/+23
2019-08-30Auto merge of #64026 - Centril:rollup-le667lp, r=Centrilbors-106/+162
Rollup of 7 pull requests Successful merges: - #62957 (Match the loop examples) - #63600 (Merge oli-obk mail addresses) - #63684 (Constify LinkedList new function) - #63847 ([rustdoc] Fix system theme detection) - #63999 (Add missing links on AsRef trait) - #64014 ( miri: detect too large dynamically sized objects ) - #64015 (some const-eval test tweaks) Failed merges: r? @ghost
2019-08-30Rollup merge of #64015 - RalfJung:const-tests, r=oli-obkMazdak Farrokhzad-60/+84
some const-eval test tweaks Best reviewed commit-by-commit. r? @oli-obk
2019-08-30Rollup merge of #64014 - RalfJung:miri-slice, r=oli-obkMazdak Farrokhzad-46/+78
miri: detect too large dynamically sized objects Needed to make https://github.com/rust-lang/miri/pull/929 pass. r? @oli-obk
2019-08-30Auto merge of #63982 - sam09:fix-63976, r=estebankbors-2/+2
When accessing private field of union, do not misidentify it as a struct Fix incorrect error message when accessing private field of union. Fixes #63976.
2019-08-30add testRalf Jung-0/+29
2019-08-30Skip wrapping arithmetic tests on emscripten for 128 bit integersIlija Tovilo-0/+2
2019-08-30const-eval tests: make all unions repr(C)Ralf Jung-59/+79
2019-08-30explain why REF_AS_USIZE is importantRalf Jung-0/+3
2019-08-30tweak const-valid testRalf Jung-1/+2