]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoclarify what the item is in "not a module" error
Andy Russell [Mon, 1 Apr 2019 20:22:12 +0000 (16:22 -0400)]
clarify what the item is in "not a module" error

5 years agoAuto merge of #59724 - oli-obk:const_arg_ice, r=eddyb
bors [Mon, 8 Apr 2019 01:18:12 +0000 (01:18 +0000)]
Auto merge of #59724 - oli-obk:const_arg_ice, r=eddyb

Function arguments should never get promoted

fixes https://github.com/rust-lang/rust/issues/59469

5 years agoOnly run SIMD tests on x86
Oliver Scherer [Sun, 7 Apr 2019 19:46:39 +0000 (21:46 +0200)]
Only run SIMD tests on x86

5 years agoAuto merge of #59765 - lzutao:patch-1, r=Centril
bors [Sun, 7 Apr 2019 18:06:01 +0000 (18:06 +0000)]
Auto merge of #59765 - lzutao:patch-1, r=Centril

Add reference to cfg attr

r? @QuietMisdreavus

5 years agoAuto merge of #59766 - xales:revertlibtest, r=Manishearth
bors [Sun, 7 Apr 2019 15:23:49 +0000 (15:23 +0000)]
Auto merge of #59766 - xales:revertlibtest, r=Manishearth

Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"

This reverts commit 3eb4890dfe6db0279fdd3cda19f9643873ae3db9, reversing
changes made to 7a4df3b53da369110984a2b57419c05a53e33b38.

This is, as best I can tell, a clean revert of #57842. It retains some interim changes, like moving `black_box`, and otherwise brings libtest back in as it was before removal.

5 years agoAuto merge of #59770 - pietroalbini:pin-android-emulator, r=kennytm
bors [Sun, 7 Apr 2019 12:33:01 +0000 (12:33 +0000)]
Auto merge of #59770 - pietroalbini:pin-android-emulator, r=kennytm

ci: pin android emulator to 28.0.23

Apparently Android Emulator 28.0.25 (the latest one) is broken for us, and `sdkmanager` doesn't have a way to pin a package to a specific version. This PR stops downloading the emulator from `sdkmanager`, downloading it manually instead.

Tested this locally and confirmed it works. I'll open an issue on Google's issue tracker later today.

Fixes https://github.com/rust-lang/rust/issues/59757
r? @kennytm

5 years agoci: pin android emulator to 28.0.23
Pietro Albini [Sun, 7 Apr 2019 11:52:33 +0000 (13:52 +0200)]
ci: pin android emulator to 28.0.23

5 years agoAuto merge of #59119 - cramertj:cx-back, r=withoutboats
bors [Sun, 7 Apr 2019 09:48:12 +0000 (09:48 +0000)]
Auto merge of #59119 - cramertj:cx-back, r=withoutboats

Future-proof the Futures API

cc https://github.com/rust-lang/rust/issues/59113, @carllerche, @rust-lang/libs

r? @withoutboats

5 years agoRevert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"
Jacob Greenfield [Sun, 7 Apr 2019 05:48:59 +0000 (01:48 -0400)]
Revert "Auto merge of #57842 - gnzlbg:extract_libtest, r=gnzlbg"

This reverts commit 3eb4890dfe6db0279fdd3cda19f9643873ae3db9, reversing
changes made to 7a4df3b53da369110984a2b57419c05a53e33b38.

5 years agoUpdate comment
Oliver Scherer [Fri, 5 Apr 2019 15:00:21 +0000 (17:00 +0200)]
Update comment

5 years agoAdd more regression tests for accidental promotion
Oliver Scherer [Fri, 5 Apr 2019 11:56:52 +0000 (13:56 +0200)]
Add more regression tests for accidental promotion

5 years agoFunction arguments should never get promoted
Oliver Scherer [Fri, 5 Apr 2019 11:53:43 +0000 (13:53 +0200)]
Function arguments should never get promoted

5 years agoAdd reference to cfg attr
lzutao [Sun, 7 Apr 2019 04:48:14 +0000 (11:48 +0700)]
Add reference to cfg attr

5 years agoAuto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelix
bors [Sun, 7 Apr 2019 00:57:13 +0000 (00:57 +0000)]
Auto merge of #58739 - matthewjasper:more-restrictive-tpb, r=pnkfelix

More restrictive 2 phase borrows - take 2

Signal lint diagnostic `mutable_borrow_reservation_conflict` when borrow-check finds a 2-phase borrow's reservation overlapping with a shared borrow.

(pnkfelix updated description)

cc #56254 , #59159

blocks PR #59114

r? @pnkfelix

cc @RalfJung @nikomatsakis

5 years agoAuto merge of #59760 - Centril:rollup-4b9x7ue, r=Centril
bors [Sat, 6 Apr 2019 21:34:12 +0000 (21:34 +0000)]
Auto merge of #59760 - Centril:rollup-4b9x7ue, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #59738 (Move match_path from DefId to lint::LateContext)
 - #59740 (Use for_each to extend collections)
 - #59751 (Tiny docs fix)
 - #59754 (Update books)
 - #59755 (Update miri)

Failed merges:

r? @ghost

5 years agoRollup merge of #59755 - matthewjasper:update-miri, r=RalfJung
Mazdak Farrokhzad [Sat, 6 Apr 2019 20:52:49 +0000 (22:52 +0200)]
Rollup merge of #59755 - matthewjasper:update-miri, r=RalfJung

Update miri

r? @RalfJung

5 years agoRollup merge of #59754 - ehuss:update-books, r=frewsxcv
Mazdak Farrokhzad [Sat, 6 Apr 2019 20:52:48 +0000 (22:52 +0200)]
Rollup merge of #59754 - ehuss:update-books, r=frewsxcv

Update books

## nomicon

1 commits in f1ff93b66844493a7b03101c7df66ac958c62418..c02e0e7754a76886e55b976a3a4fac20100cd35d
2019-02-26 13:37:28 -0500 to 2019-03-25 16:52:56 -0400
- dropck: The drop order is now defined (rust-lang-nursery/nomicon#113)

## reference

3 commits in 27ad493a10364e907ec476e2ad61e8a1614b57e1..98f90ff4de8e588f651f0fb493b5c7496551cd59
2019-03-26 02:06:15 +0100 to 2019-04-06 09:29:08 -0700
- Document repr packed(N). (rust-lang-nursery/reference#553)
- Fix broken link in glossary. (rust-lang-nursery/reference#558)
- Typo fixes (rust-lang-nursery/reference#556)

## embedded-book

2 commits in 07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a..7989c723607ef5b13b57208022259e6c771e11d0
2019-03-27 15:40:52 +0000 to 2019-04-04 12:14:37 +0000
- fix rust-embedded/book#182  (rust-embedded/book#183)
- Add openocd to list of installable packages  (rust-embedded/book#179)

5 years agoRollup merge of #59751 - tbu-:pr_doc_fix_format, r=Centril
Mazdak Farrokhzad [Sat, 6 Apr 2019 20:52:47 +0000 (22:52 +0200)]
Rollup merge of #59751 - tbu-:pr_doc_fix_format, r=Centril

Tiny docs fix

5 years agoRollup merge of #59740 - cuviper:folded-extend, r=scottmcm
Mazdak Farrokhzad [Sat, 6 Apr 2019 20:52:46 +0000 (22:52 +0200)]
Rollup merge of #59740 - cuviper:folded-extend, r=scottmcm

Use for_each to extend collections

This updates the `Extend` implementations to use `for_each` for many
collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`,
`TokenStream`, `VecDeque`, and `Wtf8Buf`.

Folding with `for_each` enables better performance than a `for`-loop for
some iterators, especially if they can just forward to internal
iterators, like `Chain` and `FlatMap` do.

5 years agoRollup merge of #59738 - flip1995:match_path_move, r=eddyb,Manishearth
Mazdak Farrokhzad [Sat, 6 Apr 2019 20:52:45 +0000 (22:52 +0200)]
Rollup merge of #59738 - flip1995:match_path_move, r=eddyb,Manishearth

Move match_path from DefId to lint::LateContext

cc https://github.com/rust-lang/rust/pull/59316#discussion_r272351353

r? @eddyb

5 years agoUpdate miri
Matthew Jasper [Sat, 6 Apr 2019 17:34:06 +0000 (18:34 +0100)]
Update miri

5 years agoUpdate books
Eric Huss [Sat, 6 Apr 2019 17:06:51 +0000 (10:06 -0700)]
Update books

5 years agoTiny docs fix
Tobias Bucher [Sat, 6 Apr 2019 15:27:00 +0000 (17:27 +0200)]
Tiny docs fix

5 years agoAuto merge of #59710 - alexcrichton:llvm-9-compat, r=sanxiyn
bors [Sat, 6 Apr 2019 13:14:23 +0000 (13:14 +0000)]
Auto merge of #59710 - alexcrichton:llvm-9-compat, r=sanxiyn

rustc: Start implementing compat with LLVM 9

This commit doesn't actually migrate to LLVM 9, but it brings our own
C++ bindings in line with LLVM 9 and able to compile against tip of
tree. The changes made were:

* The `MainSubprogram` flag for debuginfo moved between flag types.
* Iteration of archive members was tweaked slightly and we have to
  construct the two iterators before constructing the returned
  `RustArchiveIterator` value.
* The `getOrInsertFunction` binding now returns a wrapper which we use
  `getCallee()` on to get the value we're interested in.

5 years agoAuto merge of #59745 - cwhakes:master, r=sanxiyn
bors [Sat, 6 Apr 2019 10:03:38 +0000 (10:03 +0000)]
Auto merge of #59745 - cwhakes:master, r=sanxiyn

Change `copytest` parameter name from `y` to `sign`

This should help clarify ambiguity with whether `a.copysign(b)` applies the sign of `a` to `b` or `b` to `a`.

r? @Centril

5 years agoAuto merge of #59744 - cuviper:output-errors, r=sanxiyn
bors [Sat, 6 Apr 2019 07:21:41 +0000 (07:21 +0000)]
Auto merge of #59744 - cuviper:output-errors, r=sanxiyn

Show better errors for LLVM IR output

I was trying to output LLVM IR directly to the console:

    $ rustc hello.rs --emit=llvm-ir -o /dev/stdout
    LLVM ERROR: IO failure on output stream: Bad file descriptor

Now `LLVMRustPrintModule` returns an error, and we print:

    error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied

... which is more informative.

5 years agoAuto merge of #59723 - Zoxc:rem-noforce, r=michaelwoerister
bors [Sat, 6 Apr 2019 04:14:13 +0000 (04:14 +0000)]
Auto merge of #59723 - Zoxc:rem-noforce, r=michaelwoerister

Remove no_force from coherent_trait

r? @michaelwoerister

5 years agoChange `copytest` parameter name from `y` to `sign`
Will Hakes [Sat, 6 Apr 2019 02:30:45 +0000 (20:30 -0600)]
Change `copytest` parameter name from `y` to `sign`

5 years agoShow better errors for LLVM IR output
Josh Stone [Sat, 6 Apr 2019 00:48:23 +0000 (17:48 -0700)]
Show better errors for LLVM IR output

I was trying to output LLVM IR directly to the console:

    $ rustc hello.rs --emit=llvm-ir -o /dev/stdout
    LLVM ERROR: IO failure on output stream: Bad file descriptor

Now `LLVMRustPrintModule` returns an error, and we print:

    error: failed to write LLVM IR to /dev/stdout.hello.7rcbfp3g-cgu.0.rcgu.ll: Permission denied

... which is more informative.

5 years agoAuto merge of #59741 - Centril:rollup-3us4b8q, r=Centril
bors [Fri, 5 Apr 2019 22:56:15 +0000 (22:56 +0000)]
Auto merge of #59741 - Centril:rollup-3us4b8q, r=Centril

Rollup of 6 pull requests

Successful merges:

 - #58894 (Fix invalid bounds string generation in rustdoc)
 - #59599 (Updated RELEASES.md for 1.34.0)
 - #59624 (SGX target: Use linker option to avoid code CGU assignment kludge)
 - #59696 (Remove invalid assertion back::link::from add_upstream_rust_crates().)
 - #59707 (Add missing tryfrom example)
 - #59727 (wasi: Use shared API for preopened fds)

Failed merges:

r? @ghost

5 years agoRollup merge of #59727 - alexcrichton:wasi-apis, r=fitzgen
Mazdak Farrokhzad [Fri, 5 Apr 2019 22:14:47 +0000 (00:14 +0200)]
Rollup merge of #59727 - alexcrichton:wasi-apis, r=fitzgen

wasi: Use shared API for preopened fds

This commit updates the wasi target with supported added in
CraneStation/wasi-sysroot#10. That function allows both C and Rust to
cooperate in how preopened files are managed, enabling us to learn about
propened files through the same interface. The `open_parent` function in
the wasi `fs` module was updated to avoid its own initialization of a
global preopened map and instead delegate to libc to perform this
functionality.

This should both be more robust into the future in terms of handling
path logic as well as ensuring the propened map is correctly set up at
process boot time. This does currently require some unfortunate
allocations on our side, but if that becomes an issue we can always
paper over those in time!

5 years agoRollup merge of #59707 - GuillaumeGomez:GuillaumeGomez-patch-1, r=Centril
Mazdak Farrokhzad [Fri, 5 Apr 2019 22:14:46 +0000 (00:14 +0200)]
Rollup merge of #59707 - GuillaumeGomez:GuillaumeGomez-patch-1, r=Centril

Add missing tryfrom example

r? @rust-lang/docs

5 years agoRollup merge of #59696 - michaelwoerister:fix-issue-59137, r=alexcrichton
Mazdak Farrokhzad [Fri, 5 Apr 2019 22:14:44 +0000 (00:14 +0200)]
Rollup merge of #59696 - michaelwoerister:fix-issue-59137, r=alexcrichton

Remove invalid assertion back::link::from add_upstream_rust_crates().

This removes a misplaced assertion. The function containing the assertion is actually only ever called for upstream crates that are not considered for LTO, so we don't care whether upstream code has been merged in by LTO or not.

Fixes #59137

r? @alexcrichton

5 years agoRollup merge of #59624 - jethrogb:jb/sgx-unwind-syms, r=alexcrichton
Mazdak Farrokhzad [Fri, 5 Apr 2019 22:14:43 +0000 (00:14 +0200)]
Rollup merge of #59624 - jethrogb:jb/sgx-unwind-syms, r=alexcrichton

SGX target: Use linker option to avoid code CGU assignment kludge

cc @VardhanThigle @faern

5 years agoRollup merge of #59599 - XAMPPRocky:master, r=Mark-Simulacrum
Mazdak Farrokhzad [Fri, 5 Apr 2019 22:14:41 +0000 (00:14 +0200)]
Rollup merge of #59599 - XAMPPRocky:master, r=Mark-Simulacrum

Updated RELEASES.md for 1.34.0

[Rendered](https://github.com/XAMPPRocky/rust/blob/master/RELEASES.md)

This also corrects an omission in the previous 1.33.0 release.

r? @Mark-Simulacrum

cc @rust-lang/release

5 years agoRollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebank
Mazdak Farrokhzad [Fri, 5 Apr 2019 22:14:40 +0000 (00:14 +0200)]
Rollup merge of #58894 - GuillaumeGomez:invalid-lifetime-bounds, r=estebank

Fix invalid bounds string generation in rustdoc

Fixes #58737.

Very weird and I'm not sure this is the best fix around. However, trying to fix it beforehand seems overly complicated compared to the gain (in `clean`, it wouldn't change anything since we **have to** return something so that wouldn't work, and in `hir`, I'm afraid I'd break something else for very little gain).

Also, I wasn't able to make a small code to reproduce the issue. The only way to test is to document `crossbeam` directly and check the `Scope` struct...

r? @QuietMisdreavus

5 years agoFuture-proof the Futures API
Taylor Cramer [Mon, 11 Mar 2019 23:56:00 +0000 (16:56 -0700)]
Future-proof the Futures API

5 years agoUse for_each to extend collections
Josh Stone [Fri, 5 Apr 2019 21:51:07 +0000 (14:51 -0700)]
Use for_each to extend collections

This updates the `Extend` implementations to use `for_each` for many
collections: `BinaryHeap`, `BTreeMap`, `BTreeSet`, `LinkedList`, `Path`,
`TokenStream`, `VecDeque`, and `Wtf8Buf`.

Folding with `for_each` enables better performance than a `for`-loop for
some iterators, especially if they can just forward to internal
iterators, like `Chain` and `FlatMap` do.

5 years agoMove match_path from DefId to lint::LateContext
flip1995 [Fri, 5 Apr 2019 21:04:56 +0000 (23:04 +0200)]
Move match_path from DefId to lint::LateContext

5 years agoAuto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertj
bors [Fri, 5 Apr 2019 17:45:43 +0000 (17:45 +0000)]
Auto merge of #59500 - crlf0710:boxed-closure-impls, r=cramertj

Unsized rvalues: implement boxed closure impls. (2nd try)

This is a rebase of S-blocked-closed PR #55431 to current master. LLVM has moved forward since then, so maybe we can check whether the new LLVM 8.0 version unblocked this work.

5 years agoUpdate RELEASES.md
Mazdak Farrokhzad [Fri, 5 Apr 2019 17:38:24 +0000 (19:38 +0200)]
Update RELEASES.md

Co-Authored-By: XAMPPRocky <4464295+XAMPPRocky@users.noreply.github.com>
5 years agowasi: Use shared API for preopened fds
Alex Crichton [Fri, 5 Apr 2019 13:37:03 +0000 (06:37 -0700)]
wasi: Use shared API for preopened fds

This commit updates the wasi target with supported added in
CraneStation/wasi-sysroot#10. That function allows both C and Rust to
cooperate in how preopened files are managed, enabling us to learn about
propened files through the same interface. The `open_parent` function in
the wasi `fs` module was updated to avoid its own initialization of a
global preopened map and instead delegate to libc to perform this
functionality.

This should both be more robust into the future in terms of handling
path logic as well as ensuring the propened map is correctly set up at
process boot time. This does currently require some unfortunate
allocations on our side, but if that becomes an issue we can always
paper over those in time!

5 years agoAdd missing tryfrom example
Guillaume Gomez [Fri, 29 Mar 2019 22:22:11 +0000 (23:22 +0100)]
Add missing tryfrom example

5 years agorustc: Start implementing compat with LLVM 9
Alex Crichton [Thu, 4 Apr 2019 20:05:41 +0000 (13:05 -0700)]
rustc: Start implementing compat with LLVM 9

This commit doesn't actually migrate to LLVM 9, but it brings our own
C++ bindings in line with LLVM 9 and able to compile against tip of
tree. The changes made were:

* The `MainSubprogram` flag for debuginfo moved between flag types.
* Iteration of archive members was tweaked slightly and we have to
  construct the two iterators before constructing the returned
  `RustArchiveIterator` value.
* The `getOrInsertFunction` binding now returns a wrapper which we use
  `getCallee()` on to get the value we're interested in.

5 years agoAuto merge of #59076 - dtolnay:comma, r=alexcrichton
bors [Fri, 5 Apr 2019 15:01:07 +0000 (15:01 +0000)]
Auto merge of #59076 - dtolnay:comma, r=alexcrichton

Include trailing comma in multiline Debug representation

This PR changes the behavior of [`Formatter::debug_struct`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_struct), [`debug_tuple`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_tuple), [`debug_list`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_list), [`debug_set`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_set), and [`debug_map`](https://doc.rust-lang.org/std/fmt/struct.Formatter.html#method.debug_map) to render trailing commas in `{:#?}` mode, which is the dominant style in modern Rust code.

#### Before:

```console
Language {
    name: "Rust",
    trailing_commas: false
}
```

#### After:

```console
Language {
    name: "Rust",
    trailing_commas: true,
}
```

5 years agoInclude trailing comma in multiline Debug representation
David Tolnay [Wed, 3 Apr 2019 14:30:08 +0000 (07:30 -0700)]
Include trailing comma in multiline Debug representation

This commit changes the behavior of Formatter::debug_struct,
debug_tuple, debug_list, debug_set, and debug_map to render trailing
commas in {:#?} mode, which is the dominant style in modern Rust code.

Before:

    Language {
        name: "Rust",
        trailing_commas: false
    }

After:

    Language {
        name: "Rust",
        trailing_commas: true,
    }

5 years agoAuto merge of #59721 - Centril:rollup-ieam9ke, r=Centril
bors [Fri, 5 Apr 2019 12:13:52 +0000 (12:13 +0000)]
Auto merge of #59721 - Centril:rollup-ieam9ke, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #59665 (improve worst-case performance of HashSet.is_subset)
 - #59687 (cleanup shebang handling in the lexer)
 - #59690 (Mark unix::ffi::OsStrExt methods as inline)
 - #59702 (Use declare_lint_pass! and impl_lint_pass! in more places)
 - #59712 (wasm32: Default to a "static" relocation model)

Failed merges:

r? @ghost

5 years agoRemove no_force from coherent_trait
John KÃ¥re Alsaker [Fri, 5 Apr 2019 11:25:24 +0000 (13:25 +0200)]
Remove no_force from coherent_trait

5 years agoRollup merge of #59712 - alexcrichton:wasm-static-not-pic, r=eddyb
Mazdak Farrokhzad [Fri, 5 Apr 2019 10:46:53 +0000 (12:46 +0200)]
Rollup merge of #59712 - alexcrichton:wasm-static-not-pic, r=eddyb

wasm32: Default to a "static" relocation model

LLVM 9 is adding support for a "pic" relocation model for wasm code,
which is quite different than the current model. In order to preserve
the mode of compilation that we have today default to "static" to ensure
that we don't accidentally start creating experimental relocatable
binaries.

5 years agoRollup merge of #59702 - hgallagher1993:origin, r=Centril
Mazdak Farrokhzad [Fri, 5 Apr 2019 10:46:52 +0000 (12:46 +0200)]
Rollup merge of #59702 - hgallagher1993:origin, r=Centril

Use declare_lint_pass! and impl_lint_pass! in more places

Fixes #59683

5 years agoRollup merge of #59690 - xfix:patch-17, r=cramertj
Mazdak Farrokhzad [Fri, 5 Apr 2019 10:46:51 +0000 (12:46 +0200)]
Rollup merge of #59690 - xfix:patch-17, r=cramertj

Mark unix::ffi::OsStrExt methods as inline

This is a small change, but I found it surprising it's not inlined looking at the assembly.

5 years agoRollup merge of #59687 - matklad:shebang, r=petrochenkov
Mazdak Farrokhzad [Fri, 5 Apr 2019 10:46:49 +0000 (12:46 +0200)]
Rollup merge of #59687 - matklad:shebang, r=petrochenkov

cleanup shebang handling in the lexer

5 years agoRollup merge of #59665 - ssomers:hashset_revisited, r=KodrAus
Mazdak Farrokhzad [Fri, 5 Apr 2019 10:46:48 +0000 (12:46 +0200)]
Rollup merge of #59665 - ssomers:hashset_revisited, r=KodrAus

improve worst-case performance of HashSet.is_subset

One more simple optimization opportunity for HashSet that was applied in BTreeSet in #59186 (and wasn't in #57043). Already covered by the existing unit test.

r? @KodrAus

5 years agoAdd regression test for #59137.
Michael Woerister [Fri, 5 Apr 2019 09:32:45 +0000 (11:32 +0200)]
Add regression test for #59137.

5 years agoAuto merge of #59681 - dtolnay:cargo, r=alexcrichton
bors [Fri, 5 Apr 2019 09:30:13 +0000 (09:30 +0000)]
Auto merge of #59681 - dtolnay:cargo, r=alexcrichton

Update cargo

20 commits in
63231f438a2b5b84ccf319a5de22343ee0316323..6f3e9c367abb497c64f360c3839dab5e74928d5c
2019-03-27 12:26:45 +0000 to 2019-04-04 14:11:33 +0000
- Fix Init for Fossil SCM project (rust-lang/cargo#6792)
- Fix member_manifest_version_error accessing the network (rust-lang/cargo#6799)
- Don't include email if it is empty (rust-lang/cargo#6802)
- Fix unused import warning (rust-lang/cargo#6807)
- Add some help and documentation for unstable flags (rust-lang/cargo#6791)
- Allow `cargo doc --open` with multiple packages (rust-lang/cargo#6803)
- Allow `cargo install --path P` to load config from P (rust-lang/cargo#6804)
- Add more suggestions on how to deal with excluding a package from a workspace (rust-lang/cargo#6805)
- Warn on version req with metadata (rust-lang/cargo#6806)
- cargo install: Be more restrictive about cli flags (rust-lang/cargo#6801)
- Support force-pushed repos with git-fetch-with-cli (rust-lang/cargo#6800)
- Cargo clippy (rust-lang/cargo#6759)
- Don't include metadata in wasm binary examples (rust-lang/cargo#6812)
- Update glossary for `feature` (rust-lang/cargo#6809)
- Include proc-macros in `build-override` (rust-lang/cargo#6811)
- Resolver: A dep is equivalent to one of the things it can resolve to (rust-lang/cargo#6776)
- Add some docs for `Downloads` (rust-lang/cargo#6815)
- Resolve: Be less strict while offline (rust-lang/cargo#6814)
- Accept trailing comma in test of impl Debug for PackageId (rust-lang/cargo#6818)
- Fix doc link (rust-lang/cargo#6820)

<br>

I specifically care about "Accept trailing comma in test of impl Debug for PackageId (rust-lang/cargo#6818)" to unblock https://github.com/rust-lang/rust/pull/59076.

Mentioning @ehuss.

5 years agoFix expectations on some ui test in nll compare mode.
Charles Lew [Fri, 5 Apr 2019 04:06:29 +0000 (12:06 +0800)]
Fix expectations on some ui test in nll compare mode.

5 years agoAuto merge of #59643 - alexcrichton:wasi-symbols, r=sanxiyn
bors [Fri, 5 Apr 2019 05:16:45 +0000 (05:16 +0000)]
Auto merge of #59643 - alexcrichton:wasi-symbols, r=sanxiyn

std: Upgrade `compiler_builtins` to fix wasi linkage

Turns out we needed to exclude a number of math functions on the
`wasm32-unknown-wasi` target, and this was fixed in 0.1.9 of
compiler-builtins and this is pulling in the fix to libstd's own build.

5 years agoAuto merge of #59704 - alexcrichton:fix-freebsd, r=pietroalbini
bors [Fri, 5 Apr 2019 02:32:20 +0000 (02:32 +0000)]
Auto merge of #59704 - alexcrichton:fix-freebsd, r=pietroalbini

ci: Update FreeBSD tarball downloads

These appear to have disappeared from the original server, so I acquired
the contents from a different mirror and uploaded them to our S3 bucket

5 years agowasm32: Default to a "static" relocation model
Alex Crichton [Thu, 4 Apr 2019 20:23:42 +0000 (13:23 -0700)]
wasm32: Default to a "static" relocation model

LLVM 9 is adding support for a "pic" relocation model for wasm code,
which is quite different than the current model. In order to preserve
the mode of compilation that we have today default to "static" to ensure
that we don't accidentally start creating experimental relocatable
binaries.

5 years agoci: Update FreeBSD tarball downloads
Alex Crichton [Thu, 4 Apr 2019 18:40:21 +0000 (11:40 -0700)]
ci: Update FreeBSD tarball downloads

These appear to have disappeared from the original server, so I acquired
the contents from a different mirror and uploaded them to our S3 bucket

5 years agoAdd ignore to doc code
Masaki Hara [Mon, 11 Feb 2019 07:32:42 +0000 (16:32 +0900)]
Add ignore to doc code

5 years agoSimplify fnbox docs.
Masaki Hara [Mon, 11 Feb 2019 02:09:41 +0000 (11:09 +0900)]
Simplify fnbox docs.

5 years agoStabilize boxed_closure_impls in 1.35.0.
Charles Lew [Mon, 11 Feb 2019 02:09:26 +0000 (11:09 +0900)]
Stabilize boxed_closure_impls in 1.35.0.

5 years agoRemove FnBox specialization of impl FnOnce for Box<impl FnOnce>.
Masaki Hara [Mon, 11 Feb 2019 01:34:24 +0000 (10:34 +0900)]
Remove FnBox specialization of impl FnOnce for Box<impl FnOnce>.

5 years agoWe already have unsized_locals in stage0.
Masaki Hara [Sun, 10 Feb 2019 10:25:56 +0000 (19:25 +0900)]
We already have unsized_locals in stage0.

5 years agoFix failing tests.
Masaki Hara [Sun, 3 Feb 2019 13:08:34 +0000 (22:08 +0900)]
Fix failing tests.

5 years agoFix expectations on some ui tests involving FnOnce.
Masaki Hara [Sun, 28 Oct 2018 08:53:43 +0000 (17:53 +0900)]
Fix expectations on some ui tests involving FnOnce.

5 years agoAdd unstable-book articles on fnbox and boxed_closure_impls.
Masaki Hara [Sun, 28 Oct 2018 06:36:58 +0000 (15:36 +0900)]
Add unstable-book articles on fnbox and boxed_closure_impls.

5 years agoAdd tests for boxed_closure_impls.
Masaki Hara [Sun, 28 Oct 2018 06:28:47 +0000 (15:28 +0900)]
Add tests for boxed_closure_impls.

5 years agoAdd Fn* blanket impls for Box.
Masaki Hara [Sun, 28 Oct 2018 06:28:15 +0000 (15:28 +0900)]
Add Fn* blanket impls for Box.

5 years agoMake FnBox a subtrait of FnOnce.
Masaki Hara [Sun, 28 Oct 2018 06:27:29 +0000 (15:27 +0900)]
Make FnBox a subtrait of FnOnce.

5 years agostd: Upgrade `compiler_builtins` to fix wasi linkage
Alex Crichton [Tue, 2 Apr 2019 20:38:51 +0000 (13:38 -0700)]
std: Upgrade `compiler_builtins` to fix wasi linkage

Turns out we needed to exclude a number of math functions on the
`wasm32-unknown-wasi` target, and this was fixed in 0.1.9 of
compiler-builtins and this is pulling in the fix to libstd's own build.

5 years agoAuto merge of #59676 - alexcrichton:osx-deadlock, r=sfackler
bors [Thu, 4 Apr 2019 18:22:34 +0000 (18:22 +0000)]
Auto merge of #59676 - alexcrichton:osx-deadlock, r=sfackler

std: Avoid usage of `Once` in `Instant`

This commit removes usage of `Once` from the internal implementation of
time utilities on OSX and Windows. It turns out that we accidentally hit
a deadlock today (#59020) via events that look like:

* A thread invokes `park_timeout`
* Internally, only on OSX, `park_timeout` calls `Instant::elapsed`
* Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize
  global timer data
* Inside of `Once`, it attempts to `park`

This means on the same stack frame, when there's contention, we're
calling `park` from inside `park_timeout`, causing a deadlock!

The solution implemented in this commit was to remove usage of `Once`
and instead just do a small dance with atomics. There's no real need we
need to guarantee that the global information is only learned once, only
that it's only *stored* once. This implementation may have multiple
threads invoke `mach_timebase_info`, but only one will store the global
information which will amortize the cost for all other threads.

A similar fix has been applied to windows to be uniform across our
implementations, but looking at the code on Windows no deadlock was
possible. This is purely just a consistency update for Windows and in
theory a slightly leaner implementation.

Closes #59020

5 years agoUse more accurate lint root for mutable_borrow_reservation_conflict
Matthew Jasper [Sun, 31 Mar 2019 12:30:51 +0000 (13:30 +0100)]
Use more accurate lint root for mutable_borrow_reservation_conflict

5 years agoPlacate tidy
Felix S Klock II [Tue, 26 Mar 2019 12:31:36 +0000 (13:31 +0100)]
Placate tidy

Get us back below 100 characters per line to placate tidy.

5 years agoFix out-of-date comment
Felix S Klock II [Tue, 26 Mar 2019 12:18:17 +0000 (13:18 +0100)]
Fix out-of-date comment

A comment in one match arm make a blanket statement about "reads/reservations", but in fact the whole point of this PR is that reservations are *not* handled by that particular arm anymore.

5 years agoAdjust the mutable_borrow_reservation_conflict message
Matthew Jasper [Mon, 25 Mar 2019 23:16:39 +0000 (23:16 +0000)]
Adjust the mutable_borrow_reservation_conflict message

We aren't sure if this will become an error or not yet.

5 years agounit test for the lint itself, illustrating that it can be controlled by `#[allow...
Felix S. Klock II [Wed, 13 Mar 2019 21:16:56 +0000 (22:16 +0100)]
unit test for the lint itself, illustrating that it can be controlled by `#[allow(..)]` etc.

5 years agoupdate unit test output to reflect change to lint-based diagnostic.
Felix S. Klock II [Wed, 13 Mar 2019 19:17:59 +0000 (20:17 +0100)]
update unit test output to reflect change to lint-based diagnostic.

5 years agoadd mutable_borrow_reservation_conflict future-incompatibility lint.
Felix S. Klock II [Wed, 13 Mar 2019 19:15:58 +0000 (20:15 +0100)]
add mutable_borrow_reservation_conflict future-incompatibility lint.

Convert the new 2-phase reservation errors into instances of the lint
so that they will be controlled by that attribute.

5 years agoUpdate tests for restrictive two-phase borrows
Matthew Jasper [Fri, 1 Mar 2019 20:10:01 +0000 (20:10 +0000)]
Update tests for restrictive two-phase borrows

5 years agoTreat two-phase borrow reservations as mutable accesses
Matthew Jasper [Fri, 1 Mar 2019 20:09:54 +0000 (20:09 +0000)]
Treat two-phase borrow reservations as mutable accesses

5 years agoFix cases of conflicting two-phase borrows
Matthew Jasper [Wed, 27 Feb 2019 20:32:12 +0000 (20:32 +0000)]
Fix cases of conflicting two-phase borrows

5 years agoUpdate cargo
David Tolnay [Thu, 4 Apr 2019 17:39:23 +0000 (10:39 -0700)]
Update cargo

5 years agoUse declare_lint_pass! and impl_lint_pass! in more places
hgallagher1993 [Thu, 4 Apr 2019 17:23:11 +0000 (13:23 -0400)]
Use declare_lint_pass! and impl_lint_pass! in more places

5 years agoAuto merge of #59695 - Centril:rollup-88qffc2, r=Centril
bors [Thu, 4 Apr 2019 15:36:17 +0000 (15:36 +0000)]
Auto merge of #59695 - Centril:rollup-88qffc2, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #59470 (Document std::fs::File close behavior ignoring errors)
 - #59555 (update miri)
 - #59556 (update stdsimd)
 - #59596 (Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl)
 - #59639 (Never return uninhabited values at all)
 - #59671 (Make some of lexer's API private)
 - #59685 (Add description for -Os and -Oz in rustc.1)
 - #59686 (Temporarily disable stack probing for gnux32.)

Failed merges:

r? @ghost

5 years agostd: Avoid usage of `Once` in `Instant`
Alex Crichton [Wed, 3 Apr 2019 19:18:38 +0000 (12:18 -0700)]
std: Avoid usage of `Once` in `Instant`

This commit removes usage of `Once` from the internal implementation of
time utilities on OSX and Windows. It turns out that we accidentally hit
a deadlock today (#59020) via events that look like:

* A thread invokes `park_timeout`
* Internally, only on OSX, `park_timeout` calls `Instant::elapsed`
* Inside of `Instant::elapsed` on OSX we enter a `Once` to initialize
  global timer data
* Inside of `Once`, it attempts to `park`

This means on the same stack frame, when there's contention, we're
calling `park` from inside `park_timeout`, causing a deadlock!

The solution implemented in this commit was to remove usage of `Once`
and instead just do a small dance with atomics. There's no real need we
need to guarantee that the global information is only learned once, only
that it's only *stored* once. This implementation may have multiple
threads invoke `mach_timebase_info`, but only one will store the global
information which will amortize the cost for all other threads.

A similar fix has been applied to windows to be uniform across our
implementations, but looking at the code on Windows no deadlock was
possible. This is purely just a consistency update for Windows and in
theory a slightly leaner implementation.

Closes #59020

5 years agoRollup merge of #59686 - crlf0710:disable_gnux32_stackprobe, r=luqmana
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:08 +0000 (15:09 +0200)]
Rollup merge of #59686 - crlf0710:disable_gnux32_stackprobe, r=luqmana

Temporarily disable stack probing for gnux32.

5 years agoRollup merge of #59685 - lzutao:patch-1, r=GuillaumeGomez
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:07 +0000 (15:09 +0200)]
Rollup merge of #59685 - lzutao:patch-1, r=GuillaumeGomez

Add description for -Os and -Oz in rustc.1

5 years agoRollup merge of #59671 - matklad:lexer, r=eddyb
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:06 +0000 (15:09 +0200)]
Rollup merge of #59671 - matklad:lexer, r=eddyb

Make some of lexer's API private

Lexer is a `pub` type, so it feels wrong that its fields are just pub (I guess it wasn't exported initially), so let's minimize visibility.

Context: I am looking into extracting rust-lexer into a library, which can be shared by rust-analyzer and rustc. I hope that a simple interface like `fn next_token(src: &str) -> (TokenKind, usize)` would work, but to try this out I need to understand what is the current API of the lexer.

5 years agoRollup merge of #59639 - cuviper:ignore-uninhabited, r=eddyb
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:04 +0000 (15:09 +0200)]
Rollup merge of #59639 - cuviper:ignore-uninhabited, r=eddyb

Never return uninhabited values at all

Functions with uninhabited return values are already marked `noreturn`,
but we were still generating return instructions for this. When running
with `-C passes=lint`, LLVM prints:

    Unusual: Return statement in function with noreturn attribute

The LLVM manual makes a stronger statement about `noreturn` though:

> This produces undefined behavior at runtime if the function ever does
dynamically return.

We now emit an `abort` anywhere that would have tried to return an
uninhabited value.

Fixes #48227
cc #7463 #48229

r? @eddyb

5 years agoRollup merge of #59596 - LukasKalbertodt:fix-range-fmt, r=Kimundi
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:03 +0000 (15:09 +0200)]
Rollup merge of #59596 - LukasKalbertodt:fix-range-fmt, r=Kimundi

Forward formatter settings to bounds of `Range<T>` in `fmt::Debug` impl

Before this change, formatter settings were lost when printing a `Range`. For example, printing a `Range<f32>` with `{:.2?}` would not apply the precision modifier when printing the floats. Now the `Debug` impls look a bit more verbose, but modifier are not lost.

---

I assume the exact output of `Debug` impls in `std` cannot be relied on by users and thus can change, right?

5 years agoRollup merge of #59556 - RalfJung:stdsimd, r=gnzlbg
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:02 +0000 (15:09 +0200)]
Rollup merge of #59556 - RalfJung:stdsimd, r=gnzlbg

update stdsimd

Cc @gnzlbg

5 years agoRollup merge of #59555 - RalfJung:miri, r=oli-obk
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:09:00 +0000 (15:09 +0200)]
Rollup merge of #59555 - RalfJung:miri, r=oli-obk

update miri

r? @oli-obk

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

5 years agoRollup merge of #59470 - czipperz:document-fs-file-close, r=dtolnay
Mazdak Farrokhzad [Thu, 4 Apr 2019 13:08:59 +0000 (15:08 +0200)]
Rollup merge of #59470 - czipperz:document-fs-file-close, r=dtolnay

Document std::fs::File close behavior ignoring errors

Resolves #52685

5 years agoRemove invalid assertion back::link::from add_upstream_rust_crates().
Michael Woerister [Thu, 4 Apr 2019 13:04:37 +0000 (15:04 +0200)]
Remove invalid assertion back::link::from add_upstream_rust_crates().

5 years agoAuto merge of #59619 - alexcrichton:wasi-fs, r=fitzgen
bors [Thu, 4 Apr 2019 12:46:20 +0000 (12:46 +0000)]
Auto merge of #59619 - alexcrichton:wasi-fs, r=fitzgen

wasi: Implement more of the standard library

This commit fills out more of the `wasm32-unknown-wasi` target's standard library, notably the `std::fs` module and all of its internals. A few tweaks were made along the way to non-`fs` modules, but the last commit contains the bulk of the work which is to wire up all APIs to their equivalent on WASI targets instead of unconditionally returning "unsupported". After this some basic filesystem operations and such should all be working in WASI!

5 years agocleanup shebang handling in the lexer
Aleksey Kladov [Thu, 4 Apr 2019 07:55:30 +0000 (10:55 +0300)]
cleanup shebang handling in the lexer

5 years agoMark unix::ffi::OsStrExt methods as inline
Konrad Borowski [Thu, 4 Apr 2019 08:51:18 +0000 (10:51 +0200)]
Mark unix::ffi::OsStrExt methods as inline

5 years agoAuto merge of #59517 - Zoxc:new-queries, r=oli-obk
bors [Thu, 4 Apr 2019 08:26:18 +0000 (08:26 +0000)]
Auto merge of #59517 - Zoxc:new-queries, r=oli-obk

Move query definitions over to the proc macro

r? @oli-obk