Commit Graph

74639 Commits

Author SHA1 Message Date
Manish Goregaokar b52b33a386 Rollup merge of #48143 - nikomatsakis:termination_trait_in_tests, r=eddyb
Termination trait in tests

Support the `Termination` trait in unit tests (cc https://github.com/rust-lang/rust/issues/43301)

Also, a drive-by fix for #47075.

This is joint work with @bkchr.
2018-02-24 12:47:58 -08:00
Manish Goregaokar a79e5e210e Rollup merge of #48084 - cramertj:impl-trait-errors, r=nikomatsakis
Error on nested impl Trait and path projections from impl Trait

cc #34511

r? @nikomatsakis
2018-02-24 12:47:58 -08:00
Manish Goregaokar 25ec810921
Rollup merge of #47987 - Zoxc:rm-recursion-checking, r=eddyb
Remove "static item recursion checking" in favor of relying on cycle checks in the query engine

Tests are changed to use the cycle check error message instead. Some duplicate tests are removed.

r? @eddyb
2018-02-24 08:55:36 -08:00
bors 6070d3e47e Auto merge of #48476 - Manishearth:rollup, r=Manishearth
Rollup of 12 pull requests

- Successful merges: #47933, #48072, #48083, #48123, #48157, #48219, #48221, #48245, #48429, #48436, #48438, #48472
- Failed merges:
2018-02-24 07:55:34 +00:00
bors b0a8620ed6 Auto merge of #48487 - Mark-Simulacrum:appveyor-split, r=Mark-Simulacrum
Split MinGW tests into two builders on AppVeyor

Run-pass and compile-fail tests appear to take the most significant chunk of time, so split them into their own builder.

Should help with https://github.com/rust-lang/rust/issues/46903.

r? @kennytm
cc @alexcrichton
2018-02-24 00:54:15 +00:00
Mark Simulacrum 91fbefa594 Split MinGW tests into two builders on AppVeyor
Run-pass and compile-fail tests appear to take the most significant
chunk of time, so split them into their own builder.
2018-02-23 16:19:17 -07:00
Manish Goregaokar b26442a3cb
Rollup merge of #48472 - Manishearth:clippyup, r=oli-obk
Update clippy

r? @oli-obk
2018-02-23 10:24:57 -08:00
Manish Goregaokar f2cbb764b8
Rollup merge of #48438 - mbrubeck:docs, r=TimNN
[docs] Minor wording changes to drain_filter docs

The docs currently say, "If the closure returns false, it will try again, and call the closure on the next element."  But this happens regardless of whether the closure returns true or false.
2018-02-23 10:24:56 -08:00
Manish Goregaokar cf3623f284
Rollup merge of #48436 - adeschamps:string-doc-fix, r=estebank
Small grammar fix to docs for String::new()
2018-02-23 10:24:55 -08:00
Manish Goregaokar f2da2fa315
Rollup merge of #48429 - toidiu:patch-1, r=nikomatsakis
update tracking issue for nll

Point to the new tracing issue for nll

For reference https://github.com/rust-lang/rust/issues/44928
2018-02-23 10:24:54 -08:00
Manish Goregaokar 74f6794193
Rollup merge of #48245 - spastorino:sparse_bitsets, r=nikomatsakis
Use sparse bitsets instead of dense ones for NLL results

This is for https://github.com/rust-lang/rust/issues/48170.

r? @nikomatsakis
2018-02-23 10:24:53 -08:00
Manish Goregaokar 9f36a35e61
Rollup merge of #48221 - rkruppe:improve-ctypes-lint, r=estebank
Overhaul improper_ctypes output

This snowballed into a rather big set of improvements to the diagnostics of the improper_ctypes lint. See commits for details, including effects of each change on the `compile-fail/improper-ctypes.rs` test (now a UI test), which is pretty gnarly and hopefully not representative of real code, but covers a lot of different error cases.

Fixes #42050
2018-02-23 10:24:52 -08:00
Manish Goregaokar 5d30cbab8e
Rollup merge of #48219 - andjo403:export_symbol, r=michaelwoerister
lookup exported symbols only when needed.

reduces the time to compile small file with no optimization by half.
2018-02-23 10:24:51 -08:00
Manish Goregaokar 5fd8d18097
Rollup merge of #48157 - scottmcm:try-for-each, r=dtolnay
Add Iterator::try_for_each

The fallible version of `for_each` aka the stateless version of `try_fold`.  Inspired by @cuviper's comment in https://github.com/rust-lang/rust/pull/45379#issuecomment-338370020 as a more direct and obvious solution than `.map(f).collect::<Result<(), _>>()`.

Like `for_each`, no need for an `r` version thanks to overrides in `Rev`.

`iterator_try_fold` tracking issue: https://github.com/rust-lang/rust/issues/45594
2018-02-23 10:24:49 -08:00
Manish Goregaokar 1e67c1315b
Rollup merge of #48123 - nikomatsakis:issue-47244-expected-num-args, r=estebank
detect wrong number of args when type-checking a closure

Instead of creating inference variables for those argument types, use
the trait error-reporting code to give a nicer error. This also
improves some other spans for existing tests.

Fixes #47244

r? @estebank
2018-02-23 10:24:48 -08:00
Manish Goregaokar a1acb15591
Rollup merge of #48083 - jseyfried:improve_tuple_struct_field_access_hygiene, r=petrochenkov
Improve tuple struct field access hygiene

Fixes #47312 by fixing a span bug.
r? @nrc
2018-02-23 10:24:47 -08:00
Manish Goregaokar 4941cb4796
Rollup merge of #48072 - cramertj:impl-trait-lifetime-res, r=nikomatsakis
Fix nested impl trait lifetimes

Fixes #46464
cc https://github.com/rust-lang/rust/issues/34511

r? @nikomatsakis
2018-02-23 10:24:46 -08:00
Manish Goregaokar abf4d70da8
Rollup merge of #47933 - Zoxc:plugin-panics, r=nikomatsakis
Do not run the default panic hook inside procedural macros.

Fixes #47812

r? @nikomatsakis
2018-02-23 10:24:45 -08:00
Manish Goregaokar 9e6d2d761e Update Clippy 2018-02-23 09:04:16 -08:00
Niko Matsakis 10f7c11092 re-export `assert_test_result` for use when testing libtest itself 2018-02-23 10:11:06 -05:00
Niko Matsakis 068e3832cd update test -- we now give a slightly different error 2018-02-23 07:34:00 -05:00
bors 063deba92e Auto merge of #47799 - topecongiro:fix-span-of-visibility, r=petrochenkov
Fix span of visibility

This PR

1. adds a closing parenthesis to the span of `Visibility::Crate` (e.g. `pub(crate)`). The current span only covers `pub(crate`.
2. adds a `span` field to `Visibility::Restricted`. This span covers the entire visibility expression (e.g. `pub (in self)`). Currently all we can have is a span for `Path`.

This PR is motivated by the bug found in rustfmt (https://github.com/rust-lang-nursery/rustfmt/issues/2398).

The first change is a strict improvement IMHO. The second change may not be desirable, as it adds a field which is currently not used by the compiler.
2018-02-23 11:21:29 +00:00
bors 928435305a Auto merge of #48052 - eddyb:deggregate, r=nikomatsakis
rustc_mir: handle all aggregate kinds in, and always run, the deaggregator.

This helps with removing`Rvalue::Aggregate` from the MIR, and with enabling more optimizations.
r? @nikomatsakis
2018-02-23 02:21:06 +00:00
Niko Matsakis 0a5f4aebb1 move test to the proper directory and test #[bench] 2018-02-22 20:16:30 -05:00
Niko Matsakis a0562ec369 delete this test file: it also appears as
src/rfc-1937-termination-trait/termination-trait-for-result-box-error_ok.rs
2018-02-22 20:16:06 -05:00
Niko Matsakis e0ed88df3d add test for `fn main() -> !` 2018-02-22 20:10:36 -05:00
Niko Matsakis 067c2e3d03 handle `#[bench]` functions better 2018-02-22 20:09:10 -05:00
Santiago Pastorino 6a74615fe3
Run rustfmt over bitvec.rs and region_infer/values.rs 2018-02-22 21:27:52 -03:00
Santiago Pastorino aa3409c898
Fix typo otherwies -> otherwise 2018-02-22 21:27:52 -03:00
Santiago Pastorino ff9eb56c6e
Use Sparse bitsets instead of dense ones for NLL results
Fixes #48170
2018-02-22 21:27:26 -03:00
Niko Matsakis 8f35141fba remove tokenstream 2018-02-22 18:26:01 -05:00
bors 5de90898de Auto merge of #48343 - Mark-Simulacrum:release-step, r=kennytm
Update nightly to 1.26.0 and bootstrap from beta.
2018-02-22 23:25:39 +00:00
Santiago Pastorino e5d79c4bc7
Move word type and word size usage to constants & make it of 128 bits 2018-02-22 20:15:53 -03:00
Niko Matsakis 5f1e78f19a move Termination trait to std::process 2018-02-22 17:57:08 -05:00
Niko Matsakis e446f706a8 put the "unit test" logic into libtest
Also make `std::termination` module public and rename feature.

The lib feature needs a different name from the language feature.
2018-02-22 17:56:24 -05:00
Niko Matsakis 0625d4c282 begin crate-relative paths with `crate` 2018-02-22 17:31:37 -05:00
Niko Matsakis 1eab1b19a3 support unit tests with return values that implement `Terminaton`
Extend `Termination` trait with a method to determine what happens
with a unit test.

This commit incorporates work by Bastian Köcher <git@kchr.de>.
2018-02-22 17:31:37 -05:00
Matt Brubeck 311fbc9265 [docs] Minor wording changes to drain_filter docs
The docs currently say, "If the closure returns false, it will try
again, and call the closure on the next element."  But this happens
regardless of whether the closure returns true or false.
2018-02-22 12:05:30 -08:00
Anthony Deschamps e88fe1d519 Small grammar fix to docs for String::new(). 2018-02-22 14:21:54 -05:00
toidiu 4d8b251835
update tracking issue for nll
Point to the new tracing issue for nll
2018-02-22 09:13:44 -05:00
bors b1f8e6fb06 Auto merge of #48399 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 12 pull requests

- Successful merges: #47379, #47833, #48106, #48198, #48314, #48325, #48335, #48352, #48354, #48360, #48382, #48397
- Failed merges:
2018-02-22 11:25:16 +00:00
Guillaume Gomez 24c17cb1a8
Rollup merge of #48397 - ordovicia:pow_doc, r=GuillaumeGomez
Take 2^5 as examples in document of pow()

Fixes #48396 by taking 2^5 as examples.
2018-02-21 16:29:57 +01:00
Guillaume Gomez c118d37ac4
Rollup merge of #48382 - GuillaumeGomez:fix-rustdoc-test-panic, r=estebank
Fix rustdoc test ICE

Fixes #48377.

r? @QuietMisdreavus
2018-02-21 16:29:56 +01:00
Guillaume Gomez d9f5eeb57e
Rollup merge of #48360 - redcape:redcape-count-doc-fix, r=cramertj
Fix count usize link typo in docs

The docs point to isize when the link should be going to usize instead. Fix the doc.
2018-02-21 16:29:55 +01:00
Guillaume Gomez d6e649a631
Rollup merge of #48354 - m0ppers:add-read-until-link, r=aidanhs
Add missing link for read_line

Seems I found a missing link 🔗

https://doc.rust-lang.org/stable/std/io/trait.BufRead.html#errors-2
2018-02-21 16:29:54 +01:00
Guillaume Gomez 37463272a7
Rollup merge of #48352 - JakubAdamWieczorek:mailmap, r=petrochenkov
Update .mailmap with my real name

Good morning, the Rust team!

Once upon a time I was a modest-scale contributor. Sadly, various turbulences made me step away from my participation in the project. It's great to see how far it's gone.

I would appreciate it if you accepted this small change to the .mailmap file so that it shows my real name as back then I was using an alias. If doubts arise if I am the same person, I will be happy to provide further evidence. :)

Kind regards.
2018-02-21 16:29:53 +01:00
Guillaume Gomez fe1293f8a9
Rollup merge of #48335 - Manishearth:shortcut-links, r=QuietMisdreavus
Implement implied shortcut links for intra-rustdoc-links

cc https://github.com/rust-lang/rust/issues/43466

Needs https://github.com/google/pulldown-cmark/pull/126

r? @QuietMisdreavus
2018-02-21 16:29:52 +01:00
Guillaume Gomez 27c6ff5c7c
Rollup merge of #48325 - frewsxcv:frewxcv-ignore, r=steveklabnik
Mark doc examples w/ `extern` blocks as `ignore`.

Fixes https://github.com/rust-lang/rust/issues/48218.
2018-02-21 16:29:51 +01:00
Guillaume Gomez cb618ea195
Rollup merge of #48314 - frewsxcv:frewsxcv-broken-link, r=GuillaumeGomez
Fix broken documentation link.

None
2018-02-21 16:29:50 +01:00
Guillaume Gomez ad83b47802
Rollup merge of #48198 - csmoe:inform_type_annotations, r=estebank
inform user where to give a type annotation

should resolve #47777
previous pull request https://github.com/rust-lang/rust/pull/47982 was closed because of a mistaken rebase.
r? @estebank
2018-02-21 16:29:48 +01:00