about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2017-03-12Allow cleaning llvm build dir to failAlex Crichton-1/+1
It may not exist, so we don't want to spuriously generate an error.
2017-03-12Default llvm.clean-rebuild to falseVadim Petrochenkov-6/+5
2017-03-12rustbuild: Add option for enabling partial LLVM rebuildsVadim Petrochenkov-14/+22
2017-03-12Auto merge of #40257 - pftbest:sret_msp430, r=alexcrichtonbors-1/+1
LLVM: Update submodule to include SRet support patch for MSP430. This patch is needed to fix #38824 on MSP430. I know that LLVM 4 is coming soon, but it would be great to have at least one working nightly before the update. cc @awygle r? @alexcrichton
2017-03-12Auto merge of #39770 - alexcrichton:configure-clean, r=brsonbors-12/+26
Delete more swaths of the configure script This PR deletes more swaths of the `./configure` script which are either no longer necessary or already available in rustbuild (where an implementation is preferred)
2017-03-12Auto merge of #40446 - arielb1:rollup, r=alexcrichtonbors-232/+509
Rollup of 12 pull requests - Successful merges: #40146, #40299, #40315, #40319, #40344, #40345, #40372, #40373, #40400, #40404, #40419, #40431 - Failed merges:
2017-03-11Auto merge of #40220 - jseyfried:ast_macro_def, r=nrcbors-316/+305
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info This PR - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items, - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today), - removes `ast::MacroDef`, and - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions. - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter. r? @nrc
2017-03-11Rollup merge of #40431 - fsasm:master, r=BurntSushiAriel Ben-Yehuda-1/+1
rustc: Whitelist the FMA target feature This commit adds the entry `"fma\0"` to the whitelist for the x86 target. LLVM already supports fma but rustc did not directly. Previously rustc permitted `+fma` in the target-feature argument and enabled the use of FMA instructions, but it did not list it in the configuration and attributes. fixes #40406
2017-03-11Rollup merge of #40419 - GuillaumeGomez:fix-const-rendering, r=frewsxcvAriel Ben-Yehuda-19/+47
Fix associated consts display Fixes #40370. r? @frewsxcv
2017-03-11Rollup merge of #40404 - cengizIO:master, r=nikomatsakisAriel Ben-Yehuda-8/+51
fix #40294 obligation cause.body_id is not always a NodeExpr Hello! This fixes #40294 and moves tests related to #38812 to a much more sensible directory. Thanks to @nikomatsakis and @eddyb
2017-03-11Rollup merge of #40400 - TimNN:gdbr-updates, r=alexcrichtonAriel Ben-Yehuda-17/+22
Update gdbr tests gdb will now reliably detect the lanugage as rust even before any code is run.
2017-03-11Rollup merge of #40373 - TimNN:test-ub-packed, r=arielb1Ariel Ben-Yehuda-2/+43
Fix UB in repr(packed) tests r? @arielb1 cc #37609 and #27060
2017-03-11Rollup merge of #40372 - nagisa:never-drop, r=eddybAriel Ben-Yehuda-2/+1
Do not bother creating StorageLive for TyNever Keeps MIR cleaner, `StorageLive(_: !)` makes no sense anyway. r? @eddyb
2017-03-11Rollup merge of #40344 - nrc:save-container, r=eddybAriel Ben-Yehuda-1/+4
save-analysis: cope with lack of method data after a type error Fixes #39957 r? @eddyb
2017-03-11Rollup merge of #40319 - eddyb:it's-"unsize"-not-"unsound", r=nikomatsakisAriel Ben-Yehuda-130/+249
Disallow subtyping between T and U in T: Unsize<U>. Because `&mut T` can be coerced to `&mut U`, `T` and `U` must be unified invariantly. Fixes #40288. E.g. coercing `&mut [&'a X; N]` to `&mut [&'b X]` must require `'a` be equal to `'b`, otherwise you can convert between `&'a X` and `&'b X` (in either direction), potentially unsoundly lengthening lifetimes. Subtyping here was introduced with `Unsize` in #24619 (landed in 1.1, original PR is #23785).
2017-03-11Rollup merge of #40315 - oli-obk:lint_body, r=eddybAriel Ben-Yehuda-0/+8
Allow lints to check Bodys directly r? @eddyb babysteps towards fixing https://github.com/Manishearth/rust-clippy/issues/1580 (disable certain lints in const environments, since they make no sense there (yet))
2017-03-11Rollup merge of #40299 - GuillaumeGomez:fmt-display-example, r=frewsxcvAriel Ben-Yehuda-1/+20
Add missing example for Display::fmt r? @frewsxcv
2017-03-11Rollup merge of #40146 - bjorn3:few-infer-changes, r=pnkfelixAriel Ben-Yehuda-51/+63
Better docs of rusty parts of typeck
2017-03-11Auto merge of #40443 - alexcrichton:fix-nightlies-again, r=alexcrichtonbors-1/+1
rustbuild: Fix a bug when manifesting with Cargo The wrong Cargo version was passed down so it ended up panicking the build-manifest script as it couldn't find the right tarball.
2017-03-11rustbuild: Fix a bug when manifesting with CargoAlex Crichton-1/+1
The wrong Cargo version was passed down so it ended up panicking the build-manifest script as it couldn't find the right tarball.
2017-03-11configure: Remove --build detectionAlex Crichton-12/+26
This commit removes detection of CFG_OSTYPE and CFG_CPUTYPE from the configure script, which means that the default value of `--build` is no longer present in the configure script. All this logic is now available in rustbuild itself, so there's no need to duplicate it.
2017-03-11Auto merge of #40308 - nikomatsakis:incr-comp-isolate-task, r=mwbors-48/+169
first pass at isolating dep-graph tasks This intentionally leaves `DepGraph::in_task()`, the more common form, alone. Eventually all uses of `DepGraph::in_task()` should be ported to `with_task()`, but I wanted to start with a smaller subset. I also used `AssertDepGraphSafe` on the closures that are found in trans. This is because the types there are non-trivial and I wanted to lay down the mechanism and come back to the more subtle cases. The current approach taken in this PR has a downside: it is necessary to manually "reify" fn types into fn pointers when starting a task, like so: dep_graph.with_task(..., task_fn as fn(_)) this is because `with_task` takes some type `T` that implements `DepGraphTask` rather than taking a `fn()` type directly. *This* is so that we can accept closure and also so that we can accept fns with multiple arities. I am not sure this is the right approach. Originally I wanted to use closures bound by an auto trait, but that approach has some limitations: - the trait cannot have a `read()` method; since the current method is unused, that may not be a problem. - more importantly, we would want the auto trait to be "undefined" for all types *by default* -- that is, this use case doesn't really fit the typical auto trait scenario. For example, imagine that there is a `u32` loaded out of a `hir::Node` -- we don't really want to be passing that `u32` into the task!
2017-03-11Auto merge of #40199 - alexcrichton:doc-proc-macro, r=brsonbors-11/+207
rustbuild: Build documentation for `proc_macro` This commit fixes #38749 by building documentation for the `proc_macro` crate by default for configured hosts. Unfortunately did not turn out to be a trivial fix. Currently rustbuild generates documentation into multiple locations: one for std, one for test, and one for rustc. The initial fix for this issue simply actually executed `cargo doc -p proc_macro` which was otherwise completely elided before. Unfortunately rustbuild was the left to merge two documentation trees together. One for the standard library and one for the rustc tree (which only had docs for the `proc_macro` crate). Rustdoc itself knows how to merge documentation files (specifically around search indexes, etc) but rustbuild was unaware of this, so an initial fix ended up destroying the sidebar and the search bar from the libstd docs. To solve this issue the method of documentation has been tweaked slightly in rustbuild. The build system will not use symlinks (or directory junctions on Windows) to generate all documentation into the same location initially. This'll rely on rustdoc's logic to weave together all the output and ensure that it ends up all consistent. Closes #38749
2017-03-11Auto merge of #39648 - Aatch:mir-inlining-2, r=eddybbors-8/+1505
[MIR] Implement Inlining Fairly basic implementation of inlining for MIR. Uses conservative heuristics for inlining. Doesn't handle a number of cases, but can be extended later. This is basically the same as the previous inlining PR, but without the span-related changes (as the bugs it was dealing with have since been fixed). /cc @rust-lang/compiler
2017-03-11Auto merge of #40432 - alexcrichton:rollup, r=alexcrichtonbors-892/+962
Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426
2017-03-10Test fixes and rebase conflictsAlex Crichton-1/+1
2017-03-10Rollup merge of #40423 - DirkyJerky:patch-2, r=BurntSushiAlex Crichton-1/+1
Clarify docs in `VecDeque::resize`
2017-03-10Rollup merge of #40410 - clarcharr:os_string_shrink_to_fit, r=alexcrichtonAlex Crichton-0/+25
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.
2017-03-10Rollup merge of #40389 - F001:placementVecDeque, r=nagisaAlex Crichton-26/+184
Implement placement-in protocol for `VecDeque` CC #30172 r? @nagisa
2017-03-10Rollup merge of #40386 - tbu-:pr_display_frombyteswithnulerror, r=alexcrichtonAlex Crichton-6/+40
Distinguish the ways `CStr::from_bytes_with_nul` can fail
2017-03-10Rollup merge of #40379 - clarcharr:box_docs, r=brsonAlex Crichton-0/+2
Box docs: no allocation is done for ZSTs. Updated to add a small bit saying that ZSTs don't actually allocate on `Box::new`.
2017-03-11Auto merge of #40422 - alexcrichton:retry-linker-segfault, r=arielb1bors-1/+47
rustc: Support auto-retry linking on a segfault This is a last-ditch attempt to help our pain with dealing with #38878 on the bots. A new environment variable is added to the compiler, `RUSTC_RETRY_LINKER_ON_SEGFAULT`, which will instruct the compiler to automatically retry the final linker invocation if it looks like the linker segfaulted (up to 2 extra times). Unfortunately there have been no successful attempts to debug #38878. The only information seems to be that the linker (e.g. `ld` on OSX) is segfaulting somewhere in some thread pool implementation. This appears to be spurious as failed PRs will later merge. The hope is that this helps the queue keep moving without clogging and delaying PRs due to #38878.
2017-03-10Rollup merge of #40336 - alexcrichton:fast-dep-info, r=nrcAlex Crichton-0/+23
rustc: Exit quickly on only `--emit dep-info` 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 #40328
2017-03-10Rollup merge of #40324 - alexcrichton:sccache-errors, r=aturonAlex Crichton-1/+5
travis: Attempt to debug sccache failures 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.
2017-03-10Rollup merge of #40311 - nrc:save-proc-macro-attr, r=jseyfriedAlex Crichton-2/+16
Expect macro defs in save-analysis and add expn info to spans for att… …r proc macros r? @jseyfried
2017-03-10Rollup merge of #40297 - alexcrichton:fix-submodules, r=brsonAlex Crichton-675/+28
Don't put Cargo into the rustc workspace 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 a new `vendor` directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace. Closes https://github.com/rust-lang/rust/issues/40284
2017-03-10Rollup merge of #40287 - estebank:label-overlap, r=nrcAlex Crichton-28/+61
Fix incorrect span label formatting Fix #40157.
2017-03-10Rollup merge of #40278 - GuillaumeGomez:css-cleanup, r=frewsxcvAlex Crichton-58/+89
Clean up rustdoc css r? @rust-lang/docs
2017-03-10Rollup merge of #40277 - rkruppe:llvm-parallel-link-jobs, r=alexcrichtonAlex Crichton-0/+17
rustbuild: expose LLVM_PARALLEL_LINK_JOBS This allows limiting the number of linker jobs to avoid swapping when linking LLVM with debug info.
2017-03-10Rollup merge of #40261 - infinity0:patch-1, r=alexcrichtonAlex Crichton-1/+1
Support armhf abi on 64-bit ARM cpus They report their `uname -m` as armv8l rather than aarch64. Patch originally by Matthias Klose <doko@debian.org>
2017-03-10Rollup merge of #40259 - TimNN:fix-emscripten-tests, r=alexcrichtonAlex Crichton-1/+1
Fix emscripten test detection Without this change `rustbuild` will attempt to run `.js.map` files (if they exist) resulting in lots of sadness. r? @alexcrichton
2017-03-10Rollup merge of #40239 - nagisa:death-to-plugins, r=nikomatsakisAlex Crichton-91/+1
Remove ability for plugins to register a MIR pass 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. cc @nikomatsakis
2017-03-10Rollup merge of #40225 - shepmaster:restore-build-date-file, r=alexcrichtonAlex Crichton-3/+14
Restore creating the channel-rust-$channel-date.txt files I have **not** run this (because I don't know how to 😇), but it *does* compile. r? @alexcrichton
2017-03-10Rollup merge of #40092 - sinkuu:fix_suggestion_index, r=pnkfelixAlex Crichton-1/+29
Fix suggestion span error with a line containing multibyte characters This PR fixes broken suggestions caused by multibyte characters. e.g. for this code, rustc provides a broken suggestion ([playground](https://is.gd/DWGLu7)): ```rust fn main() { let tup = (1,); println!("☃{}", tup[0]); } ``` ``` error: cannot index a value of type `({integer},)` --> <anon>:3:21 | 3 | println!("☃{}", tup[0]); | ^^^^^^ | help: to access tuple elements, use tuple indexing syntax as shown | println!("☃{}"tup.00]); error: aborting due to previous error ``` `CodeSuggestion::splice_lines` is misusing `Loc.col` (`CharPos`) as a byte offset when slicing source.
2017-03-10rustc: Whitelist the FMA target featureFabjan Sukalia-1/+1
This commit adds the entry `"fma\0"` to the whitelist for the x86 target. LLVM already supports fma but rustc did not directly. Previously rustc permitted `+fma` in the target-feature argument and enabled the use of FMA instructions, but it did not list it in the configuration and attributes. fixes #40406
2017-03-10Rollup merge of #39918 - petrhosek:fuchsia-ci, r=alexcrichtonAlex Crichton-3/+190
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.
2017-03-10Rollup merge of #39820 - jonasbb:export-attributes, r=nrcAlex Crichton-5/+102
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](https://github.com/rust-lang-nursery/rls/issues/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 } } ] ```
2017-03-10Don't put Cargo into the rustc workspaceAlex Crichton-675/+28
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.
2017-03-10rustbuild: Build documentation for `proc_macro`Alex Crichton-11/+207
This commit fixes #38749 by building documentation for the `proc_macro` crate by default for configured hosts. Unfortunately did not turn out to be a trivial fix. Currently rustbuild generates documentation into multiple locations: one for std, one for test, and one for rustc. The initial fix for this issue simply actually executed `cargo doc -p proc_macro` which was otherwise completely elided before. Unfortunately rustbuild was the left to merge two documentation trees together. One for the standard library and one for the rustc tree (which only had docs for the `proc_macro` crate). Rustdoc itself knows how to merge documentation files (specifically around search indexes, etc) but rustbuild was unaware of this, so an initial fix ended up destroying the sidebar and the search bar from the libstd docs. To solve this issue the method of documentation has been tweaked slightly in rustbuild. The build system will not use symlinks (or directory junctions on Windows) to generate all documentation into the same location initially. This'll rely on rustdoc's logic to weave together all the output and ensure that it ends up all consistent. Closes #38749
2017-03-10Clarify docs in `VecDeque::resize`Geoff Yoerger-1/+1