Commit graph

154206 commits

Author SHA1 Message Date
Ellen
8295e4a6cf add test for builtin types N + N unifying with fn call 2021-09-09 15:44:04 +01: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
bors
97032a6dfa Auto merge of #80522 - cjgillot:borrowcrate, r=oli-obk
Split rustc_mir

The `rustc_mir` crate is the second largest in the compiler.
This PR splits it up into 5 crates:
- rustc_borrowck;
- rustc_const_eval;
- rustc_mir_dataflow;
- rustc_mir_transform;
- rustc_monomorphize.
2021-09-08 20:42:42 +00:00
Camille GILLOT
924dbc36c9 Rebase fallout. 2021-09-08 20:40:30 +02:00
Camille GILLOT
058fddcb77 Update run-make-fulldeps. 2021-09-08 20:40:27 +02:00
bors
47ae8deb8a Auto merge of #88750 - jackh726:rollup-w57i9fp, r=jackh726
Rollup of 9 pull requests

Successful merges:

 - #86263 (Rustdoc: Report Layout of enum variants)
 - #88541 (Add regression test for #74400)
 - #88553 (Improve diagnostics for unary plus operators (#88276))
 - #88594 (More symbolic doc aliases)
 - #88648 (Correct “copies” to “moves” in `<Option<T> as From<T>>::from` doc, and other copyediting)
 - #88691 (Add a regression test for #88649)
 - #88694 (Drop 1.56 stabilizations from 1.55 release notes)
 - #88712 (Fix docs for `uX::checked_next_multiple_of`)
 - #88726 (Fix typo in `const_generics` replaced with `adt_const_params` note)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-09-08 17:26:17 +00:00
Jack Huey
4cb751e1f4
Rollup merge of #88726 - MingweiSamuel:patch-1, r=wesleywiser
Fix typo in `const_generics` replaced with `adt_const_params` note
2021-09-08 12:24:22 -04:00
Jack Huey
bd6ce72ece
Rollup merge of #88712 - jhpratt:fix-int_rounding-docs, r=joshtriplett
Fix docs for `uX::checked_next_multiple_of`

Thanks to `@photino` for noticing this [here](https://github.com/rust-lang/rust/issues/88581#issuecomment-913982246).

r? `@joshtriplett`

`@rustbot` label: +A-docs +A-waiting-on-review
2021-09-08 12:24:21 -04:00
Jack Huey
7d51dae2f8
Rollup merge of #88694 - Mark-Simulacrum:relnotes, r=Mark-Simulacrum
Drop 1.56 stabilizations from 1.55 release notes

r? `@Mark-Simulacrum`
2021-09-08 12:24:20 -04:00
Jack Huey
f69ccb12e3
Rollup merge of #88691 - hyd-dev:88649, r=Mark-Simulacrum
Add a regression test for #88649

I noticed that #88649 does not have a regression test, so I add one in this PR.

The test fails with this without #88678:
```
error[E0080]: evaluation of constant value failed
  --> /checkout/src/test/ui/consts/issue-88649.rs:13:52
   |
LL |             Foo::Variant1(x) | Foo::Variant2(x) if x => {}
   |                                                    ^ StorageLive on a local that was already live

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.
```
2021-09-08 12:24:19 -04:00
Jack Huey
2bbcf929c6
Rollup merge of #88648 - kpreid:option, r=Mark-Simulacrum
Correct “copies” to “moves” in `<Option<T> as From<T>>::from` doc, and other copyediting

The `impl<T> From<T> for Option<T>` has no `Copy` or `Clone` bound, so its operation is guaranteed to be a move. The call site might copy, but the function itself cannot.

Since that would have been a rather small PR, I also reviewed the other documentation in the file and made other improvements (in separate commits): adding periods and commas, linking `Deref::Target`, and clarifying what "a container" is in `FromIterator`.
2021-09-08 12:24:18 -04:00
Jack Huey
b1c782f20b
Rollup merge of #88594 - steffahn:more_symbolic_doc_aliases, r=joshtriplett
More symbolic doc aliases

A bunch of small changes, mostly adding `#[doc(alias = "…")]` entries for symbolic `"…"`.

Also a small change in documentation of `const` keywords.
2021-09-08 12:24:17 -04:00
Jack Huey
77ac329a08
Rollup merge of #88553 - theo-lw:issue-88276, r=estebank
Improve diagnostics for unary plus operators (#88276)

This pull request improves the diagnostics emitted on parsing a unary plus operator. See #88276.

Before:

```
error: expected expression, found `+`
 --> src/main.rs:2:13
  |
2 |     let x = +1;
  |             ^ expected expression
```

After:

```
error: leading `+` is not supported
 --> main.rs:2:13
  |
2 |     let x = +1;
  |             ^
  |             |
  |             unexpected `+`
  |             help: try removing the `+`
```
2021-09-08 12:24:16 -04:00
Jack Huey
4fb00847f8
Rollup merge of #88541 - vandenheuvel:regression_test_74400, r=Mark-Simulacrum
Add regression test for #74400

Closes #74400 by adding a regression test.
2021-09-08 12:24:15 -04:00
Jack Huey
2f2aed1de7
Rollup merge of #86263 - fee1-dead:rustdoc-layout-variants, r=camelid
Rustdoc: Report Layout of enum variants

Followup of #83501, Fixes #86253.

cc `@camelid`

`@rustbot` label A-rustdoc
2021-09-08 12:24:14 -04:00
Mark Rousskov
daf6f9951e Drop 1.56 stabilizations from 1.55 release notes 2021-09-08 10:29:12 -04:00
bors
c9db3e0fbc Auto merge of #87489 - bdalrhm:rustdoc-line-num, r=CraftSpider
`rustdoc`: compute correct line number for indented rust code blocks.

This PR fixes a bug in `rustdoc` where it computes the wrong line number for indented rust code blocks (and subsequent blocks) it finds in markdown strings. To fix this issue, we decrement the line number if we find characters between the code block and the preceding line ending. I noticed this issue as I was trying to use `rustdoc` to extract examples from The Rust Reference and run them through the [Rust Model Checker](https://github.com/model-checking/rmc).
2021-09-08 12:55:15 +00:00
bors
434cb437b5 Auto merge of #86943 - ptrojahn:suggest_derive, r=estebank
Suggest deriving traits if possible

This only applies to builtin derives as I don't think there is a
clean way to get the available derives in typeck.

Closes #85851
2021-09-08 07:27:41 +00:00
bors
72969f6526 Auto merge of #88061 - jackh726:genericbound-cleanup, r=estebank
Remove `hir::GenericBound::Unsized`

Rather than "moving" the `?Sized` bounds to the param bounds, just also check where clauses in `astconv`. I also did some related cleanup here, but that's not strictly neccesary. Also going to do a perf run here.

r? `@estebank`
2021-09-08 04:00:58 +00:00
bors
0d0d2fe182 Auto merge of #88477 - sexxi-goose:issue-88476, r=nikomatsakis
2229: Don't move out of drop type

Fixes #88476

r? `@nikomatsakis`
2021-09-08 00:58:33 +00:00
jackh726
22ef04e22f A bit of cleanup to astconv 2021-09-07 18:25:57 -04:00
jackh726
216906fb75 Change is_unsized to add_implicitly_sized 2021-09-07 18:08:46 -04:00
jackh726
f1f1d56d93 Don't move ?Trait bounds to param bounds if they're in where clauses 2021-09-07 18:08:46 -04:00
jackh726
2eaf9fe364 Static assert size of GenericBoun to ensure size doesn't change 2021-09-07 17:53:43 -04:00
Camille GILLOT
c5fc2609f0 Rename rustc_mir to rustc_const_eval. 2021-09-07 20:46:26 +02:00
bors
fdf65053e9 Auto merge of #88724 - Mark-Simulacrum:bump-rls, r=Mark-Simulacrum
Bump RLS submodule

r? `@Mark-Simulacrum`
2021-09-07 18:31:03 +00:00
Camille GILLOT
fd9c04fe32 Move the dataflow framework to its own crate. 2021-09-07 19:57:07 +02:00
Camille GILLOT
81a600b6b7 Move monomorphize code to its own crate. 2021-09-07 19:53:04 +02:00
Mingwei Samuel
f8cbb1935c
Fix typo in const_generics replaced with adt_const_params note 2021-09-07 09:27:30 -07:00
bors
69c4aa2901 Auto merge of #88710 - Mark-Simulacrum:tyvid-idx, r=jackh726
Use index newtyping for TyVid

This is useful for using TyVid in types like VecGraph, and just otherwise seems like a small win.
2021-09-07 15:28:34 +00:00
Mark Rousskov
c13808fb77 Bump RLS submodule 2021-09-07 11:16:31 -04:00
bors
73641cd23b Auto merge of #88161 - michaelwoerister:fix-whole-archive-no-bundle, r=petrochenkov
Fix handling of +whole-archive native link modifier.

This PR fixes a bug in `add_upstream_native_libraries` that led to the `+whole-archive` modifier being ignored when linking in native libs.

~~Note that the PR does not address the situation when `+whole-archive` is combined with `+bundle`.~~
`@wesleywiser's` commit adds validation code that turns combining `+whole-archive` with `+bundle` into an error.

Fixes https://github.com/rust-lang/rust/issues/88085.

r? `@petrochenkov`
cc `@wesleywiser` `@gcoakes`
2021-09-07 12:31:11 +00:00
Michael Woerister
70c7317d71 Add test case for no-bundle/whole-archive native libs linking. 2021-09-07 14:14:08 +02:00
Jacob Pratt
56bb6f5a25
Fix docs for uX::checked_next_multiple_of 2021-09-07 02:14:04 -04:00