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 38 pull requests #40432

Merged
merged 46 commits into from
Mar 11, 2017
Merged

Rollup of 38 pull requests #40432

merged 46 commits into from
Mar 11, 2017

Conversation

alexcrichton
Copy link
Member

sinkuu and others added 27 commits February 25, 2017 22:11
This allows limiting the number of linker jobs to avoid swapping when
linking LLVM with debug info.
I can't find anything that'd cause unexpected EOF in the source, so let's try
taking a look at the error logs on failures.
When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.
Some annotations like the "test" annotations might be of interest for
other projects, especially rls. Export all attributes in a new
attributes item.
Remove the AST structure
In recent months there have been a few different people investigating how to make a plugin that
registers a MIR-pass – one that isn’t intended to be eventually merged into rustc proper.

The interface to register MIR passes was added primarily for miri (& later was
found to make prototyping of rustc-proper MIR passes a tiny bit faster). Since miri does not use
this interface anymore it seems like a good time to remove this "feature".

For prototyping purposes a similar interface can be added by developers themselves in their custom
rustc build.
They report their `uname -m` as armv8l rather than aarch64.

Patch originally by Matthias Klose <doko@debian.org>
This commit alters the compiler to exit quickly if the only output being emitted
is `dep-info`, which doesn't need a lot of other information to generate.

Closes rust-lang#40328
This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
I don't believe that we need this any more now that `cargo-vendor` isn't
installed to create a source tarball (that only happens on Linux)
This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to the top
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
…turner

Point to enclosing block/fn on nested unsafe

When declaring nested unsafe blocks (`unsafe {unsafe {}}`) that trigger
the "unnecessary `unsafe` block" error, point out the enclosing `unsafe
block` or `unsafe fn` that makes it unnecessary.

<img width="621" alt="" src="https://cloud.githubusercontent.com/assets/1606434/22139922/26ad468a-de9e-11e6-8884-2945be882ea8.png">

Fixes rust-lang#39144.
Export attributes in save-analysis data

Since this is my first pull-request to rust, I would like to get some feedback about obvious errors in this implementation.

I would like to change the save-analysis data to include arbitrary attribute data.
A use-case I have in mind for this is identifying functions with `#[test]` annotations such that tools like rls can offer a test-runner feature. I described my idea here [rls#173](rust-lang/rls#173).

My changes contain:

1. track a vector of attributes in the various `*Data` types in `data.rs` and `external_data.rs`
2. implement lowering for `Attribute` and `MetaItem`
3. adjust `JsonDumper` to print the attributes

In the lowering of `Attribute` I remove the distinction between `MetaItem` and `NestedMetaItem`. I did this because this distinction is somewhat confusing. For example, `NestedMetaItemKind::Literal` has two identical spans, because both `NestedMetaItem` and `Lit` are defined as `Spanned<_>`.
My model is strictly more general, as it allows an `LitKind` instead of a `Symbol` for `MetaItem` and `Symbol`s are converted into a cooked string. As a consumer of the save-analysis data this shouldn't affect you much.

Example json output of `#[test]` annotation:
```
"attributes": [
  {
    "value": {
      "name": {
        "variant": "Str",
        "fields": [
          "test",
          "Cooked"
        ]
      },
      "kind": "Literal",
      "span": {
        "file_name": "test.rs",
        "byte_start": 2,
        "byte_end": 6,
        "line_start": 1,
        "line_end": 1,
        "column_start": 3,
        "column_end": 7
      }
    },
    "span": {
      "file_name": "test.rs",
      "byte_start": 0,
      "byte_end": 7,
      "line_start": 1,
      "line_end": 1,
      "column_start": 1,
      "column_end": 8
    }
  }
]
```
travis: Fuchsia builder

This change introduces a Dockerfile and script which builds a complete
Fuchsia toolchain which can be used to build Rust distribution for
Fuchsia. We only support cross-compiling at the moment, hence only
setting the target.
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @nrc

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

alexcrichton commented Mar 11, 2017 via email

@bors
Copy link
Contributor

bors commented Mar 11, 2017

⌛ Testing commit c4889ec with merge dd5e3cd...

@bors
Copy link
Contributor

bors commented Mar 11, 2017

💔 Test failed - status-travis

Box docs: no allocation is done for ZSTs.

Updated to add a small bit saying that ZSTs don't actually allocate on `Box::new`.
…or, r=alexcrichton

Distinguish the ways `CStr::from_bytes_with_nul` can fail
Implement placement-in protocol for `VecDeque`

CC rust-lang#30172

r? @nagisa
…r=alexcrichton

OsString::shrink_to_fit.

Considering how the other capacity-related methods are there, I found it odd that this one wasn't included.

Will create a tracking issue once I get an OK on this.
…rson

travis: Remove compiling OpenSSL through homebrew

I don't believe that we need this any more now that `cargo-vendor` isn't
installed to create a source tarball (that only happens on Linux)
@alexcrichton
Copy link
Member Author

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 11, 2017

📌 Commit 3493d91 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Mar 11, 2017

⌛ Testing commit 3493d91 with merge 6466f85...

@bors
Copy link
Contributor

bors commented Mar 11, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Mar 11, 2017

⌛ Testing commit 3493d91 with merge 1727b23...

@bors
Copy link
Contributor

bors commented Mar 11, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 1727b23 to master...

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.