Commit graph

98885 commits

Author SHA1 Message Date
bors
403c0def90 Auto merge of #64329 - Mark-Simulacrum:rustdoc-log, r=GuillaumeGomez
Switch rustdoc logging to RUSTDOC_LOG

This better aligns with Cargo (CARGO_LOG) and rustc (RUSTC_LOG).

Fixes https://github.com/rust-lang/rust/issues/64309

r? @GuillaumeGomez
2019-09-10 08:31:53 +00:00
Jiewen Yao
21e062da2f Add i686-unknown-uefi target
This adds a new rustc target-configuration called 'i686-unknown_uefi'.
This is similar to existing x86_64-unknown_uefi target.

The i686-unknown-uefi target can be used to build Intel Architecture
32bit UEFI application. The ABI defined in UEFI environment (aka IA32)
is similar to cdecl.

We choose i686-unknown-uefi-gnu instead of i686-unknown-uefi to avoid
the intrinsics generated by LLVM. The detail of root-cause and solution
analysis is added as comment in the code.
For x86_64-unknown-uefi, we cannot use -gnu, because the ABI between
MSVC and GNU is totally different, and UEFI chooses ABI similar to MSVC.
For i686-unknown-uefi, the UEFI chooses cdecl ABI, which is same as
MSVC and GNU. According to LLVM code, the only differences between MSVC
and GNU are fmodf(f32), longjmp() and TLS, which have no impact to UEFI.
As such, using i686-unknown-uefi-gnu is the simplest way to pass the build.

Adding the undefined symbols, such as _aulldiv() to rust compiler-builtins
is out of scope. But it may be considered later.

The scope of this patch is limited to support target-configuration.

No standard library support is added in this patch. Such work can be
done in future enhancement.

Cc: Josh Triplett <josh.triplett@intel.com>
Reviewed-by: Josh Triplett <josh.triplett@intel.com>
2019-09-10 14:13:14 +08:00
bors
61dced1827 Auto merge of #64333 - Centril:rollup-llhhr82, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #64307 (Update clippy)
 - #64308 (Update miri submodule)
 - #64318 (update reference)
 - #64323 (Always show backtrace on Fuchsia)

Failed merges:

r? @ghost
2019-09-10 04:30:32 +00:00
Mazdak Farrokhzad
59156af1e7
Rollup merge of #64323 - cramertj:fuchsia-rust-backtrace-noop, r=alexcrichton
Always show backtrace on Fuchsia

r? @alexcrichton

cc @jakeehrlich
2019-09-10 06:29:50 +02:00
Mazdak Farrokhzad
8dc16e8722
Rollup merge of #64318 - RalfJung:reference, r=ehuss
update reference

r? @Centril
2019-09-10 06:29:49 +02:00
Mazdak Farrokhzad
c5a2e14771
Rollup merge of #64308 - oli-obk:miri, r=oli-obk
Update miri submodule

fixes #64244
2019-09-10 06:29:47 +02:00
Mazdak Farrokhzad
55f067b1b5
Rollup merge of #64307 - lzutao:clippy-up, r=oli-obk
Update clippy

Closes #64215

r? @Manishearth
cc @oli-obk
2019-09-10 06:29:46 +02:00
hman523
79263afb3e Changed instant is earlier to instant is later 2019-09-09 21:19:01 -05:00
Samuel Holland
2f6e73cb07 test/c-variadic: Fix patterns on powerpc64
On architectures such as powerpc64 that use extend_integer_width_to in
their C ABI processing, integer parameters shorter than the native
register width will be annotated with the ArgAttribute::SExt or
ArgAttribute::ZExt attribute, and that attribute will be included in the
generated LLVM IR.

In this test, all relevant parameters are `i32`, which will get the
`signext` annotation on the relevant 64-bit architectures. Match both
the annotated and non-annotated case, but enforce that the annotation is
applied consistently.
2019-09-09 21:05:52 -05:00
Mark Rousskov
6eb7b69834 Clarify E0507 to note Fn/FnMut relationship to borrowing 2019-09-09 21:34:24 -04:00
Mark Rousskov
007a58d4ce Switch rustdoc logging to RUSTDOC_LOG
This better aligns with Cargo (CARGO_LOG) and rustc (RUSTC_LOG).
2019-09-09 21:25:49 -04:00
hman523
9b1456e4c5
Update added backticks around a function call
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-09-09 20:09:17 -05:00
bors
122fefc63e Auto merge of #64321 - Centril:rollup-jsj5tpl, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #63806 (Upgrade rand to 0.7)
 - #64054 (Always emit unresolved import errors and hide unused import lint)
 - #64279 (Bump RLS and Rustfmt submodules to use rustc-ap-* v583)
 - #64317 (Update LLVM submodule)
 - #64320 (Update version of `rustc-std-workspace-*` crates)

Failed merges:

r? @ghost
2019-09-10 00:34:30 +00:00
hman523
bdfab2049c Fixed documentation within c_str::from_ptr 2019-09-09 18:50:11 -05:00
Taylor Cramer
7eb42c9838 Always show backtrace on Fuchsia 2019-09-09 16:23:03 -07:00
Mazdak Farrokhzad
342722e584
Rollup merge of #64320 - alexcrichton:update-patch, r=RalfJung
Update version of `rustc-std-workspace-*` crates

This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 22:18:14 +02:00
Mazdak Farrokhzad
7b0d1342b5
Rollup merge of #64317 - nikic:bump-llvm-3, r=alexcrichton
Update LLVM submodule

Updates the LLVM submodule to current LLVM 9 HEAD.

Fixes #63918.
Fixes #63791.

r? @alexcrichton
2019-09-09 22:18:12 +02:00
Mazdak Farrokhzad
f353d49edd
Rollup merge of #64279 - Xanewok:bump-rustc-ap, r=tmandry
Bump RLS and Rustfmt submodules to use rustc-ap-* v583

Closes #64180
Closes #64179

r? @topecongiro
2019-09-09 22:18:11 +02:00
Mazdak Farrokhzad
8926301d11
Rollup merge of #64054 - estebank:unused-import-is-to-eager, r=petrochenkov
Always emit unresolved import errors and hide unused import lint

Fix https://github.com/rust-lang/rust/issues/63724.

r? @petrochenkov
2019-09-09 22:18:10 +02:00
Mazdak Farrokhzad
611458ba06
Rollup merge of #63806 - mati865:rand, r=alexcrichton
Upgrade rand to 0.7

Also upgrades `getrandom` to avoid bug encountered by https://github.com/rust-lang/rust/pull/61393 which bumps libc to `0.2.62`.
2019-09-09 22:18:08 +02:00
Alex Crichton
6c74bc9518 Update version of rustc-std-workspace-* crates
This commit updates the version of the `rustc-std-workspace-*` crates
in-tree which are used in `[patch]`. This will guarantee that Cargo will
select these versions even if minor updates are published to crates.io
because otherwise a newer version on crates.io would be preferred which
misses the point of `[patch]`!
2019-09-09 13:02:10 -07:00
Ralf Jung
4dd60f3114 update reference 2019-09-09 20:48:57 +02:00
Nikita Popov
69d503038e Update LLVM submodule 2019-09-09 20:32:03 +02:00
bors
0b36e9dea3 Auto merge of #64313 - Centril:rollup-7w8b67g, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #63468 (Resolve attributes in several places)
 - #64121 (Override `StepBy::{try_fold, try_rfold}`)
 - #64278 (check git in bootstrap.py)
 - #64306 (Fix typo in config.toml.example)
 - #64312 (Unify escape usage)

Failed merges:

r? @ghost
2019-09-09 16:33:43 +00:00
Igor Matuszewski
c2249a4bf9 cargo update -p rustfmt-nightly 2019-09-09 18:18:21 +02:00
Igor Matuszewski
91dae2e233 Bump RLS and Rustfmt submodules 2019-09-09 18:18:03 +02:00
Eduard-Mihai Burtescu
625a9d6a4b lldb: avoid mixing "Hit breakpoint" message with other output. 2019-09-09 19:00:08 +03:00
Mazdak Farrokhzad
f7ee13040b
Rollup merge of #64312 - GuillaumeGomez:rustdoc-better-esc-handling, r=Mark-Simulacrum
Unify escape usage

Fixes #63443.

I chose to keep the search text when pressing escape so when we focus on the search bar, we got the results again without needing to load them again. I also unified a bit a few things (maybe I should have done it in another commit, sorry...).

r? @Mark-Simulacrum
2019-09-09 17:42:29 +02:00
Mazdak Farrokhzad
063740f25d
Rollup merge of #64306 - lukas-code:patch-1, r=jonas-schievink
Fix typo in config.toml.example
2019-09-09 17:42:27 +02:00
Mazdak Farrokhzad
1769a425fb
Rollup merge of #64278 - guanqun:check-git, r=Mark-Simulacrum
check git in bootstrap.py
2019-09-09 17:42:26 +02:00
Mazdak Farrokhzad
7e98ec5079
Rollup merge of #64121 - timvermeulen:iter_step_by_internal, r=scottmcm
Override `StepBy::{try_fold, try_rfold}`

Previous PR: https://github.com/rust-lang/rust/pull/51435

The previous PR was closed in favor of https://github.com/rust-lang/rust/pull/51601, which was later reverted. I don't think these implementations will make it harder to specialize `StepBy<Range<_>>` later, so we should be able to land this without any consequences.

This should fix https://github.com/rust-lang/rust/issues/57517 – in my benchmarks `iter` and `iter.step_by(1)` now perform equally well, provided internal iteration is used.
2019-09-09 17:42:24 +02:00
Mazdak Farrokhzad
457a23fabe
Rollup merge of #63468 - c410-f3r:attrs, r=petrochenkov
Resolve attributes in several places

Resolve attributes for Arm, Field, FieldPat, GenericParam, Param, StructField and Variant.

This PR is based on @petrochenkov work located at 83fdb8d598.
2019-09-09 17:42:23 +02:00
Alex Crichton
34662c6961 std: Add a backtrace module
This commit adds a `backtrace` module to the standard library, as
designed in [RFC 2504]. The `Backtrace` type is intentionally very
conservative, effectively only allowing capturing it and printing it.

Additionally this commit also adds a `backtrace` method to the `Error`
trait which defaults to returning `None`, as specified in [RFC 2504].
More information about the design here can be found in [RFC 2504] and in
the [tracking issue].

Implementation-wise this is all based on the `backtrace` crate and very
closely mirrors the `backtrace::Backtrace` type on crates.io. Otherwise
it's pretty standard in how it handles everything internally.

[RFC 2504]: https://github.com/rust-lang/rfcs/blob/master/text/2504-fix-error.md
[tracking issue]: https://github.com/rust-lang/rust/issues/53487

cc #53487
2019-09-09 08:20:34 -07:00
Mazdak Farrokhzad
20a26055b7 pacify tidy. 2019-09-09 17:05:41 +02:00
Guillaume Gomez
0d34fe42f7 Unify escape usage 2019-09-09 17:04:28 +02:00
Mazdak Farrokhzad
eeca6ee9c2 check_match: use pluralisee! 2019-09-09 16:52:58 +02:00
Mazdak Farrokhzad
7d4665b097 check_match: unify check_irrefutable & check_exhaustive more. 2019-09-09 16:44:23 +02:00
Mazdak Farrokhzad
b36a206a30 joined_uncovered_patterns: use slice pats & eta-reduce. 2019-09-09 16:44:23 +02:00
Mazdak Farrokhzad
5435b38456 check_match: extract joined_uncovered_patterns. 2019-09-09 16:44:23 +02:00
Mazdak Farrokhzad
e2640a51ee typeck: use .peel_refs() more. 2019-09-09 16:44:23 +02:00
Mazdak Farrokhzad
50a0ec91e0 check_match: refactor + improve non-exhaustive diag for default binding modes. 2019-09-09 16:44:23 +02:00
Guanqun Lu
b117bd7366 check git in bootstrap.py when trying to update submodule 2019-09-09 22:28:57 +08:00
Oliver Scherer
3d7040bdef Update miri submodule 2019-09-09 14:56:08 +02:00
Lzu Tao
851a5fd997 Update clippy 2019-09-09 12:50:29 +00:00
bors
45859b7ca7 Auto merge of #63118 - Centril:stabilize-bind-by-move, r=matthewjasper
Stabilize `bind_by_move_pattern_guards` in Rust 1.39.0

Closes https://github.com/rust-lang/rust/issues/15287.

After stabilizing `#![feature(bind_by_move_pattern_guards)]`, you can now use bind-by-move bindings in patterns and take references to those bindings in `if` guards of `match` expressions. For example, the following now becomes legal:

```rust
fn main() {
    let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);

    match array {
        nums
//      ---- `nums` is bound by move.
            if nums.iter().sum::<u8>() == 10
//                 ^------ `.iter()` implicitly takes a reference to `nums`.
        => {
            drop(nums);
//          --------- Legal as `nums` was bound by move and so we have ownership.
        }
        _ => unreachable!(),
    }
}
```

r? @matthewjasper
2019-09-09 12:46:59 +00:00
Caio
63a5f399ae Resolve attributes in several places
Arm, Field, FieldPat, GenericParam, Param, StructField and Variant
2019-09-09 09:27:15 -03:00
Lukas
4c62950d4f
Fix typo in config.toml.example 2019-09-09 12:18:07 +00:00
bors
824383d4ab Auto merge of #64237 - estebank:tweak-method-not-found, r=Centril
Give method not found a primary span label
2019-09-09 08:39:59 +00:00
bors
1e869133b9 Auto merge of #64195 - mark-i-m:update-rustc-guide-1, r=ehuss
Update rustc-guide

r? @ehuss
2019-09-09 04:44:18 +00:00
Esteban Küber
5799fb419c Give method not found a primary span label 2019-09-08 18:27:02 -07:00