Commit graph

443 commits

Author SHA1 Message Date
Dylan DPC
14dc34dd89
Rollup merge of #72260 - csmoe:issue-69276, r=estebank
Spell out `Self` in async function return

Closes #69276
r? @tmandry
2020-06-05 13:07:03 +02:00
csmoe
9be635306c resolve error code e0760 2020-06-04 09:37:32 +08:00
Guillaume Gomez
64b5520757 clean up E0641 explanation 2020-06-03 13:52:09 +02:00
Yuki Okushi
b3cf989eaf
Rollup merge of #72880 - GuillaumeGomez:cleanup-e0637, r=Dylan-DPC
Clean up E0637 explanation

r? @Dylan-DPC
2020-06-02 13:07:20 +09:00
Guillaume Gomez
576a97b6d1 Clean up E0637 explanation 2020-06-01 13:07:29 +02:00
Dylan DPC
2e3417a82d
Rollup merge of #72818 - GuillaumeGomez:cleanup-e0622, r=Dylan-DPC
Clean up E0622 explanation

r? @Dylan-DPC
2020-06-01 03:14:10 +02:00
Guillaume Gomez
1fbc037da6 Clean up E0622 explanation 2020-05-31 14:09:15 +02:00
Ralf Jung
f96e3e2069
Rollup merge of #72540 - davidtwco:issue-67552-mono-collector-comparison, r=varkor
mir: adjust conditional in recursion limit check

Fixes #67552.

This PR adjusts the condition used in the recursion limit check of
the monomorphization collector, from `>` to `>=`.

In #67552, the test case had infinite indirect recursion, repeating a
handful of functions (from the perspective of the monomorphization
collector): `rec` -> `identity` -> `Iterator::count` -> `Iterator::fold`
-> `Iterator::next` -> `rec`.

During this process, `resolve_associated_item` was invoked for
`Iterator::fold` (during the construction of an `Instance`), and
ICE'd due to substitutions needing inference. However, previous
iterations of this recursion would have called this function for
`Iterator::fold` - and did! - and succeeded in doing so (trivially
checkable from debug logging, `()` is present where `_` is in the substs
of the failing execution).

The expected outcome of this test case would be a recursion limit error
(which is present when the `identity` fn indirection is removed), and
the recursion depth of `rec` is increasing (other functions finish
collecting their neighbours and thus have their recursion depths reset).

When the ICE occurs, the recursion depth of `rec` is 256 (which matches
the recursion limit), which suggests perhaps that a different part of
the compiler is using a `>=` comparison and returning a different result
on this recursion rather than what it returned in every previous
recursion, thus stopping the monomorphization collector from reporting
an error on the next recursion, where `recursion_depth_of_rec > 256`
would have been true.

With grep and some educated guesses, we can determine that
the recursion limit check at line 818 in
`src/librustc_trait_selection/traits/project.rs` is the other check that
is using a different comparison. Modifying either comparison to be `>` or
`>=` respectively will fix the error, but changing the monomorphization
collector produces the nicer error.
2020-05-30 13:45:10 +02:00
Dylan DPC
180a92cad7
Rollup merge of #72731 - GuillaumeGomez:cleanup-e0619, r=Dylan-DPC
Add missing empty line in E0619 explanation

r? @Dylan-DPC
2020-05-29 20:21:26 +02:00
Guillaume Gomez
12c03db157 Add missing empty line in E0619 explanation 2020-05-29 11:06:48 +02:00
Yuki Okushi
6786c7d190
Rollup merge of #72495 - GuillaumeGomez:cleanup-e0601, r=Dylan-DPC
Improve E0601 explanation

r? @Dylan-DPC
2020-05-29 15:07:02 +09:00
Dylan DPC
235f382731
Rollup merge of #72605 - GuillaumeGomez:cleanup-e0617, r=Dylan-DPC
Add working example for E0617 explanation

r? @Dylan-DPC
2020-05-29 02:33:14 +02:00
David Wood
a54ed872cb
standardize limit comparisons with Limit type
This commit introduces a `Limit` type which is used to ensure that all
comparisons against limits within the compiler are consistent (which can
result in ICEs if they aren't).

Signed-off-by: David Wood <david@davidtw.co>
2020-05-28 10:33:07 +01:00
Guillaume Gomez
5548e69226 Add working example for E0617 explanation 2020-05-27 21:29:09 +02:00
Dylan DPC
aa8d64b005
Rollup merge of #72567 - GuillaumeGomez:cleanup-e0608, r=Dylan-DPC
Clean up E0608 explanation

r? @Dylan-DPC
2020-05-25 18:07:48 +02:00
Guillaume Gomez
632f3de12b Clean up E0608 explanation 2020-05-25 13:03:38 +02:00
Ralf Jung
cdeef96267
Rollup merge of #72530 - GuillaumeGomez:cleanup-e0602, r=Dylan-DPC
Clean up E0602 explanation

r? @Dylan-DPC
2020-05-24 16:51:32 +02:00
Guillaume Gomez
2220eb4d8a Clean up E0602 explanation 2020-05-24 12:52:45 +02:00
Guillaume Gomez
d01f1314b7 Improve E0601 explanation 2020-05-23 13:19:57 +02:00
Dylan DPC
bf1b998be6
Rollup merge of #72461 - GuillaumeGomez:cleanup-e0600, r=Dylan-DPC
Clean up E0600 explanation

r? @Dylan-DPC
2020-05-22 21:45:04 +02:00
Dylan DPC
47f3c440ec
Rollup merge of #72375 - GuillaumeGomez:cleanup-e0599, r=Dylan-DPC
Improve E0599 explanation

r? @Dylan-DPC
2020-05-22 21:44:54 +02:00
Ralf Jung
f7ed13b6a5
Rollup merge of #72345 - GuillaumeGomez:cleanup-e0593, r=Dylan-DPC
Clean up E0593 explanation

r? @Dylan-DPC
2020-05-22 16:58:29 +02:00
Ralf Jung
02eb002ee3
Rollup merge of #72235 - GuillaumeGomez:cleanup-E0590, r=Dylan-DPC
Clean up E0590 explanation

r? @Dylan-DPC
2020-05-22 16:58:26 +02:00
Guillaume Gomez
985ebf2c4a Clean up E0590 explanation 2020-05-22 13:26:11 +02:00
Guillaume Gomez
6e5cb37b66 Clean up E0600 explanation 2020-05-22 13:24:34 +02:00
Guillaume Gomez
e9ae64cca7 Improve E0599 explanation 2020-05-20 12:03:24 +02:00
Matthias Schiffer
abc236414b Implement #[ffi_const] and #[ffi_pure] function attributes
Introduce function attribute corresponding to the `const`/`pure`
attributes supported by GCC, clang and other compilers.

Based on the work of gnzlbg <gonzalobg88@gmail.com>.
2020-05-20 01:16:11 +02:00
Guillaume Gomez
56c494a148 Clean up E0593 explanation 2020-05-19 13:20:33 +02:00
csmoe
2f311b07c8 Merge branch 'master' into issue-69276 2020-05-19 11:02:29 +08:00
Amanieu d'Antras
6ba9696f5e Add documentation for asm! 2020-05-18 14:41:34 +01:00
csmoe
8841ede364 bless suggestion on spell out 2020-05-18 08:44:38 +08:00
Ralf Jung
49b81cae86
Rollup merge of #72259 - crlf0710:ascii_only_check, r=petrochenkov
Disallow forbidden usage of non-ascii identifiers.

Part of RFC2457, this tightens allowed identifiers back to ascii only in two situations.

r? @petrochenkov
2020-05-17 16:24:26 +02:00
Charles Lew
de24ddac0a Disallow forbidden usage of non-ascii identifiers. 2020-05-17 01:31:18 +08:00
csmoe
008d90a66a create error code E0754 2020-05-16 16:01:59 +08:00
Rustin-Liu
78eb64f35a Fix typo Arbintrary to Arbitrary
Signed-off-by: Rustin-Liu <rustin.liu@gmail.com>
2020-05-16 14:40:45 +08:00
Dylan DPC
d7f5e56498
Rollup merge of #72191 - GuillaumeGomez:cleanup-e0589, r=Dylan-DPC
Clean up E0589 explanation

r? @Dylan-DPC
2020-05-14 18:21:57 +02:00
Dylan DPC
746b8ca083
Rollup merge of #72127 - jademcgough:long-error-explanation-E0228, r=petrochenkov
add long error explanation for E0228

Add long explanation for the E0228 error code
Part of #61137

Let me know if this is wrong at all (or can be written more clearly), I'm still learning Rust.
2020-05-14 18:21:51 +02:00
Guillaume Gomez
31fbf33679 Clean up E0589 explanation 2020-05-14 11:51:39 +02:00
Ralf Jung
864eae7c48
Rollup merge of #72169 - GuillaumeGomez:cleanup-e0582, r=Dylan-DPC
Clean up E0582 explanation

r? @Dylan-DPC
2020-05-14 10:23:05 +02:00
Ralf Jung
0b8b38c4c2
Rollup merge of #72137 - GuillaumeGomez:cleanup-e0581, r=Dylan-DPC
Clean up E0581 explanation

r? @Dylan-DPC
2020-05-14 10:22:55 +02:00
Guillaume Gomez
bb2ff593a6 Clean up E0582 explanation 2020-05-13 13:40:55 +02:00
Jade McGough
5320bd986b add long error explanation for E0228 2020-05-12 17:09:09 -07:00
Guillaume Gomez
61fbe57f4a Clean up E0581 explanation 2020-05-12 13:36:57 +02:00
Dylan DPC
dd53768692
Rollup merge of #72107 - GuillaumeGomez:cleanup-e0579, r=Dylan-DPC
Clean up E0579 explanation

r? @Dylan-DPC
2020-05-11 22:21:07 +02:00
Dylan DPC
400a9bae49
Rollup merge of #72077 - GuillaumeGomez:cleanup-E0571, r=Dylan-DPC
Improve E0571 wording

r? @Dylan-DPC
2020-05-11 22:21:05 +02:00
Guillaume Gomez
806f09cf21 Clean up E0579 explanation 2020-05-11 13:22:56 +02:00
Guillaume Gomez
0aaff14ae3 Improve E0571 wording 2020-05-10 12:40:11 +02:00
Guillaume Gomez
e0c0c3b96f Add missing backtick in E0569 explanation 2020-05-09 13:51:46 +02:00
unexge
ef813ca95a Add stability attribute to E0539 error examples 2020-05-03 00:25:45 +03:00
unexge
9536567210 Add #![feature(staged_api)] attribute to E0539 error examples 2020-05-02 23:10:34 +03:00