-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 17 pull requests #55803
Merged
Merged
Rollup of 17 pull requests #55803
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The new levels s and z are not mentioned as possible values.
This commit deletes the injection of `-(` and `-)` options to the linker for the musl targets. This actually causes problems today on nightly if you execute: $ echo 'fn main() {}' >> foo.rs $ rustc --target x86_64-unknown-linux-musl -C panic=abort you get a linker error about "cannot nest groups". This comes about because rustc injects its own `--start-group` and `--end-group` variables which clash with the outer `-(` and `-)` variables. It's not entirely clear to me why this doesn't affect the musl target by default (in `-C panic=unwind` mode). The compiler's own injection of `--start-group` and `--end-group` should solve the issues mentioned in the comment for injecting `-(` and `-)` as well.
If LLVM 7 is used, generate memcpy/memmove with differing src/dst alignment. I've added new FFI functions to construct these through the builder API, which is more convenient than dealing with differing intrinsic signatures depending on the LLVM version.
As a drive-by, added `-g` to the compile-flags so that the test more reliably fails to compile when the extern static in question is *not* provided. (I.e. this is making the test more robust in the face of potential future revisions.) Fix rust-lang#54388.
This makes it easier to debug mis-optimizations that occur during inlining. Thanks to @nikomatsakis for the suggestion!
This commit filters out locals that have never been initialized for consideration in the `unused_mut` lint. This is intended to detect when the statement that would have initialized the local was removed as unreachable code. In these cases, we would not want to lint. This is the same behaviour as the AST borrow checker. This is achieved by taking advantage of an existing pass over the MIR for the `unused_mut` lint and creating a set of those locals that were never initialized.
This is a (much) more constrained version of rust-lang#54772 that also aims at improving the situation in rust-lang#34681. It removes any font specifications that are not the "official" rustdoc font, and instead relies on the browser to provide the fallback font if the official on is not available. On Linux systems, this is particularly important, as fonts like Helvetica, Arial, and Times often look pretty bad since they're pulled from extracted MS fonts. A specification like `serif` or `sans-serif` lets the browser instead choose a good font.
The `wasm32-unknown-emscripten` expects the `rust_eh_personality` symbol to be there, but a cfg checking for `target_arch = "wasm32"` which was meant to remove the symbol from the `wasm32-unknown-unknown` target, didn't check for whether `emscripten` is targeted or not, so the symbol accidentally got filtered out there as well. Fixes rust-lang#55276
Because it results in fewer allocations and small speedups on some benchmarks.
Currently Cargo will always capture the output of rustc meaning that rustc is never hooked up to a tty. To retain colors Cargo uses the `fwdansi` crate to ensure that ansi color codes are translated to windows terminal methods (and ansi codes otherwise just go their natural route on Unix). Cargo passes `--color always` to rustc to ensure that using a pipe doesn't trick it into not emitting colors at all. It turns out, however, that `--color always` ends up still accidentally using the native shell api on native windows shells. The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of `Always`, ensuring that when `--color always` is passed to rustc and its output isn't a terminal, we're always generating ansi colors regardless of the platform. Closes rust-lang#55769
…ramertj Clarify error message for -C opt-level The new levels s and z are not mentioned as possible values.
Support memcpy/memmove with differing src/dst alignment If LLVM 7 is used, generate memcpy/memmove with differing src/dst alignment. I've added new FFI functions to construct these through the builder API, which is more convenient than dealing with differing intrinsic signatures depending on the LLVM version. Fixes rust-lang#49740.
…g_span_from_free_region, r=estebank Fix ICE in msg_span_from_free_region on ReEmpty On an example like this: ```rust #![feature(conservative_impl_trait)] fn server() -> impl FilterBase2 { segment2(|| { loop { } }).map2(|| "") } trait FilterBase2 { fn map2<F>(self, _fn: F) -> Map2<F> where Self: Sized { loop { } } } struct Map2<F> { _func: F } impl<F> FilterBase2 for Map2<F> { } fn segment2<F>(_fn: F) -> Map2<F> where F: Fn() -> Result<(), ()> { loop { } } ``` we now, instead of ICE'ing, get a diagnostic like: ``` error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds --> issue-55608.rs:3:16 | 3 | fn server() -> impl FilterBase2 { | ^^^^^^^^^^^^^^^^ | = note: hidden type `Map2<[closure@issue-55608.rs:4:36: 4:41]>` captures an empty lifetime ``` Fix rust-lang#55608
…elwoerister rustc: Delete grouping logic from the musl target This commit deletes the injection of `-(` and `-)` options to the linker for the musl targets. This actually causes problems today on nightly if you execute: $ echo 'fn main() {}' >> foo.rs $ rustc --target x86_64-unknown-linux-musl -C panic=abort you get a linker error about "cannot nest groups". This comes about because rustc injects its own `--start-group` and `--end-group` variables which clash with the outer `-(` and `-)` variables. It's not entirely clear to me why this doesn't affect the musl target by default (in `-C panic=unwind` mode). The compiler's own injection of `--start-group` and `--end-group` should solve the issues mentioned in the comment for injecting `-(` and `-)` as well.
…error-from-rustfixed-code, r=alexcrichton Sidestep link error from rustfix'ed code by using a *defined* static. As a drive-by, added `-g` to the compile-flags so that the test more reliably fails to compile when the extern static in question is *not* provided. (I.e. this is making the test more robust in the face of potential future revisions.) Fix rust-lang#54388.
Elide anon lifetimes in conflicting impl note Fix rust-lang#54690.
…matsakis Consume optimization fuel from the MIR inliner This makes it easier to debug mis-optimizations that occur during inlining. Thanks to @nikomatsakis for the suggestion!
Avoid panic when matching function call Fix rust-lang#55718 This bug is introduced by rust-lang#53751. The original code checked `Def::AssociatedConst(..) | Def::Method(..)` before `pat_ty.no_bound_vars().expect("expected fn type")`. But somehow I exchanged the sequence carelessly. Sorry about that. r? @petrochenkov
…li-obk borrow_set: remove a helper function and a clone it uses This clone doesn't seem necessary. r? @oli-obk
Improve creation of 3 IndexVecs - preallocate when the minimal size is known - use `from_elem_n` instead of `new`+`resize`
[regression - rust2018]: unused_mut lint false positives on nightly Fixes rust-lang#55344. This commit filters out locals that have never been initialized for consideration in the `unused_mut` lint. This is intended to detect when the statement that would have initialized the local was removed as unreachable code. In these cases, we would not want to lint. This is the same behaviour as the AST borrow checker. This is achieved by taking advantage of an existing pass over the MIR for the `unused_mut` lint and creating a set of those locals that were never initialized. r? @pnkfelix
…llaumeGomez Remove intermediate font specs This is a (much) more constrained version of rust-lang#54772 that also aims at improving the situation in rust-lang#34681. It removes any font specifications that are not the "official" rustdoc font, and instead relies on the browser to provide the fallback font if the official on is not available. On Linux systems, this is particularly important, as fonts like Helvetica, Arial, and Times often look pretty bad since they're pulled from extracted MS fonts. A specification like `serif` or `sans-serif` lets the browser instead choose a good font.
…r=estebank mir: remove a hacky recursive helper function It can be replaced with a `while let` loop.
wasm32-unknown-emscripten expects the rust_eh_personality symbol The `wasm32-unknown-emscripten` expects the `rust_eh_personality` symbol to be there, but a cfg checking for `target_arch = "wasm32"` which was meant to remove the symbol from the `wasm32-unknown-unknown` target, didn't check for whether `emscripten` is targeted or not, so the symbol accidentally got filtered out there as well. Fixes rust-lang#55276
…henkov Use `Lit` rather than `P<Lit>` in `ast::ExprKind`. Because it results in fewer allocations and small speedups on some benchmarks.
…apin Deprecate mpsc channel selection Rationale: rust-lang#27800 (comment) r? @SimonSapin
rustc: Request ansi colors if stderr isn't a tty Currently Cargo will always capture the output of rustc meaning that rustc is never hooked up to a tty. To retain colors Cargo uses the `fwdansi` crate to ensure that ansi color codes are translated to windows terminal methods (and ansi codes otherwise just go their natural route on Unix). Cargo passes `--color always` to rustc to ensure that using a pipe doesn't trick it into not emitting colors at all. It turns out, however, that `--color always` ends up still accidentally using the native shell api on native windows shells. The fix here is to instead pass `AlwaysAnsi` to `termcolor` instead of `Always`, ensuring that when `--color always` is passed to rustc and its output isn't a terminal, we're always generating ansi colors regardless of the platform. Closes rust-lang#55769
@bors r+ p=10 |
📌 Commit d293d1e has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Nov 9, 2018
bors
added a commit
that referenced
this pull request
Nov 9, 2018
Rollup of 17 pull requests Successful merges: - #55576 (Clarify error message for -C opt-level) - #55633 (Support memcpy/memmove with differing src/dst alignment) - #55638 (Fix ICE in msg_span_from_free_region on ReEmpty) - #55659 (rustc: Delete grouping logic from the musl target) - #55719 (Sidestep link error from rustfix'ed code by using a *defined* static.) - #55736 (Elide anon lifetimes in conflicting impl note) - #55739 (Consume optimization fuel from the MIR inliner) - #55742 (Avoid panic when matching function call) - #55753 (borrow_set: remove a helper function and a clone it uses) - #55755 (Improve creation of 3 IndexVecs) - #55758 ([regression - rust2018]: unused_mut lint false positives on nightly) - #55760 (Remove intermediate font specs) - #55761 (mir: remove a hacky recursive helper function) - #55774 (wasm32-unknown-emscripten expects the rust_eh_personality symbol) - #55777 (Use `Lit` rather than `P<Lit>` in `ast::ExprKind`.) - #55783 (Deprecate mpsc channel selection) - #55788 (rustc: Request ansi colors if stderr isn't a tty) Failed merges: r? @ghost
☀️ Test successful - status-appveyor, status-travis |
This was referenced Nov 9, 2018
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
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
Lit
rather thanP<Lit>
inast::ExprKind
. #55777 (UseLit
rather thanP<Lit>
inast::ExprKind
.)Failed merges:
r? @ghost