Commit graph

150562 commits

Author SHA1 Message Date
Bernhard Schuster
67e6a81315 add track_path::path fn for proc-macro usage
Ref #73921
2021-07-02 07:13:19 +02:00
bors
1034282bca Auto merge of #86617 - joshtriplett:prune-dependencies, r=Mark-Simulacrum
Remove unused dependencies from compiler crates

Various compiler crates have dependencies that they don't appear to use. I used some scripting to detect such dependencies, filtered them based on some manual review, and removed those that do indeed appear to be entirely unused.
2021-07-01 03:49:47 +00:00
bors
866335b337 Auto merge of #86757 - JohnTitor:rollup-acevhz7, r=JohnTitor
Rollup of 8 pull requests

Successful merges:

 - #85504 (the foundation owns rust trademarks)
 - #85520 (Fix typo and improve documentation for E0632)
 - #86680 (Improve error for missing -Z with debugging option)
 - #86728 (Check node kind to avoid ICE in `check_expr_return()`)
 - #86740 (copy rust-lld as ld in dist)
 - #86746 (Fix rustdoc query type filter)
 - #86750 (Test cross-crate usage of `feature(const_trait_impl)`)
 - #86755 (alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-07-01 01:08:46 +00:00
bors
e6f450bcfe Auto merge of #86489 - cjgillot:lower, r=petrochenkov
Simplify early compilation interface

* separate resolver creation and AST configuration.
* bundle lowering with global_ctxt creation.
2021-06-30 22:20:36 +00:00
Yuki Okushi
9e007e71ff
Rollup merge of #86755 - ojeda:shrink, r=Mark-Simulacrum
alloc: `RawVec<T, A>::shrink` can be in `no_global_oom_handling`.

Found in https://github.com/Rust-for-Linux/linux/pull/402.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-07-01 05:21:03 +09:00
Yuki Okushi
7714a9a0e3
Rollup merge of #86750 - fee1-dead:impl-const-test, r=jonas-schievink
Test cross-crate usage of `feature(const_trait_impl)`

This PR does two things:

 - Fixes metadata not encoded properly for functions in const trait impls.
 - Adds tests for using const trait impls cross-crate with the feature gate on the user crate either enabled or disabled.

AFAIK, this means we can now constify some trait impls in the standard library 🎉

See #67792 for the tracking issue, cc `@oli-obk`
2021-07-01 05:21:02 +09:00
Yuki Okushi
f458d8f669
Rollup merge of #86746 - GuillaumeGomez:query-type-filter, r=notriddle
Fix rustdoc query type filter

I realized while reviewing #86659 that the type filter was broken on search so I'd prefer it to get merged before merging #86659.

r? `@notriddle`
2021-07-01 05:21:00 +09:00
Yuki Okushi
e52a0ec5b8
Rollup merge of #86740 - 1000teslas:issue-71519-fix, r=petrochenkov
copy rust-lld as ld in dist

Fixes bug in https://github.com/rust-lang/rust/pull/85961. Linking seems to work for pure Rust projects, but not when a C library needs to be dynamically linked.
2021-07-01 05:20:59 +09:00
Yuki Okushi
dfe05c0ea0
Rollup merge of #86728 - FabianWolff:issue-86721, r=LeSeulArtichaut
Check node kind to avoid ICE in `check_expr_return()`

This PR fixes #86721. The ICE described there is apparently due to a misunderstanding:
e98897e5dc/compiler/rustc_typeck/src/check/expr.rs (L684-L685)

Intuitively, one would think that calling `expect_item()` after `get_parent_item()` should succeed, but as it turns out, `get_parent_item()` can also return foreign, trait, and impl items as well as crates, whereas `expect_item()` specifically expects a `Node::Item`. I have therefore added an extra check to prevent this ICE.
2021-07-01 05:20:58 +09:00
Yuki Okushi
56ddef8ab8
Rollup merge of #86680 - camsteffen:dbg-opt-error, r=petrochenkov
Improve error for missing -Z with debugging option

Before:
```text
❯ rustc --unpretty=hir
error: Unrecognized option: 'unpretty'
```
After:
```text
❯ rustc --unpretty=hir
error: Unrecognized option: 'unpretty'. Did you mean `-Z unpretty`?
```
2021-07-01 05:20:57 +09:00
Yuki Okushi
1823b3f2b3
Rollup merge of #85520 - FabianWolff:issue-85475, r=jackh726
Fix typo and improve documentation for E0632

Edit: After https://github.com/rust-lang/rust/pull/85520#issuecomment-870095546, this PR has been boiled down to just an extended description for `E0632` and a fixed typo.
2021-07-01 05:20:55 +09:00
Yuki Okushi
7c06191d2c
Rollup merge of #85504 - liigo:patch-13, r=Mark-Simulacrum
the foundation owns rust trademarks
2021-07-01 05:20:54 +09:00
Camille GILLOT
f69877426a Update comments. 2021-06-30 20:56:49 +02:00
Camille GILLOT
aa1bc5874e Fix AST pretty. 2021-06-30 20:53:10 +02:00
Camille GILLOT
2f28737ebe Move AST crate. 2021-06-30 20:53:10 +02:00
Camille GILLOT
c520cf2253 Arena-allocate Crate during lowering. 2021-06-30 20:31:56 +02:00
Camille GILLOT
e05cd155fe Move lowering to create_global_ctxt. 2021-06-30 20:31:55 +02:00
Camille GILLOT
b80f720a2a Inline lower_to_hir. 2021-06-30 20:31:54 +02:00
Camille GILLOT
18c10fb1a6 Separate resolver creation from expansion. 2021-06-30 20:31:53 +02:00
Camille GILLOT
5f98e5ee56 Simplify DepGraph creation. 2021-06-30 20:31:52 +02:00
Cameron Steffen
2a60f090b9 Add suggestion for missing compile flag group 2021-06-30 13:28:15 -05:00
Miguel Ojeda
7c9445d4a7 alloc: RawVec<T, A>::shrink can be in no_global_oom_handling.
Found in https://github.com/Rust-for-Linux/linux/pull/402.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2021-06-30 19:42:41 +02:00
Fabian Wolff
0c267830d5 Match on hir::TraitFn::Provided instead of using maybe_body_owned_by 2021-06-30 18:27:07 +02:00
Deadbeef
c424510746
Add tests for cross-crate usage of impl const 2021-06-30 23:57:17 +08:00
Deadbeef
3b9453bfe2
use is_const_fn_raw when encoding constness
this properly encodes cross-crate constness data.
2021-06-30 23:56:43 +08:00
bors
868c702d0c Auto merge of #86695 - sexxi-goose:closure_size, r=nikomatsakis
Introduce -Zprofile-closures to evaluate the impact of 2229

This creates a CSV with name "closure_profile_XXXXX.csv", where the
variable part is the process id of the compiler.

To profile a cargo project you can run one of the following depending on
if you're compiling a library or a binary:

```
cargo +nightly rustc --lib -- -Zprofile-closures
cargo +nightly rustc --bin {binary_name} -- -Zprofile-closures
```

r? `@nikomatsakis`
2021-06-30 13:42:50 +00:00
Guillaume Gomez
855923c895 Add test to ensure that the typed queries are not including other types 2021-06-30 14:20:17 +02:00
Guillaume Gomez
7b62d28cf2 Enforce search typed queries 2021-06-30 14:11:09 +02:00
Fabian Wolff
11fd8579e4 Emit explanatory note for functions in trait and impl items as well 2021-06-30 13:56:26 +02:00
bors
5d34076975 Auto merge of #86650 - GuillaumeGomez:fix-boldness, r=Nemo157
Fix boldness (put it back where needed)

I realized that I created a GUI test that wasn't run because it had ".rs" extension instead of ".goml" so I moved its content into `font-weight.goml` (since it was checking font weight).
2021-06-30 10:54:08 +00:00
bors
7ede6e2a23 Auto merge of #86739 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/86723
Cc `@rust-lang/miri` r? `@ghost`
2021-06-30 07:28:42 +00:00
Ralf Jung
80fa596145 update Miri 2021-06-30 09:21:20 +02:00
1000teslas
fe822fe64d copy rust-lld as ld in dist 2021-06-30 16:30:40 +10:00
bors
51fd129ac1 Auto merge of #86689 - rylev:future-compat-lint-group, r=nikomatsakis
Only include lint in future_incompatible lint group if not an edition lint

A follow up to #86330 - this only includes lints annotated with `FutureIncompatibleInfo` in the `future_incompatibile` lint group if the future compatibility is not tied to an edition.

We probably want to rename `FutureIncompatibleInfo` to something else since this type is now used to indicate future breakages of all kinds (even those that happen in editions). I'd prefer to do that in a separate PR though.

r? `@nikomatsakis`
2021-06-30 05:02:01 +00:00
bors
9af4bdeab0 Auto merge of #86724 - cuviper:indexmap-1.7, r=Mark-Simulacrum
Upgrade to indexmap 1.7, using hashbrown 0.11
2021-06-30 02:20:50 +00:00
bors
0ce21126b2 Auto merge of #86522 - JohnTitor:move-ui-tests, r=petrochenkov
Move some UI tests to more suitable subdirs

cc #73494
The classified result is here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427

- issues/issue-27060.rs: misclassified, should be packed.
- issues/issue-45157.rs: moved to nll.
- issues/issue-69532.rs: ~~couldn't figured out the best place, placed a new `llvm` dir~~ moved to consts.
- fsu-moves-and-copies.rs: moved to borrowck.
- issues/issue-36638.rs: misclassified, moved to keyword.
- issues/issue-48636.rs: moved to parser.
- issues/issue-37655.rs: I'm not sure but associated-types shouldn't the best, moved to coercion but region may be better.
- issues/issue-20005.rs: moved to associated-types.
- issues/issue-82869.rs: moved to asm.
- issues/issue-24535-allow-mutable-borrow-in-match-guard.rs: moved to nll.
- issues/issue-52169.rs: moved to macros.
- test-passed.rs: moved to test-attrs along with `test-` prefixed tests.
  - test-cfg.rs: moved to conditional-compilation.
- non-integer-atomic.rs: moved to intrinsics.
- issues/issue-54521-2.rs: moved to parser.
- issues/issue-17756.rs: moved to consts.
- conversion-methods.rs: ~~moved to suggestions~~ moved to typeck.

r? `@petrochenkov`
2021-06-29 23:40:00 +00:00
Yuki Okushi
2c6268678d
Move some UI tests to more suitable subdirs 2021-06-30 06:41:10 +09:00
bors
6d820866a2 Auto merge of #86725 - JohnTitor:normalizecss-8, r=GuillaumeGomez
Upgrade normalize.css to v8.0.1

Fixes #86629, this addresses #82548 and #82542 with tweaks. I expect that this changes the style *slightly* but shouldn't have any major changes.
Here's some changes I observed, I'd say they all are an improvement.

<details>
<summary>Before</summary>

![before 1](https://user-images.githubusercontent.com/25030997/123854746-0fc84800-d95a-11eb-8484-ea86dfe0ae14.png)
![before 2](https://user-images.githubusercontent.com/25030997/123854754-135bcf00-d95a-11eb-8cca-f49994629e08.png)

</details>

<details>
<summary>After</summary>

![after 1](https://user-images.githubusercontent.com/25030997/123854809-21115480-d95a-11eb-9dd2-0d3b9ca45edd.png)
![after 2](https://user-images.githubusercontent.com/25030997/123854818-22428180-d95a-11eb-83aa-fb5a698124f9.png)

</details>

r? `@jsha`
2021-06-29 20:59:14 +00:00
Fabian Wolff
2586e962e0 Check node kind to avoid ICE in check_expr_return() 2021-06-29 22:20:06 +02:00
Yuki Okushi
510107815f
Fix some style regressions due to normalize.css 8 2021-06-30 04:13:46 +09:00
Yuki Okushi
66430652d1
Upgrade normalize.css to v8.0.1 2021-06-30 04:13:16 +09:00
Josh Stone
ae9713a399 Upgrade to indexmap 1.7, using hashbrown 0.11 2021-06-29 11:38:16 -07:00
bors
6e0b554619 Auto merge of #86603 - Mark-Simulacrum:stage-step, r=pietroalbini
Update to new bootstrap compiler

r? `@pietroalbini`
2021-06-29 18:33:13 +00:00
bors
e98897e5dc Auto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3
Change vtable memory representation to use tcx allocated allocations.

This fixes https://github.com/rust-lang/rust/issues/86324. However i suspect there's more to change before it can land.

r? `@bjorn3`
cc `@rust-lang/miri`
2021-06-29 15:52:21 +00:00
bors
8971fff984 Auto merge of #86009 - cjgillot:fwarn, r=davidtwco
Make ForceWarn a lint level.

Follow-up to #85788
cc `@rylev`
2021-06-29 13:11:16 +00:00
Fabian Wolff
69c8573ab5 Bless UI tests 2021-06-29 12:49:08 +02:00
bors
5d0fae5b66 Auto merge of #86594 - dns2utf8:move_label_to_symbol, r=GuillaumeGomez
rustdoc: Move label to symbol

Implements #86578 depends on #85651

r? `@GuillaumeGomez`

# Screenshot of mobile
![grafik](https://user-images.githubusercontent.com/739070/123267064-1be07f80-d4ec-11eb-8bdb-0b18a41908dc.png)

# Screenshot on desktop
![grafik](https://user-images.githubusercontent.com/739070/123267204-46323d00-d4ec-11eb-97ca-2750421352f4.png)
2021-06-29 10:41:40 +00:00
bors
f12d91f9da Auto merge of #86697 - jackh726:pgo, r=Mark-Simulacrum
Add inflate to pgo
2021-06-29 07:44:20 +00:00
bors
47b2f15bba Auto merge of #86670 - Aaron1011:copy-variance-diag, r=davidtwco
Derive `Copy` for `VarianceDiagInfo`
2021-06-29 05:15:34 +00:00
bors
fecc65a197 Auto merge of #86446 - Smittyvb:rustc_insignificant_dtor-ice, r=Mark-Simulacrum
Don't make `rustc_insignificant_dtor` feature gate

This isn't a feature gate, it's an attribute that is feature gated behind the `rustc_attrs` attribute. Closes #85680.
2021-06-29 02:48:08 +00:00