-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 16 pull requests #48348
Rollup of 16 pull requests #48348
Commits on Feb 9, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 4d92fe2 - Browse repository at this point
Copy the full SHA 4d92fe2View commit details
Commits on Feb 11, 2018
-
rust: Import LLD for linking wasm objects
This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
Configuration menu - View commit details
-
Copy full SHA for 50642c8 - Browse repository at this point
Copy the full SHA 50642c8View commit details -
rustc: Tweak default linker selection
This commit refactors how the path to the linker that we're going to invoke is selected. Previously all targets listed *both* a `LinkerFlavor` and a `linker` (path) option, but this meant that whenever you changed one you had to change the other. The purpose of this commit is to avoid coupling these where possible. Target specifications now only unconditionally define the *flavor* of the linker that they're using by default. If not otherwise specified each flavor now implies a particular default linker to run. As a result, this means that if you'd like to test out `ld` for example you should be able to do: rustc -Z linker-flavor=ld foo.rs whereas previously you had to do rustc -Z linker-flavor=ld -C linker=ld foo.rs This will hopefully make it a bit easier to tinker around with variants that should otherwise be well known to work, for example with LLD, `ld` on OSX, etc.
Configuration menu - View commit details
-
Copy full SHA for ce52e0e - Browse repository at this point
Copy the full SHA ce52e0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a003cb7 - Browse repository at this point
Copy the full SHA a003cb7View commit details
Commits on Feb 12, 2018
-
The fallible version of for_each and the stateless version of try_fold.
Configuration menu - View commit details
-
Copy full SHA for 0bb818c - Browse repository at this point
Copy the full SHA 0bb818cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd10ef7 - Browse repository at this point
Copy the full SHA bd10ef7View commit details -
detect wrong number of args when type-checking a closure
Instead of creating inference variables for those argument types, use the trait error-reporting code to give a nicer error.
Configuration menu - View commit details
-
Copy full SHA for cc05561 - Browse repository at this point
Copy the full SHA cc05561View commit details
Commits on Feb 13, 2018
-
incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to…
… allow for recursive invocations.
Configuration menu - View commit details
-
Copy full SHA for 335e25f - Browse repository at this point
Copy the full SHA 335e25fView commit details
Commits on Feb 14, 2018
-
Allow two-phase borrows of &mut self in ops
We need two-phase borrows of ops to be in the initial NLL release since without them lots of existing code will break. Fixes rust-lang#48129
Configuration menu - View commit details
-
Copy full SHA for 3118cbe - Browse repository at this point
Copy the full SHA 3118cbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75f72c0 - Browse repository at this point
Copy the full SHA 75f72c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70e1f4f - Browse repository at this point
Copy the full SHA 70e1f4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1fbf79 - Browse repository at this point
Copy the full SHA f1fbf79View commit details -
Configuration menu - View commit details
-
Copy full SHA for dbacf0c - Browse repository at this point
Copy the full SHA dbacf0cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20dcc72 - Browse repository at this point
Copy the full SHA 20dcc72View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4b8475 - Browse repository at this point
Copy the full SHA d4b8475View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e9c55f - Browse repository at this point
Copy the full SHA 9e9c55fView commit details
Commits on Feb 15, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 7062955 - Browse repository at this point
Copy the full SHA 7062955View commit details -
Configuration menu - View commit details
-
Copy full SHA for f787bdd - Browse repository at this point
Copy the full SHA f787bddView commit details -
Configuration menu - View commit details
-
Copy full SHA for c0517a3 - Browse repository at this point
Copy the full SHA c0517a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d691c46 - Browse repository at this point
Copy the full SHA d691c46View commit details -
Convert compile-fail/lint-ctypes.rs to ui test
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for 1f0e1a0 - Browse repository at this point
Copy the full SHA 1f0e1a0View commit details -
[improper_ctypes] Use a 'help:' line for possible fixes
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for 7ac5e96 - Browse repository at this point
Copy the full SHA 7ac5e96View commit details -
[improper_ctypes] Stop complaining about repr(usize) and repr(isize) …
…enums This dates back to at least rust-lang#26583. At the time, usize and isize were considered ffi-unsafe to nudge people away from them, but this changed in the aforementioned PR, making it inconsistent to complain about it in enum discriminants. In fact, repr(usize) is probably the best way to interface with `enum Foo : size_t { ... }`.
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for ae92dfa - Browse repository at this point
Copy the full SHA ae92dfaView commit details -
[improper_ctypes] Overhaul primary label
- Always name the non-FFI-safe - Explain *why* the type is not FFI-safe - Stop vaguely gesturing at structs/enums/unions if the non-FFI-safe types occured in a field. The last part is arguably a regression, but it's minor now that the non-FFI-safe type is actually named. Removing it avoids some code duplication.
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for 9b5f47e - Browse repository at this point
Copy the full SHA 9b5f47eView commit details -
[improper_ctypes] Suggest repr(transparent) for structs
The suggestion is unconditional, so following it could lead to further errors. This is already the case for the repr(C) suggestion, which makes this acceptable, though not *good*. Checking up-front whether the suggestion can help would be great but applies more broadly (and would require some refactoring to avoid duplicating the checks).
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for 22a1716 - Browse repository at this point
Copy the full SHA 22a1716View commit details -
[improper_ctypes] Point at definition of non-FFI-safe type if possible
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for 9d493c8 - Browse repository at this point
Copy the full SHA 9d493c8View commit details -
[improper_ctypes] Don't suggest raw pointers when encountering trait …
…objects It's unhelpful since raw pointers to trait objects are also FFI-unsafe and casting to a thin raw pointer loses the vtable. There are working solutions that _involve_ raw pointers but they're too complex to explain in one line and have serious trade offs.
Robin Kruppe committedFeb 15, 2018 Configuration menu - View commit details
-
Copy full SHA for 051ea5c - Browse repository at this point
Copy the full SHA 051ea5cView commit details
Commits on Feb 16, 2018
-
save-analysis: power through bracket mis-counts
Closes rust-lang#47981 This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here.
Configuration menu - View commit details
-
Copy full SHA for 10fbdb8 - Browse repository at this point
Copy the full SHA 10fbdb8View commit details
Commits on Feb 17, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 0be2dc8 - Browse repository at this point
Copy the full SHA 0be2dc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cf683e - Browse repository at this point
Copy the full SHA 2cf683eView commit details -
Configuration menu - View commit details
-
Copy full SHA for b3d6597 - Browse repository at this point
Copy the full SHA b3d6597View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8d4c58 - Browse repository at this point
Copy the full SHA d8d4c58View commit details
Commits on Feb 18, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 472dcdb - Browse repository at this point
Copy the full SHA 472dcdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4370a58 - Browse repository at this point
Copy the full SHA 4370a58View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba8d6d1 - Browse repository at this point
Copy the full SHA ba8d6d1View commit details -
Improve hygiene when privacy-checking struct expression or struct con…
…structor fields.
Configuration menu - View commit details
-
Copy full SHA for 4294528 - Browse repository at this point
Copy the full SHA 4294528View commit details -
Configuration menu - View commit details
-
Copy full SHA for 876c42d - Browse repository at this point
Copy the full SHA 876c42dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 169643d - Browse repository at this point
Copy the full SHA 169643dView commit details
Commits on Feb 19, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 6818551 - Browse repository at this point
Copy the full SHA 6818551View commit details -
Configuration menu - View commit details
-
Copy full SHA for f60aeec - Browse repository at this point
Copy the full SHA f60aeecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d0ae9f - Browse repository at this point
Copy the full SHA 1d0ae9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a04c124 - Browse repository at this point
Copy the full SHA a04c124View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fdc10c - Browse repository at this point
Copy the full SHA 5fdc10cView commit details -
Rollup merge of rust-lang#48082 - jseyfried:improve_struct_field_hygi…
…ene, r=jseyfried macros: improve struct constructor field hygiene, fix span bug Fixes rust-lang#47311. r? @nrc
Configuration menu - View commit details
-
Copy full SHA for face16b - Browse repository at this point
Copy the full SHA face16bView commit details -
Rollup merge of rust-lang#48083 - jseyfried:improve_tuple_struct_fiel…
…d_access_hygiene, r=petrochenkov Improve tuple struct field access hygiene Fixes rust-lang#47312 by fixing a span bug. r? @nrc
Configuration menu - View commit details
-
Copy full SHA for 73b0514 - Browse repository at this point
Copy the full SHA 73b0514View commit details -
Rollup merge of rust-lang#48084 - cramertj:impl-trait-errors, r=nikom…
…atsakis Error on nested impl Trait and path projections from impl Trait cc rust-lang#34511 r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 250e021 - Browse repository at this point
Copy the full SHA 250e021View commit details -
Rollup merge of rust-lang#48106 - QuietMisdreavus:teleporting-crates,…
… r=GuillaumeGomez rustdoc: move manual "extern crate" statements outside automatic "fn main"s in doctests Gated on rust-lang#48095 - I based the branch atop that so i could show off the change in one of its tests, the actual change in this PR is just the last commit There are a handful of unfortunate assumptions in the way rustdoc processes `extern crate` statements in doctests: 1. In the absence of an `extern crate` statement in the test, if the test also uses the local crate name, it will automatically insert an `extern crate cratename;` statement into the test. 2. If the doctest *does* include an `extern crate` statement, rustdoc will not automatically insert one, on the assumption that doing so would introduce a duplicate import. 3. If a doctest does not have the substring `fn main` outside a comment, rustdoc will wrap the whole doctest in a generated `fn main` so it can be compiled. In short, whenever you write a doctest like this... ```rust //! extern crate my_crate; //! my_crate::some_cool_thing(); ``` ...rustdoc will turn it into (something like) this: ```rust fn main() { extern crate my_crate; my_crate::some_cool_thing(); } ``` This creates issues when compiled, because now `my_crate` isn't even properly in scope! This forces people who want to have multiple crates in their doctests (or an explicit `extern crate` statement) to also manually include their own `fn main`, so rustdoc doesn't put their imports in the wrong place. This PR just taps into another processing step rustdoc does to doctests: Whenever you add an `#![inner_attribute]` to the beginning of a doctest, rustdoc will actually splice those out and put it before the generated `fn main`. Now, we can just do the same with `extern crate`s at the beginning, too, and get a much nicer experience. Now, the above example will be converted into this: ```rust extern crate my_crate; fn main() { my_crate::some_cool_thing(); } ```
Configuration menu - View commit details
-
Copy full SHA for 4ec81b3 - Browse repository at this point
Copy the full SHA 4ec81b3View commit details -
Rollup merge of rust-lang#48123 - nikomatsakis:issue-47244-expected-n…
…um-args, r=estebank detect wrong number of args when type-checking a closure Instead of creating inference variables for those argument types, use the trait error-reporting code to give a nicer error. This also improves some other spans for existing tests. Fixes rust-lang#47244 r? @estebank
Configuration menu - View commit details
-
Copy full SHA for e91f1c0 - Browse repository at this point
Copy the full SHA e91f1c0View commit details -
Rollup merge of rust-lang#48125 - alexcrichton:lld, r=Mark-Simulacrum
rust: Import LLD for linking wasm objects This commit imports the LLD project from LLVM to serve as the default linker for the `wasm32-unknown-unknown` target. The `binaryen` submoule is consequently removed along with "binaryen linker" support in rustc. Moving to LLD brings with it a number of benefits for wasm code: * LLD is itself an actual linker, so there's no need to compile all wasm code with LTO any more. As a result builds should be *much* speedier as LTO is no longer forcibly enabled for all builds of the wasm target. * LLD is quickly becoming an "official solution" for linking wasm code together. This, I believe at least, is intended to be the main supported linker for native code and wasm moving forward. Picking up support early on should help ensure that we can help LLD identify bugs and otherwise prove that it works great for all our use cases! * Improvements to the wasm toolchain are currently primarily focused around LLVM and LLD (from what I can tell at least), so it's in general much better to be on this bandwagon for bugfixes and new features. * Historical "hacks" like `wasm-gc` will soon no longer be necessary, LLD will [natively implement][gc] `--gc-sections` (better than `wasm-gc`!) which means a postprocessor is no longer needed to show off Rust's "small wasm binary size". LLD is added in a pretty standard way to rustc right now. A new rustbuild target was defined for building LLD, and this is executed when a compiler's sysroot is being assembled. LLD is compiled against the LLVM that we've got in tree, which means we're currently on the `release_60` branch, but this may get upgraded in the near future! LLD is placed into rustc's sysroot in a `bin` directory. This is similar to where `gcc.exe` can be found on Windows. This directory is automatically added to `PATH` whenever rustc executes the linker, allowing us to define a `WasmLd` linker which implements the interface that `wasm-ld`, LLD's frontend, expects. Like Emscripten the LLD target is currently only enabled for Tier 1 platforms, notably OSX/Windows/Linux, and will need to be installed manually for compiling to wasm on other platforms. LLD is by default turned off in rustbuild, and requires a `config.toml` option to be enabled to turn it on. Finally the unstable `#![wasm_import_memory]` attribute was also removed as LLD has a native option for controlling this. [gc]: https://reviews.llvm.org/D42511
Configuration menu - View commit details
-
Copy full SHA for 0bac52a - Browse repository at this point
Copy the full SHA 0bac52aView commit details -
Rollup merge of rust-lang#48157 - scottmcm:try-for-each, r=dtolnay
Add Iterator::try_for_each The fallible version of `for_each` aka the stateless version of `try_fold`. Inspired by @cuviper's comment in rust-lang#45379 (comment) as a more direct and obvious solution than `.map(f).collect::<Result<(), _>>()`. Like `for_each`, no need for an `r` version thanks to overrides in `Rev`. `iterator_try_fold` tracking issue: rust-lang#45594
Configuration menu - View commit details
-
Copy full SHA for ed532f9 - Browse repository at this point
Copy the full SHA ed532f9View commit details -
Rollup merge of rust-lang#48185 - michaelwoerister:recursive-cache-de…
…coding, r=nikomatsakis incr.comp.: Don't keep RefCells in on-disk-cache borrowed in order to allow for recursive invocations. Fixes rust-lang#47972. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 1a4b5fb - Browse repository at this point
Copy the full SHA 1a4b5fbView commit details -
Rollup merge of rust-lang#48197 - bobtwinkles:two_phase_borrow_on_ops…
…, r=nikomatsakis Allow two-phase borrows of &mut self in ops We need two-phase borrows of ops to be in the initial NLL release since without them lots of existing code will break. Fixes rust-lang#48129. CC @pnkfelix and @nikomatsakis r? @pnkfelix
Configuration menu - View commit details
-
Copy full SHA for ac82683 - Browse repository at this point
Copy the full SHA ac82683View commit details -
Rollup merge of rust-lang#48198 - csmoe:inform_type_annotations, r=es…
…tebank inform user where to give a type annotation should resolve rust-lang#47777 previous pull request rust-lang#47982 was closed because of a mistaken rebase. r? @estebank
Configuration menu - View commit details
-
Copy full SHA for 68a69fe - Browse repository at this point
Copy the full SHA 68a69feView commit details -
Rollup merge of rust-lang#48206 - michaelwoerister:colors-array, r=ni…
…komatsakis incr.comp.: Store DepNode colors in a dense array instead of a hashmap. Implements half of rust-lang#47293. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for c9103c3 - Browse repository at this point
Copy the full SHA c9103c3View commit details -
Rollup merge of rust-lang#48208 - michaelwoerister:track-features, r=…
…petrochenkov Turn feature-gate table into a query so it is covered by dependency tracking. Turn access to feature gates into a query so we handle them correctly during incremental compilation. Features are still available via `Session` through `features_untracked()`. I wish we had a better way of hiding untracked information. It would be great if we could remove the `sess` field from `TyCtxt`. Fixes rust-lang#47003.
Configuration menu - View commit details
-
Copy full SHA for 23cf624 - Browse repository at this point
Copy the full SHA 23cf624View commit details -
Rollup merge of rust-lang#48221 - rkruppe:improve-ctypes-lint, r=este…
…bank Overhaul improper_ctypes output This snowballed into a rather big set of improvements to the diagnostics of the improper_ctypes lint. See commits for details, including effects of each change on the `compile-fail/improper-ctypes.rs` test (now a UI test), which is pretty gnarly and hopefully not representative of real code, but covers a lot of different error cases. Fixes rust-lang#42050
Configuration menu - View commit details
-
Copy full SHA for bce6664 - Browse repository at this point
Copy the full SHA bce6664View commit details -
Rollup merge of rust-lang#48258 - nrc:save-proc-nested, r=eddyb
save-analysis: power through bracket mis-counts Closes rust-lang#47981 This is pretty unsatisfying since it is working around a span bug. However, I can't track down the span bug and it could be in the parser, proc macro expansion, the user macro, or Syn (or any other library that can manipulate spans). Given that user code can cause this error, I think we need to be more robust here. r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 64877dc - Browse repository at this point
Copy the full SHA 64877dcView commit details -
Rollup merge of rust-lang#48314 - frewsxcv:frewsxcv-broken-link, r=Gu…
…illaumeGomez Fix broken documentation link. None
Configuration menu - View commit details
-
Copy full SHA for b7b3e3a - Browse repository at this point
Copy the full SHA b7b3e3aView commit details -
Rollup merge of rust-lang#48335 - Manishearth:shortcut-links, r=Quiet…
…Misdreavus Implement implied shortcut links for intra-rustdoc-links cc rust-lang#43466 Needs pulldown-cmark/pulldown-cmark#126 r? @QuietMisdreavus
Configuration menu - View commit details
-
Copy full SHA for c787251 - Browse repository at this point
Copy the full SHA c787251View commit details