Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #72877

Closed
wants to merge 25 commits into from
Closed

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jun 1, 2020

Successful merges:

Failed merges:

r? @ghost

JohnTitor and others added 25 commits May 30, 2020 18:48
This commit fixes debug printing of function pointers on AVR. AVR does
not support `addrspacecast` instructions, and so this patch modifies
libcore so that a `ptrtoint` IR instruction is used and the address
space cast is avoided.
…ing convention

Also fix the order of the feature gate to fix the tidy errors.
Patch generated with `./x.py test --stage 1 src/test/ui/feature-gates --bless`.
Adding a new ABI changes the hashes of all previous ABIs.

Fix suggested by @shepmaster in
rust-lang#69478 (comment).
It is not possible to compile libstd for AVR anyway.
… ABI

This patch brings the AVR calling convention argument classification
logic in line with AVR Clang's behaviour.

AVR-Clang currently uses the `clang::DefaultABIInfo` ABI implementation.
This calling convention promotes all aggregates to indirect, no matter their
size.

It is also unnecessary to perform any integer width extension for AVR as
the minimum argument size matches the minimum describable size of
abi::Primitive::Int - 8 bits.

At some point in the future, an AVR-GCC compatible argument
classification implementation should be adopted in both Clang and Rust.
Normally, we debug-print `Spans` using the `SourceMap` retrieved from
the global `TyCtxt`. However, we fall back to printing out the `Span`'s
raw fields (instead of a file and line number) when we try to print a
`Span` before a `TyCtxt` is available. This makes debugging early phases
of the compile, such as parsing, much more difficult.

This commit stores a `SourceMap` in `rustc_span::GlOBALS` as a fallback.
When a `TyCtxt` is not available, we try to retrieve one from `GLOBALS`
- only if this is not available do we fall back to the raw field output.

I'm not sure how to write a test for this - however, this can be
verified locally by setting `RUSTC_LOG="rustc_parse=debug"`, and
verifying that the output contains filenames and line numbers.
…nas-schievink

Enable AVR as a Tier 3 target upstream

Tracking issue: rust-lang#44052.

Things intentionally left out of the initial upstream:

* The `target_cpu` flag

I have made the cleanup suggestions by @jplatte and @jplatte in avr-rust@043550d.

Anybody feel free to give the branch a test and see how it fares, or make suggestions on the code patch itself.
…r=petrochenkov

Make `SourceMap` available for early debug-printing of `Span`s

Normally, we debug-print `Spans` using the `SourceMap` retrieved from
the global `TyCtxt`. However, we fall back to printing out the `Span`'s
raw fields (instead of a file and line number) when we try to print a
`Span` before a `TyCtxt` is available. This makes debugging early phases
of the compile, such as parsing, much more difficult.

This commit stores a `SourceMap` in `rustc_span::GlOBALS` as a fallback.
When a `TyCtxt` is not available, we try to retrieve one from `GLOBALS`
- only if this is not available do we fall back to the raw field output.

I'm not sure how to write a test for this - however, this can be
verified locally by setting `RUSTC_LOG="rustc_parse=debug"`, and
verifying that the output contains filenames and line numbers.
…atthewjasper

On recursive ADT, provide indirection structured suggestion
bump Miri, update for cargo-miri being a separate project

r? @oli-obk

Fixes rust-lang#72801
…nas-schievink

validate basic sanity for TerminatorKind

r? @jonas-schievink

This mainly checks that all `BasicBlock` actually exist. On top of that, it checks that `Call` actually calls something of `FnPtr`/`FnDef` type, and `Assert` has to work on a `bool`. Also `SwitchInt` cannot have an empty target list.
@RalfJung
Copy link
Member Author

RalfJung commented Jun 1, 2020

@rustbot modify labels: +rollup
@bors r+ rollup=never p=6

@bors
Copy link
Contributor

bors commented Jun 1, 2020

📌 Commit 6e916b7 has been approved by RalfJung

@rustbot rustbot added the rollup A PR which is a rollup label Jun 1, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 1, 2020
@bors
Copy link
Contributor

bors commented Jun 1, 2020

⌛ Testing commit 6e916b7 with merge d7b26af8e4b7a6261dd16d4bb5164aac5866fb5e...

@bors
Copy link
Contributor

bors commented Jun 1, 2020

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 1, 2020
@RalfJung RalfJung closed this Jun 1, 2020
@RalfJung RalfJung deleted the rollup-lm6lfk2 branch June 1, 2020 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants