Commit graph

154523 commits

Author SHA1 Message Date
Noah Lev
44e6f2e90f Remove unnecessary Cache.*_did fields
They can be obtained by accessing the `TyCtxt` where they are needed.
2021-09-09 19:17:38 -07:00
jackh726
0a3c6bb887 In relate_tys, when creating new universes, insert missing universes as other 2021-09-09 18:04:59 -04:00
Fabian Wolff
57fcb2e2d6 Fix two uses of span_note when the source is not available 2021-09-09 21:17:05 +02:00
Amanieu d'Antras
c1bcf5c548 Add -Z panic-in-drop={unwind,abort} command-line option 2021-09-09 18:57:03 +01:00
Fabian Wolff
79adda930f Ignore automatically derived impls of Clone and Debug in dead code analysis 2021-09-09 19:49:07 +02:00
Sasha Pourcelot
b21425de3c Emit proper errors on missing closure braces
This commit focuses on emitting clean errors for the following syntax
error:

```
Some(42).map(|a|
    dbg!(a);
    a
);
```

Previous implementation tried to recover after parsing the closure body
(the `dbg` expression) by replacing the next `;` with a `,`, which made
the next expression belong to the next function argument. As such, the
following errors were emitted (among others):
  - the semicolon token was not expected,
  - a is not in scope,
  - Option::map is supposed to take one argument, not two.

This commit allows us to gracefully handle this situation by adding
giving the parser the ability to remember when it has just parsed a
closure body inside a function call. When this happens, we can treat the
unexpected `;` specifically and try to parse as much statements as
possible in order to eat the whole block. When we can't parse statements
anymore, we generate a clean error indicating that the braces are
missing, and return an ExprKind::Err.
2021-09-09 17:44:40 +02:00
jackh726
8e7613f9e0 Only add_implied_bounds for norm_ty if different 2021-09-09 11:26:16 -04:00
jackh726
c49b0762c0 Use FxHashSet instead of Vec for well formed tys 2021-09-09 11:25:44 -04:00
Ellen
8295e4a6cf add test for builtin types N + N unifying with fn call 2021-09-09 15:44:04 +01:00
Esteban Kuber
dc02b51382 Use more accurate spans for "unused delimiter" lint 2021-09-09 14:24:33 +00:00
Stefan Schindler
0bf16af5f3 Workaround blink/chromium grid layout limitation of 1000 rows
See https://github.com/rust-lang/rust/issues/88545 for more details
2021-09-09 15:11:02 +02:00
Samuel E. Moelius III
bd4b17a532 Update lockfile 2021-09-09 07:47:22 -04:00
Samuel E. Moelius III
a628223d45 Update dependencies 2021-09-09 07:47:16 -04:00
Hans Niklas Jacob
c86c63436a Allow missing code examples in trait impls. 2021-09-09 13:13:48 +02:00
bors
497ee321af Auto merge of #88676 - devnexen:fbsd_toolchain_upd, r=Mark-Simulacrum
update of the CI freebsd toolchain

adding libproctsta, for the upcoming libc update.
2021-09-09 09:21:30 +00:00
Samuel E. Moelius III
83875eaff9 Prep for upgrade to cargo_metadata 0.14.0 2021-09-09 04:59:06 -04:00
Andreas Liljeqvist
bc95994c32 bugfix 2021-09-09 10:41:20 +02:00
Andreas Liljeqvist
a2ee1420b8 Wrap 2021-09-09 10:41:20 +02:00
Andreas Liljeqvist
9095cf9905 rename is_valid_for to is_valid 2021-09-09 10:41:19 +02:00
Andreas Liljeqvist
dd34e0c966 Rename (un)signed to (un)signed_int 2021-09-09 10:41:19 +02:00
Andreas Liljeqvist
9129f4306f Move unsigned_max etc into Size again 2021-09-09 10:41:19 +02:00
Andreas Liljeqvist
459c9108e4 Remove clone 2021-09-09 10:41:19 +02:00
Andreas Liljeqvist
5b2f757dae Make abi::Abi Copy and remove a *lot* of refs
fix

fix

Remove more refs and clones

fix

more

fix
2021-09-09 10:41:19 +02:00
Andreas Liljeqvist
86ff6aeb82 Fix docstring 2021-09-09 10:41:18 +02:00
Andreas Liljeqvist
da92cd6dcf Use special Debug format when start > end 2021-09-09 10:41:18 +02:00
Andreas Liljeqvist
f5d8749f85 Remove contains_zero, respect the compiler 2021-09-09 10:41:18 +02:00
Andreas Liljeqvist
021c3346ed derive Copy for WrappingRange and Scalar 2021-09-09 10:41:18 +02:00
Andreas Liljeqvist
4c46296f22 fix match 2021-09-09 10:41:18 +02:00
Andreas Liljeqvist
05cd48b008 Add methods for checking for full ranges to Scalar and WrappingRange
Move *_max methods back to util

change to inline instead of inline(always)

Remove valid_range_exclusive from scalar
Use WrappingRange instead

implement always_valid_for in a safer way

Fix accidental edit
2021-09-09 10:41:17 +02:00
bors
02a57fa132 Auto merge of #88748 - bjorn3:try_fix_perf_regression, r=wesleywiser
Revert "Remove optimization_fuel_crate from Session"

This reverts commit 5464b2e713.

This hopefully fixes the perf regression in https://github.com/rust-lang/rust/pull/88530#issuecomment-915314117.
2021-09-09 06:16:04 +00:00
bors
c5cbf7852a Auto merge of #88752 - Mark-Simulacrum:bootstrap-bump, r=m-ou-se
Bump stage0 compiler to 1.56

r? `@pietroalbini` (but others should feel free to steal)
2021-09-09 03:01:47 +00:00
Noble-Mushtak
804ccfaaab Fatal error for functions with more than 65535 arguments 2021-09-08 21:14:49 -04:00
Mark Rousskov
b4e7649d6d Bump stage0 compiler to 1.56 2021-09-08 20:51:05 -04:00
Ellen
fd9bb30ab8 CI please 2021-09-09 01:32:03 +01:00
Ellen
cd2915eddb fmt 2021-09-09 01:32:03 +01:00
Ellen
3212734bd7 resolve from_hir_call FIXME 2021-09-09 01:32:03 +01:00
Ellen
8c7954dc42 add a CastKind to Node::Cast 2021-09-09 01:32:03 +01:00
Ellen
955e2b2da0 nits 2021-09-09 01:32:03 +01:00
Ellen
79be080255 remove comment 2021-09-09 01:32:03 +01:00
Ellen
406d2ab95d rename mir -> thir around abstract consts 2021-09-09 01:32:03 +01:00
Ellen
15101c8e95 remove debug stmts 2021-09-09 01:32:03 +01:00
Ellen
1f57f8b903 remove WorkNode 2021-09-09 01:32:03 +01:00
Ellen
4cbcb0936a handle ExprKind::NeverToAny 2021-09-09 01:32:03 +01:00
Ellen
fc63e9a8fb dont build abstract const for monomorphic consts 2021-09-09 01:32:03 +01:00
Ellen
08e8644016 move thir visitor to rustc_middle 2021-09-09 01:32:03 +01:00
Ellen
c170dcf04c tidy 2021-09-09 01:32:03 +01:00
Ellen
47b16f4ac9 bless stderr 2021-09-09 01:32:03 +01:00
Ellen
4483c2bdf6 dont support blocks 2021-09-09 01:32:03 +01:00
Ellen
9b2913814b as casts and block exprs 2021-09-09 01:32:03 +01:00
Ellen
2987f4ba42 WIP state 2021-09-09 01:32:03 +01:00