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 7 pull requests #70062

Merged
merged 19 commits into from
Mar 17, 2020
Merged

Rollup of 7 pull requests #70062

merged 19 commits into from
Mar 17, 2020

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 17, 2020

Successful merges:

Failed merges:

r? @ghost

petrochenkov and others added 19 commits March 9, 2020 20:50
by factoring out `fn ctor_fields_span` into a separate function
resolve: Print import chains on privacy errors

A part of rust-lang#67951 that doesn't require hacks.
r? @estebank
expand: Implement something similar to `#[cfg(accessible(path))]`

cc rust-lang#64797

The feature is implemented as a `#[cfg_accessible(path)]` attribute macro rather than as `#[cfg(accessible(path))]` because it needs to wait until `path` becomes resolvable, and `cfg` cannot wait, but macros can wait.

Later we can think about desugaring or not desugaring `#[cfg(accessible(path))]` into `#[cfg_accessible(path)]`.

This implementation is also incomplete in the sense that it never returns "false" from `cfg_accessible(path)`, it requires some tweaks to resolve, which is not quite ready to answer queries like this during early resolution.

However, the most important part of this PR is not `cfg_accessible` itself, but expansion infrastructure for retrying expansions.
Before this PR we could say "we cannot resolve this macro path, let's try it later", with this PR we can say "we cannot expand this macro, let's try it later" as well.

This is a pre-requisite for
- turning `#[derive(...)]` into a regular attribute macro,
- properly supporting eager expansion for macros that cannot yet be resolved like
    ```
    fn main() {
        println!(not_available_yet!());
    }

    macro_rules! make_available {
        () => { #[macro_export] macro_rules! not_available_yet { () => { "Hello world!" } }}
    }

    make_available!();
    ```
VariantSizeDifferences: bail on SizeOverflow

Fixes rust-lang#69485.

r? @oli-obk
resolve: Fix regression in resolution of raw keywords in paths

Fixes rust-lang#63882.
Use sublice patterns to avoid computing the len

r? @Centril
…unimplemented, r=eddyb

Fiddle `ParamEnv` through to a place that used to use `ParamEnv::empty` in a buggy manner

cc rust-lang#69981 (comment)

r? @eddyb
@Centril
Copy link
Contributor Author

Centril commented Mar 17, 2020

@bors r+ p=7 rollup=never

@bors
Copy link
Contributor

bors commented Mar 17, 2020

📌 Commit f118fee has been approved by Centril

@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 Mar 17, 2020
@Centril Centril added the rollup A PR which is a rollup label Mar 17, 2020
@bors
Copy link
Contributor

bors commented Mar 17, 2020

⌛ Testing commit f118fee with merge 5e9ebf4...

@bors
Copy link
Contributor

bors commented Mar 17, 2020

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 5e9ebf4 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants