about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-08-10diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"Vadim Petrochenkov-37/+37
2019-08-10Auto merge of #63437 - Centril:rollup-ryx881p, r=Centrilbors-21/+82
Rollup of 4 pull requests Successful merges: - #63400 (Try to break resolve into more isolated parts) - #63425 (Cleanup historical stability comments) - #63429 (.gitignore: Readd `/tmp/`) - #63432 (Cleanup & Simplify stuff in lowering) Failed merges: r? @ghost
2019-08-10resolve: Address FIXME from the previous commitVadim Petrochenkov-4/+4
Make the `is_import` flag in `ScopeSet` independent from namespace Fix rebase
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-10resolve: Move late resolution into a separate visitorVadim Petrochenkov-20/+81
Move `Resolver` fields specific to late resolution to the new visitor. The `current_module` field from `Resolver` is replaced with two `current_module`s in `LateResolutionVisitor` and `BuildReducedGraphVisitor`. Outside of those visitors `current_module` is replaced by passing `parent_scope` to more functions and using the parent module from it. Visibility resolution no longer have access to later resolution methods and has to use early resolution, so its diagnostics in case of errors regress slightly.
2019-08-10Auto merge of #63352 - jgalenson:reproducible-lto, r=alexcrichtonbors-0/+204
Sort the fat LTO modules to produce deterministic output. Some projects that use LTO for their release builds are not reproducible. We can fix this by sorting the fat LTO modules before using them. It might also be useful to do this for thin LTO, but I couldn't get that to work to test it so I didn't do it.
2019-08-10Rollup merge of #63423 - estebank:priv-tuple, r=zackmdavisMazdak Farrokhzad-0/+116
Mention that tuple structs are private if any of their fields are CC #39703
2019-08-10Rollup merge of #63419 - RalfJung:typeid, r=alexcrichtonMazdak Farrokhzad-4/+14
check against more collisions for TypeId of fn pointer Cc https://github.com/rust-lang/rfcs/pull/2738#issuecomment-519923318
2019-08-10Rollup merge of #63399 - estebank:vec-in-pat, r=CentrilMazdak Farrokhzad-1/+33
More explicit diagnostic when using a `vec![]` in a pattern ``` error: unexpected `(` after qualified path --> $DIR/vec-macro-in-pattern.rs:3:14 | LL | Some(vec![x]) => (), | ^^^^^^^ | | | unexpected `(` after qualified path | in this macro invocation | use a slice pattern here instead | = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) ``` Fix #61933.
2019-08-10Rollup merge of #63394 - jackh726:issue-36804, r=jonas-schievinkMazdak Farrokhzad-0/+31
Add test for issue 36804 I slightly reduced the repro that ICEs on nightly-2017-01-20. Closes #36804
2019-08-10Rollup merge of #63337 - estebank:break-ee0308, r=CentrilMazdak Farrokhzad-58/+515
Tweak mismatched types error - Change expected/found for type mismatches in `break` - Be more accurate when talking about diverging match arms - Tweak wording of function without a return value - Suggest calling bare functions when their return value can be coerced to the expected type - Give more parsing errors when encountering `foo(_, _, _)` Fix #51767, fix #62677, fix #63136, cc #37384, cc #35241, cc #51669.
2019-08-10Give built-in macros stable addresses in the standard libraryVadim Petrochenkov-5/+163
2019-08-09Mention that tuple structs are private if their fields areEsteban Küber-0/+116
2019-08-09check against more collisions for TypeId of fn pointerRalf Jung-4/+14
2019-08-09review comments: use structured suggestionEsteban Küber-6/+16
2019-08-09Stop test from running on Windows.Joel Galenson-10/+205
2019-08-09More explicit diagnostic when using a `vec![]` in a patternEsteban Küber-1/+23
``` error: unexpected `(` after qualified path --> $DIR/vec-macro-in-pattern.rs:3:14 | LL | Some(vec![x]) => (), | ^^^^^^^ | | | unexpected `(` after qualified path | in this macro invocation | use a slice pattern here instead | = help: for more information, see https://doc.rust-lang.org/edition-guide/rust-2018/slice-patterns.html = note: this warning originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) ```
2019-08-09fix testsEsteban Küber-3/+3
2019-08-09review comments: typo and rewordingEsteban Küber-27/+27
2019-08-09review comment: review wording or missing return errorEsteban Küber-20/+20
2019-08-09Extend suggestion support for traits and foreign itemsEsteban Küber-16/+137
2019-08-09Differentiate between tuple structs and tuple variantsEsteban Küber-11/+42
2019-08-09Tweak wording of fn without explicit returnEsteban Küber-20/+20
2019-08-09Recover parser from `foo(_, _)`Esteban Küber-2/+66
2019-08-09When suggesting fn call use an appropriate number of placeholder argumentsEsteban Küber-4/+117
2019-08-09Suggest calling function on type error when finding bare fnEsteban Küber-12/+81
2019-08-09Change wording for function without return valueEsteban Küber-20/+20
Fix #62677
2019-08-09Be more accurate when mentioning type of found match armsEsteban Küber-0/+41
2019-08-09Do not suggest using ! with breakEsteban Küber-4/+1
2019-08-09Tweak mismatched types error on break expressionsEsteban Küber-21/+42
2019-08-09Rollup merge of #63397 - JohnTitor:add-tests-for-ices, r=CentrilMazdak Farrokhzad-0/+94
Add tests for some ICEs Closes #43623 Closes #44405 r? @Centril
2019-08-09Rollup merge of #63114 - matthewjasper:hygienic-format-args, r=petrochenkovMazdak Farrokhzad-8/+129
Remove gensym in format_args This also fixes some things to allow us to export opaque macros from libcore: * Don't consider items that are only reachable through opaque macros as public/exported (so they aren't linted as needing docs) * Mark private items reachable from the root of libcore as unstable - they are now reachable (in principle) in other crates via macros in libcore r? @petrochenkov
2019-08-09Rollup merge of #62672 - lzutao:deprecated-try-macro, r=CentrilMazdak Farrokhzad-3/+11
Deprecate `try!` macro Replaces #62077 Fixes rust-lang/rust-clippy#1361 Fixes #61000
2019-08-09Allow deprecated try macro in test cratesLzu Tao-10/+13
2019-08-09Deprecate `try!` macroBO41-7/+12
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com> Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
2019-08-08Try to fix test on Windows.Joel Galenson-2/+2
2019-08-09Rollup merge of #63387 - Centril:async-block-control-flow-tests, r=cramertjMazdak Farrokhzad-0/+146
Test interaction between `async { ... }` and `?`, `return`, and `break` Per the second checkbox in https://github.com/rust-lang/rust/issues/62121#issuecomment-506884048, test that `async { .. }` blocks: 1. do not allow `break` expressions. 2. get targeted by `return` and not the parent function. 3. get targeted by `?` and not the parent function. Works towards resolving blockers in #63209. r? @cramertj
2019-08-09Rollup merge of #63289 - kornelski:missingcrate, r=zackmdavisMazdak Farrokhzad-26/+26
Don't recommend `extern crate` syntax `extern crate` syntax is not a good recommendation any more, so I've changed it to just print a suggested crate name.
2019-08-09Add test for issue-44405Yuki Okushi-0/+33
2019-08-09Add test for issue-43623Yuki Okushi-0/+61
2019-08-08Add test for issue 36804Jack-0/+31
2019-08-09Test interaction btw async blocks and ?, return, break.Mazdak Farrokhzad-0/+146
2019-08-08Fix fat LTO determinism test so it fails without the fix.Joel Galenson-2/+2
2019-08-08Sort fat LTO modules later and add a test.Joel Galenson-1/+10
2019-08-08Rollup merge of #63379 - jackh726:issue-53096, r=Centril,oli-obkMazdak Farrokhzad-0/+9
Add test for issue 53096 Closes #53096 r? @oli-obk
2019-08-08Rollup merge of #63370 - JohnTitor:fix-ice-63364, r=varkorMazdak Farrokhzad-0/+20
Fix ICE #63364 Fixes #63364 r? @estebank cc @varkor
2019-08-08Move testJack-0/+0
2019-08-08Add test for issue 53096Jack-0/+9
2019-08-08Rollup merge of #63331 - gorup:conditionalinit, r=cramertjMazdak Farrokhzad-0/+43
Test conditional initialization validation in async fns r? @cramertj Per [paper doc](https://paper.dropbox.com/doc/async.await-Call-for-Tests--AiWF2Nt8tgDiA70qFI~oiLOOAg-nMyZGrra7dz9KcFRMLKJy) calling for async/.await tests, tests are desired for conditionally initialized local variables. This PR hopes to provide tests for that. #63294 seems to be tracking the items from the paper doc that this PR is related to #62121 is an open issue asking for more async/.await tests that this relates to --- :+1: executed 2 new tests :+1: tidy
2019-08-08Rollup merge of #63259 - JohnTitor:add-tests-for-some-issues, r=CentrilMazdak Farrokhzad-0/+53
Add tests for some issues Closes #29265 Closes #37433 Closes #49544 r? @Centril