Commit Graph

73579 Commits

Author SHA1 Message Date
bors 9368a1e3e2 Auto merge of #45684 - bjorn3:runtime_choose_trans2, r=eddyb
Allow runtime switching between trans backends

The driver callback after_llvm has been removed as it doesnt work with multiple backends.

r? @eddyb
2018-01-21 09:17:26 +00:00
bors 8d3e93beae Auto merge of #47622 - GuillaumeGomez:rollup, r=GuillaumeGomez
Rollup of 10 pull requests

- Successful merges: #46938, #47193, #47508, #47510, #47532, #47535, #47559, #47568, #47573, #47578
- Failed merges:
2018-01-21 06:32:03 +00:00
bors b85aefbc60 Auto merge of #47495 - nikomatsakis:nll-issue-47153, r=pnkfelix
remove bogus assertion and comments

The code (incorrectly) assumed that constants could not have generics
in scope, but it's not really a problem if they do.

Fixes #47153

r? @pnkfelix
2018-01-21 03:38:34 +00:00
Guillaume Gomez 4074893acd Rollup merge of #47578 - arthurprs:btree-doc, r=alexcrichton
Update BTreeMap recommendation

Focus on the ordering / range(instead of all) benefit as it's the most important feature.
2018-01-20 22:32:50 +01:00
Guillaume Gomez a9672c2360 Rollup merge of #47573 - estebank:closures, r=nikomatsakis
Closure argument mismatch tweaks

 - use consistent phrasing for expected and found arguments
 - suggest changing arguments to tuple if possible
 - suggest changing single tuple argument to arguments if possible

Fix #44150.
2018-01-20 22:32:49 +01:00
Guillaume Gomez 40ba599365 Rollup merge of #47568 - EdSchouten:cloudabi-linker, r=alexcrichton
Give TargetOptions::linker a sane default value for CloudABI.

Though some parts of rust use cc-rs to invoke a compiler/linker, Cargo
seems to make use of the TargetOptions::linker property. Make the out of
the box experience for CloudABI a bit better by using the same compiler
name as cc-rs.
2018-01-20 22:32:48 +01:00
Guillaume Gomez ea65bad080 Rollup merge of #47559 - walinga:pr-link-fix, r=kennytm
Fix the "Github - About Pull Requests" link in CONTRIBUTING.md

Previously the text that is supposed to link to the Github Pull Requests page, instead linked to the same file (CONTRIBUTING.md).
2018-01-20 22:32:47 +01:00
Guillaume Gomez 0f84ab4a41 Rollup merge of #47535 - Manishearth:ignore-target, r=kennytm
add target/ to ignored tidy dirs

Sometimes you get a target directory from running cargo in the rust repo (the root is `src/`), and it contains generated files. Just whitelist it since it causes tidy to spew warnings uncontrollably.
2018-01-20 22:32:46 +01:00
Guillaume Gomez b21499e768 Rollup merge of #47532 - tbu-:pr_path_oddities, r=TimNN
Add some edge cases to the documentation of `Path`

Affected methods are `starts_with` and `strip_prefix`.
2018-01-20 22:32:45 +01:00
Guillaume Gomez 5381dfb7d9 Rollup merge of #47510 - sfackler:deprecate-dns, r=alexcrichton
Deprecate std::net::lookup_host

We intended to do this quite a while ago but it snuck through.

r? @alexcrichton
2018-01-20 22:32:44 +01:00
Guillaume Gomez d3176efa78 Rollup merge of #47508 - QuietMisdreavus:rbe-bookshelf, r=steveklabnik
add Rust By Example to the bookshelf

cc #46194

With #46196 freshly merged, we should add a link to the main docs distribution so people can find it! We discussed this at the docs team meeting today and decided to go ahead with adding it to the bookshelf.
2018-01-20 22:32:43 +01:00
Guillaume Gomez 0e270fc842 Rollup merge of #47193 - cramertj:result-opts, r=TimNN
Add transpose conversions for nested Option and Result

These impls are useful when working with combinator
methods that expect an option or a result, but you
have a `Result<Option<T>, E>` instead of an `Option<Result<T, E>>`
or vice versa.
2018-01-20 22:32:42 +01:00
Guillaume Gomez fe811eb328 Rollup merge of #46938 - hellow554:rustdoc-kbd-style, r=GuillaumeGomez
add kbd style tag to main.css in rustdoc

Added css style for kbd tags so they actually look like keys.
Result preview and discussion was going on in #46900 .
2018-01-20 22:32:41 +01:00
bjorn3 a30232f9fd Remove the 'extern "C"' in the right place 2018-01-20 17:27:15 +01:00
bors 15a1e2844d Auto merge of #46980 - zackmdavis:and_the_case_of_the_needlessly_parenthesized_arguments, r=petrochenkov
in which the unused-parens lint comes to cover function and method args

Resolves #46137.
2018-01-20 15:06:41 +00:00
bors bdda8d6115 Auto merge of #46952 - SimonSapin:nonnull, r=alexcrichton
Rename std::ptr::Shared to NonNull and stabilize it

This implements the changes proposed at https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629:

> * Rename `Shared<T>` to `NonNull<T>` and stabilize it. (Being in the `ptr` module is enough to say that it’s a pointer. I’m not very attached to this specific name though.)
> * Rename `Box<T>` methods ~~`from_unique`~~/`into_unique` to ~~`from_nonnull`~~/`into_nonnull` (or whatever names are deemed appropriate), replace `Unique<T>` with `NonNull<T>` in their signatures, and stabilize them.
> *  Replace `Unique<T>` with `NonNull<T>` in the signatures of methods of the `Alloc` trait.
> * Mark `Unique` “permanently-unstable” by replacing remaining occurrences of `#[unstable(feature = "unique", issue = "27730")]` with:
>
>   ```rust
>   #[unstable(feature = "ptr_internals", issue = "0", reason = "\
>       use NonNull instead and consider PhantomData<T> (if you also use #[may_dangle]), \
>       Send, and/or Sync")]
>   ```
>
>   (Maybe the `reason` string is only useful on the struct definition.) Ideally it would be made private to some crate instead, but it needs to be used in both liballoc and libstd.
> * (Leave `NonZero` and `Zeroable` unstable for now, and subject to future bikeshedding.)
2018-01-20 12:28:13 +00:00
bjorn3 a4854e84f2 Fix ICE 2018-01-20 11:55:55 +01:00
Simon Sapin 602a445b92 Assign its own tracking issue to Box::into_raw_non_null
https://github.com/rust-lang/rust/issues/47336
2018-01-20 11:09:23 +01:00
Simon Sapin 76b686f78d Rename NonNull::empty to dangling. 2018-01-20 11:09:23 +01:00
Simon Sapin 5aeeafff49 Revert Box::into_raw_non_null to unstable 2018-01-20 11:09:23 +01:00
Simon Sapin a1db237cd4 Preserve formatting options in Debug for NonNull/Unique 2018-01-20 11:09:23 +01:00
Simon Sapin 943a9e707c Fix some doc-comment examples for earlier API refactor
https://github.com/rust-lang/rust/pull/41064
2018-01-20 11:09:23 +01:00
Simon Sapin 12b3630f62 Rename Box::into_non_null_raw to Box::into_raw_non_null 2018-01-20 11:09:23 +01:00
Simon Sapin 8ef5e549c3 Remove `Box::from_non_null_raw`
Per https://github.com/rust-lang/rust/pull/46952#issuecomment-353956225
2018-01-20 11:09:23 +01:00
Simon Sapin 1772fa2aa1 Rename Box::*_nonnull_raw to *_non_null_raw 2018-01-20 11:09:23 +01:00
Simon Sapin 55c50cd8ac Stabilize std::ptr::NonNull 2018-01-20 11:09:23 +01:00
Simon Sapin 2d51e74580 Remove a deprecated (renamed) and unstable method of NonNull 2018-01-20 11:09:23 +01:00
Simon Sapin c97c1f7dc3 Mark Unique as perma-unstable, with the feature renamed to ptr_internals. 2018-01-20 11:09:23 +01:00
Simon Sapin a2f878a084 Replace Box::{from,into}_unique with {from,into}_nonnull_raw
Thew `_raw` prefix is included because the fact that `Box`’s ownership
semantics are "dissolved" or recreated seem more important than the exact
parameter type or return type.
2018-01-20 11:09:22 +01:00
Simon Sapin fb03a49c25 Replace Unique<T> with NonZero<T> in Alloc trait 2018-01-20 10:55:16 +01:00
Simon Sapin f19baf0977 Rename std::ptr::Shared to NonNull
`Shared` is now a deprecated `type` alias.

CC https://github.com/rust-lang/rust/issues/27730#issuecomment-352800629
2018-01-20 10:55:16 +01:00
Corey Farwell ba5d7a66e8 Implement Debug for ptr::Shared and ptr::Unique.
Fixes https://github.com/rust-lang/rust/issues/46755.
2018-01-20 10:55:16 +01:00
Esteban Küber 7ed00caacc Closure argument mismatch tweaks
- use consistent phrasing for expected and found arguments
 - suggest changing arugments to tuple if possible
 - suggest changing single tuple argument to arguments if possible
2018-01-20 01:36:01 -08:00
bors 816d765716 Auto merge of #46919 - michaelwoerister:new-leb128, r=sfackler
Speed up leb128 encoding and decoding for unsigned values.

Make the implementation for some leb128 functions potentially faster.

@Mark-Simulacrum, could you please trigger a perf.rlo run?
2018-01-20 02:00:13 +00:00
bjorn3 82ac9f7532 Hopefully fix the 32bit SEGV 2018-01-19 20:27:52 +01:00
bjorn3 cc4deb2767 Just forget the DynamicLibrary after getting a hot plugged backend 2018-01-19 20:27:52 +01:00
bjorn3 a09aebee21 Remove accidential libloading dependency 2018-01-19 20:27:51 +01:00
bjorn3 c0444242ef Fix ICE 2018-01-19 20:27:36 +01:00
bjorn3 77dec3b03a Remove use of RUSTC_COMPILETEST env var 2018-01-19 20:27:36 +01:00
bjorn3 d2c53f8b4d Add missing licenses 2018-01-19 20:27:36 +01:00
bjorn3 4ef16d7466 Fix hotplug backend and add test 2018-01-19 20:27:36 +01:00
bjorn3 ace502a107 Fix review comments 2018-01-19 20:27:35 +01:00
bjorn3 2d241f66fe Cleanup hot plug codegen backend code 2018-01-19 20:27:35 +01:00
bjorn3 9315ed45c5 Hot plug rustc_trans 2018-01-19 20:27:33 +01:00
bjorn3 6dffaa9175 Hide even more of rustc_trans 2018-01-19 20:27:12 +01:00
bjorn3 bd2e808180 Fix rustc_driver test.rs 2018-01-19 20:27:12 +01:00
bjorn3 2af0f0dddf Hide more stuff from rustc_trans 2018-01-19 20:27:12 +01:00
bjorn3 af0f17386f Fix rustc_driver test.rs 2018-01-19 20:27:12 +01:00
bjorn3 74c92c5562 Allow runtime switching between trans backends 2018-01-19 20:27:10 +01:00
Arthur Silva fdf444da76 Update BTreeMap recommendation
Focus on the ordering/range benefit.
2018-01-19 15:40:58 +01:00