]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoUpdate Fira Sans to version 4.202
Manish Goregaokar [Sun, 21 Apr 2019 02:37:25 +0000 (19:37 -0700)]
Update Fira Sans to version 4.202

From https://github.com/mozilla/Fira

5 years agoUpdate Source Code Pro fonts to version 2.030
Manish Goregaokar [Sun, 21 Apr 2019 02:33:58 +0000 (19:33 -0700)]
Update Source Code Pro fonts to version 2.030

Pulled in from https://github.com/adobe-fonts/source-code-pro/

5 years agoUpdate Source Serif Pro fonts to version 2.010
Manish Goregaokar [Sun, 21 Apr 2019 02:27:37 +0000 (19:27 -0700)]
Update Source Serif Pro fonts to version 2.010

Pulled in from https://github.com/adobe-fonts/source-serif-pro/

See https://bugzilla.mozilla.org/show_bug.cgi?id=1545317

5 years agoAuto merge of #59826 - llogiq:multi-dbg, r=SimonSapin
bors [Sat, 20 Apr 2019 20:55:29 +0000 (20:55 +0000)]
Auto merge of #59826 - llogiq:multi-dbg, r=SimonSapin

allow multiple args to `dbg!(..)`

This closes #59763

5 years agoAuto merge of #59700 - matklad:simplify, r=eddyb
bors [Sat, 20 Apr 2019 17:59:15 +0000 (17:59 +0000)]
Auto merge of #59700 - matklad:simplify, r=eddyb

Simplify doc comment lexing

is_doc_comment function checks the first four chars, but this is
redundant, `doc_comment` local var has the same info.

5 years agoAuto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obk
bors [Sat, 20 Apr 2019 15:06:15 +0000 (15:06 +0000)]
Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obk

Refactor Adjust and CastKind

fixes rust-lang#59588

5 years agoAuto merge of #59564 - bjorn3:move_link_to_cg_ssa, r=eddyb
bors [Sat, 20 Apr 2019 12:18:49 +0000 (12:18 +0000)]
Auto merge of #59564 - bjorn3:move_link_to_cg_ssa, r=eddyb

Move back::link and debuginfo::type_names to cg ssa

r? @eddyb

5 years agoTidy
bjorn3 [Sat, 30 Mar 2019 15:16:25 +0000 (16:16 +0100)]
Tidy

5 years agoMove cg_llvm/debuginfo/type_names.rs to cg_ssa
bjorn3 [Sat, 30 Mar 2019 14:45:09 +0000 (15:45 +0100)]
Move cg_llvm/debuginfo/type_names.rs to cg_ssa

5 years agoRemove cg_llvm/back/link.rs
bjorn3 [Sat, 30 Mar 2019 14:30:07 +0000 (15:30 +0100)]
Remove cg_llvm/back/link.rs

5 years agoMove almost all of cg_llvm/back/link.rs to cg_ssa
bjorn3 [Sat, 30 Mar 2019 14:25:10 +0000 (15:25 +0100)]
Move almost all of cg_llvm/back/link.rs to cg_ssa

5 years agoRemove get_reloc_model and target_cpu dependency from most of link.rs
bjorn3 [Sat, 30 Mar 2019 11:59:40 +0000 (12:59 +0100)]
Remove get_reloc_model and target_cpu dependency from most of link.rs

5 years agoMake link functions generic over archive builder
bjorn3 [Sat, 30 Mar 2019 11:59:40 +0000 (12:59 +0100)]
Make link functions generic over archive builder

5 years agoMove some filename constants to cg_ssa
bjorn3 [Sat, 30 Mar 2019 12:03:52 +0000 (13:03 +0100)]
Move some filename constants to cg_ssa

5 years agoMove some function from cg_llvm/back/link.rs to cg_ssa/back/link.rs
bjorn3 [Sat, 30 Mar 2019 10:25:22 +0000 (11:25 +0100)]
Move some function from cg_llvm/back/link.rs to cg_ssa/back/link.rs

5 years agoAuto merge of #60128 - jimblandy:futures-doc-fix, r=withoutboats
bors [Sat, 20 Apr 2019 09:30:51 +0000 (09:30 +0000)]
Auto merge of #60128 - jimblandy:futures-doc-fix, r=withoutboats

Doc fixes for core::future::Future.

Fixed outdated reference to `waker` argument; now futures are passed a
`Context`, from which one can obtain a `waker`.

Cleaned up explanation of what happens when you call `poll` on a completed
future. It doesn't make sense to say that `poll` implementations can't cause
memory unsafety; no safe function is ever allowed to cause memory unsafety, so
why mention it here? It seems like the intent is to say that the `Future` trait
doesn't say what the consequences of excess polls will be, and they might be
bad; but that the usual constraints that Rust imposes on any non-`unsafe`
function still apply. It's also oddly specific to say 'memory corruption'
instead of just 'undefined behavior'; UB is a bit jargony, so the text should
provide examples.

5 years agocore::future::Future: Fix markup typo in docs.
Jim Blandy [Sat, 20 Apr 2019 02:25:40 +0000 (19:25 -0700)]
core::future::Future: Fix markup typo in docs.

5 years agoDoc fixes for core::future::Future.
Jim Blandy [Sat, 20 Apr 2019 02:10:24 +0000 (19:10 -0700)]
Doc fixes for core::future::Future.

Fixed outdated reference to `waker` argument; now futures are passed a
`Context`, from which one can obtain a `waker`.

Cleaned up explanation of what happens when you call `poll` on a completed
future. It doesn't make sense to say that `poll` implementations can't cause
memory unsafety; no safe function is ever allowed to cause memory unsafety, so
why mention it here? It seems like the intent is to say that the `Future` trait
doesn't say what the consequences of excess polls will be, and they might be
bad; but that the usual constraints that Rust imposes on any non-`unsafe`
function still apply. It's also oddly specific to say 'memory corruption'
instead of just 'undefined behavior'; UB is a bit jargony, so the text should
provide examples.

5 years agoAuto merge of #60120 - matthiaskrgr:submodule_upd, r=sanxiyn
bors [Sat, 20 Apr 2019 00:12:14 +0000 (00:12 +0000)]
Auto merge of #60120 - matthiaskrgr:submodule_upd, r=sanxiyn

submodules: update clippy from fbb3a47b to cafbe7f2

Changes:
````
Update compiletest_rs
Typo
Fix dogfood error
Add lint PathBufPushOverwrite
Update *.stderr file
Remove code duplication
Format code
Add test for debug_assert!(false)
Don't lint debug_assert!(false)
Add run-rustfix for option_map_or_none lint
Move two cast_lossless tests to their correct files
Change naive_bytecount applicability MaybeIncorrect
Add tests for declare_lint_pass and impl_lint_pass
Use lint pass macros
Document `declare_lint_pass!`
Fix lint_without_lint_pass internal lint
Use {get,match}_def_path from LateContext
Remove uplifted functions {get,match}_def_path from Clippy
Add run-rustfix for len_zero lint
Add run-rustfix for bool_comparison lint
Add run-rustfix for deref_addrof lint
while_let_loop uses placeholders in suggestions
Remove rust-toolchain file from clippy_dev
Update adding_lints.md
Update PULL_REQUEST_TEMPLATE
Add new lint checklist
Create PULL_REQUEST_TEMPLATE
Only suggest .copied() for Option right now
Also suggest .copied() when .clone() is called on a Copy type
Suggest .copied() instead of .cloned() in map_clone when dealing with references
Deny rustc internal lints
Remove clippy::default_hash_types internal lint
Enable -Zunstable-options in .cargo/config
````

r? @oli-obk

5 years agoAuto merge of #59981 - estebank:recover-struct-lit, r=petrochenkov
bors [Fri, 19 Apr 2019 20:15:11 +0000 (20:15 +0000)]
Auto merge of #59981 - estebank:recover-struct-lit, r=petrochenkov

Emit specific error for struct literal in conditions

Fix #59962, fix #51311.

5 years agoextend ui test
Andre Bogus [Wed, 10 Apr 2019 04:00:35 +0000 (06:00 +0200)]
extend ui test

5 years agosubmodules: update clippy from fbb3a47b to cafbe7f2
Matthias Krüger [Fri, 19 Apr 2019 18:13:07 +0000 (20:13 +0200)]
submodules: update clippy from fbb3a47b to cafbe7f2

Changes:
````
Update compiletest_rs
Typo
Fix dogfood error
Add lint PathBufPushOverwrite
Update *.stderr file
Remove code duplication
Format code
Add test for debug_assert!(false)
Don't lint debug_assert!(false)
Add run-rustfix for option_map_or_none lint
Move two cast_lossless tests to their correct files
Change naive_bytecount applicability MaybeIncorrect
Add tests for declare_lint_pass and impl_lint_pass
Use lint pass macros
Document `declare_lint_pass!`
Fix lint_without_lint_pass internal lint
Use {get,match}_def_path from LateContext
Remove uplifted functions {get,match}_def_path from Clippy
Add run-rustfix for len_zero lint
Add run-rustfix for bool_comparison lint
Add run-rustfix for deref_addrof lint
while_let_loop uses placeholders in suggestions
Remove rust-toolchain file from clippy_dev
Update adding_lints.md
Update PULL_REQUEST_TEMPLATE
Add new lint checklist
Create PULL_REQUEST_TEMPLATE
Only suggest .copied() for Option right now
Also suggest .copied() when .clone() is called on a Copy type
Suggest .copied() instead of .cloned() in map_clone when dealing with references
Deny rustc internal lints
Remove clippy::default_hash_types internal lint
Enable -Zunstable-options in .cargo/config
````

5 years agoSome cleanup to `maybe_parse_struct_expr`
Vadim Petrochenkov [Thu, 18 Apr 2019 20:58:57 +0000 (23:58 +0300)]
Some cleanup to `maybe_parse_struct_expr`

5 years agoremove duplicated code and simplify logic
Esteban Küber [Thu, 18 Apr 2019 18:35:11 +0000 (11:35 -0700)]
remove duplicated code and simplify logic

5 years agoIdentify missing ambiguous case with best effort suggestion
Esteban Küber [Mon, 15 Apr 2019 15:08:46 +0000 (08:08 -0700)]
Identify missing ambiguous case with best effort suggestion

5 years agoEmit specific error for struct literal in conditions
Esteban Küber [Mon, 15 Apr 2019 00:09:03 +0000 (17:09 -0700)]
Emit specific error for struct literal in conditions

5 years agoAuto merge of #60072 - RalfJung:linked-list, r=shepmaster
bors [Fri, 19 Apr 2019 17:12:17 +0000 (17:12 +0000)]
Auto merge of #60072 - RalfJung:linked-list, r=shepmaster

fix LinkedList invalidating mutable references

The test `test_insert_prev` failed in Miri due to what I consider a bug in `LinkedList`: in various places, `NonNull::as_mut` got called to modify the `prev`/`next` pointers of existing nodes. In particular, the unstable `insert_next` has to modify the `next` pointer of the node that was last handed out by the iterator; to this end it creates a mutable reference to the *entire node* that overlaps with the mutable reference to the node's content that was handed out by the iterator! Thus, the next use if said mutable reference is UB.

In code:
```rust
            loop {
                match it.next() { // mutable reference handed to us
                    None => break,
                    Some(elt) => {
                        it.insert_next(*elt + 1); // this invalidates `elt` because it creates an overlapping mutable reference
                        match it.peek_next() {
                            Some(x) => assert_eq!(*x, *elt + 2), // this use of `elt` now is a use of an invalid pointer
                            None => assert_eq!(8, *elt),
                        }
                    }
                }
            }
```

This PR fixes that by using `as_ptr` instead of `as_mut`. This avoids invalidating the mutable reference that was handed to the user.  I did this in all methods called by iterators, just to be sure.

Cc @Gankro

5 years agofix LinkedList invalidating mutable references
Ralf Jung [Thu, 18 Apr 2019 09:41:28 +0000 (11:41 +0200)]
fix LinkedList invalidating mutable references

5 years agoAuto merge of #60077 - RalfJung:miri-alloc-tests, r=joshtriplett
bors [Fri, 19 Apr 2019 12:52:02 +0000 (12:52 +0000)]
Auto merge of #60077 - RalfJung:miri-alloc-tests, r=joshtriplett

make liballoc internal test suite mostly pass in Miri

I discovered, to my surprise, that liballoc has two test suites: `liballoc/tests`, and a bunch of stuff embedded directly within liballoc.  The latter was not covered by [miri-test-libstd](https://github.com/RalfJung/miri-test-libstd) yet.  This disables in Miri the tests that Miri cannot support or runs too slowly.

5 years agoAuto merge of #60063 - spastorino:place2_2, r=oli-obk
bors [Fri, 19 Apr 2019 09:57:26 +0000 (09:57 +0000)]
Auto merge of #60063 - spastorino:place2_2, r=oli-obk

Convert Place unroll to a proper iterator

r? @oli-obk

5 years agomove variable down to where it is used
Ralf Jung [Fri, 19 Apr 2019 07:06:08 +0000 (09:06 +0200)]
move variable down to where it is used

5 years agoAuto merge of #60073 - rchaser53:issue-60049, r=estebank
bors [Fri, 19 Apr 2019 07:03:12 +0000 (07:03 +0000)]
Auto merge of #60073 - rchaser53:issue-60049, r=estebank

avoid type-check body of DefId

fix: #60049
related: PR #59798

5 years agoavoid type-check body of DefId
rchaser53 [Fri, 19 Apr 2019 04:34:54 +0000 (04:34 +0000)]
avoid type-check body of DefId

5 years agoAuto merge of #60104 - Centril:rollup-7vmae1a, r=Centril
bors [Fri, 19 Apr 2019 04:04:02 +0000 (04:04 +0000)]
Auto merge of #60104 - Centril:rollup-7vmae1a, r=Centril

Rollup of 16 pull requests

Successful merges:

 - #59915 (Implement event filtering for self-profiler.)
 - #59933 (Make clear that format padding doesn't work for Debug)
 - #60023 (implement specialized nth_back() for Bytes, Fuse and Enumerate)
 - #60032 (Remove unwanted z-index change)
 - #60041 (Simplify the returning of a Result a bit)
 - #60045 (Suggest appropriate path when calling associated item on bare types)
 - #60052 (Correct unused parameter diagnostic)
 - #60056 (Update rustfmt to 1.2.1)
 - #60060 (whitelist RTM x86 target cpu feature)
 - #60061 (Change suggestion of field when not in self context)
 - #60064 (Point at try `?` on errors affecting the err match arm of the desugared code)
 - #60078 (Use more realistic example for thread builder)
 - #60080 (Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.)
 - #60082 (Update miri)
 - #60097 (Use -mergefunc-use-aliases for any LLVM >= 8)
 - #60098 (libcore: deny `elided_lifetimes_in_paths`)

Failed merges:

r? @ghost

5 years agoRollup merge of #60098 - Centril:libcore-deny-more, r=varkor
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:30 +0000 (06:03 +0200)]
Rollup merge of #60098 - Centril:libcore-deny-more, r=varkor

libcore: deny `elided_lifetimes_in_paths`

r? @varkor

5 years agoRollup merge of #60097 - cuviper:llvm8-mergefunc-use-aliases, r=rkruppe
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:29 +0000 (06:03 +0200)]
Rollup merge of #60097 - cuviper:llvm8-mergefunc-use-aliases, r=rkruppe

Use -mergefunc-use-aliases for any LLVM >= 8

This functionality is not specific to Rust's LLVM, but any starting in LLVM 8.0,
as noted in <https://github.com/rust-lang/rust/pull/56358#discussion_r237702197>.

cc @nikic
r? @rkruppe

5 years agoRollup merge of #60082 - TimDiekmann:master, r=RalfJung
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:27 +0000 (06:03 +0200)]
Rollup merge of #60082 - TimDiekmann:master, r=RalfJung

Update miri

r? @RalfJung

5 years agoRollup merge of #60080 - nathankleyn:fix-issue-60068, r=Centril
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:26 +0000 (06:03 +0200)]
Rollup merge of #60080 - nathankleyn:fix-issue-60068, r=Centril

Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.

The documentation for `rchunks_exact` said it started at the beginning
of the slice, bit it actually starts at the end of the slice.

In addition, there were a couple of "of the slice of the slice"
duplicate phrases going on for `rchunks_exact` and `rchunks_exact_mut`.

This fixes #60068.

5 years agoRollup merge of #60078 - matklad:patch-1, r=shepmaster
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:24 +0000 (06:03 +0200)]
Rollup merge of #60078 - matklad:patch-1, r=shepmaster

Use more realistic example for thread builder

Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.

5 years agoRollup merge of #60064 - estebank:issue-59980, r=varkor
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:23 +0000 (06:03 +0200)]
Rollup merge of #60064 - estebank:issue-59980, r=varkor

Point at try `?` on errors affecting the err match arm of the desugared code

Fix #59980.

5 years agoRollup merge of #60061 - estebank:field-sugg, r=davidtwco
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:21 +0000 (06:03 +0200)]
Rollup merge of #60061 - estebank:field-sugg, r=davidtwco

Change suggestion of field when not in self context

Fix #60057.

5 years agoRollup merge of #60060 - mtak-:rtm-x86-feature, r=petrochenkov
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:20 +0000 (06:03 +0200)]
Rollup merge of #60060 - mtak-:rtm-x86-feature, r=petrochenkov

whitelist RTM x86 target cpu feature

This PR adds support for intels restricted transactional memory cpu feature. I mostly copied what was done for the [movbe](https://github.com/rust-lang/rust/pull/57999) feature.

https://github.com/rust-lang-nursery/stdsimd/issues/718

5 years agoRollup merge of #60056 - topecongiro:rustfmt-1.2.1, r=alexcrichton
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:19 +0000 (06:03 +0200)]
Rollup merge of #60056 - topecongiro:rustfmt-1.2.1, r=alexcrichton

Update rustfmt to 1.2.1

5 years agoRollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebank
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:17 +0000 (06:03 +0200)]
Rollup merge of #60052 - varkor:unused-parameter-diagnostic, r=estebank

Correct unused parameter diagnostic

The message was incorrect for unused lifetime parameters. There's no need to be specific.

5 years agoRollup merge of #60045 - estebank:suggest-std, r=petrochenkov
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:16 +0000 (06:03 +0200)]
Rollup merge of #60045 - estebank:suggest-std, r=petrochenkov

Suggest appropriate path when calling associated item on bare types

When looking at the documentation for `std::f32` or `std::str`, for
example, it is easy to get confused and assume `std::f32` and `f32`
are the same thing. Because of this, it is not uncommon to attempt
writing `f32::consts::PI` instead of the correct
`std::f32::consts::PI`. When encountering the former, which results
in an access error due to it being an inexistent path, try to access
the same path under `std`. If this succeeds, this information is
stored for later tweaking of the final E0599 to provide an
appropriate suggestion.

Fix #26760, fix #46660.

5 years agoRollup merge of #60041 - jnferner:patch-1, r=shepmaster
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:14 +0000 (06:03 +0200)]
Rollup merge of #60041 - jnferner:patch-1, r=shepmaster

Simplify the returning of a Result a bit

5 years agoRollup merge of #60032 - rust-lang:remove-unwanted-z-index, r=QuietMisdreavus
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:13 +0000 (06:03 +0200)]
Rollup merge of #60032 - rust-lang:remove-unwanted-z-index, r=QuietMisdreavus

Remove unwanted z-index change

Fixes #60031.

r? @QuietMisdreavus

5 years agoRollup merge of #60023 - koalatux:nth-back, r=scottmcm
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:12 +0000 (06:03 +0200)]
Rollup merge of #60023 - koalatux:nth-back, r=scottmcm

implement specialized nth_back() for Bytes, Fuse and Enumerate

Hi,

After my first PR has been successfully merged, here is my second pull request :-)

Also this PR contains some specializations for the problem discussed in #54054.

5 years agoRollup merge of #59933 - sourcefrog:doc-fmt, r=shepmaster
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:10 +0000 (06:03 +0200)]
Rollup merge of #59933 - sourcefrog:doc-fmt, r=shepmaster

Make clear that format padding doesn't work for Debug

As mentioned in
https://github.com/rust-lang/rust/issues/46006#issuecomment-345260633

5 years agoRollup merge of #59915 - michaelwoerister:sp-event-filters-1, r=wesleywiser
Mazdak Farrokhzad [Fri, 19 Apr 2019 04:03:09 +0000 (06:03 +0200)]
Rollup merge of #59915 - michaelwoerister:sp-event-filters-1, r=wesleywiser

Implement event filtering for self-profiler.

This is a first sketch for event filtering in the self-profiler, something that we'll want in order to keep profiling overhead low in the common case. The PR contains the commits from https://github.com/rust-lang/rust/pull/59515 and, for the moment, is meant for performance testing.

r? @wesleywiser

5 years agoSuggest appropriate path when calling associated item on bare types
Esteban Küber [Wed, 17 Apr 2019 17:24:50 +0000 (10:24 -0700)]
Suggest appropriate path when calling associated item on bare types

When looking at the documentation for `std::f32` or `std::str`, for
example, it is easy to get confused and assume `std::f32` and `f32`
are the same thing. Because of this, it is not uncommon to attempt
writing `f32::consts::PI` instead of the correct
`std::f32::consts::PI`. When encountering the former, which results
in an access error due to it being an inexistent path, try to access
the same path under `std`. If this succeeds, this information is
stored for later tweaking of the final E0599 to provide an
appropriate suggestion.

This suggestion applies to both E0233 and E0599 and is only checked
when the first ident of a path corresponds to a primitive type.

5 years agoFix rebase
Esteban Küber [Fri, 19 Apr 2019 01:57:16 +0000 (18:57 -0700)]
Fix rebase

5 years agoreview comments: change wording
Esteban Küber [Thu, 18 Apr 2019 16:43:15 +0000 (09:43 -0700)]
review comments: change wording

5 years agoChange suggestion of field when not in self context
Esteban Küber [Thu, 18 Apr 2019 00:22:16 +0000 (17:22 -0700)]
Change suggestion of field when not in self context

5 years agolibcore: deny more...
Mazdak Farrokhzad [Thu, 18 Apr 2019 23:37:12 +0000 (01:37 +0200)]
libcore: deny more...

5 years agoRemove the unused LLVMRustIsRustLLVM
Josh Stone [Thu, 18 Apr 2019 22:28:18 +0000 (15:28 -0700)]
Remove the unused LLVMRustIsRustLLVM

5 years agoUse -mergefunc-use-aliases for any LLVM >= 8
Josh Stone [Thu, 18 Apr 2019 22:01:10 +0000 (15:01 -0700)]
Use -mergefunc-use-aliases for any LLVM >= 8

5 years agoAuto merge of #60046 - euclio:missing-error-code-descriptions, r=estebank
bors [Thu, 18 Apr 2019 21:26:53 +0000 (21:26 +0000)]
Auto merge of #60046 - euclio:missing-error-code-descriptions, r=estebank

hide `--explain` hint if error has no extended info

Fixes #59848.

r? @estebank

5 years agoAuto merge of #58702 - taiki-e:libcore-2018, r=Centril
bors [Thu, 18 Apr 2019 17:48:21 +0000 (17:48 +0000)]
Auto merge of #58702 - taiki-e:libcore-2018, r=Centril

libcore => 2018

Transitions `libcore` to Rust 2018; cc #58099

r? @Centril

5 years agoUpdate tests
varkor [Wed, 17 Apr 2019 21:41:34 +0000 (22:41 +0100)]
Update tests

5 years agohide `--explain` hint if error has no extended info
Andy Russell [Wed, 17 Apr 2019 17:26:38 +0000 (13:26 -0400)]
hide `--explain` hint if error has no extended info

5 years agoUpdate miri
Tim Diekmann [Thu, 18 Apr 2019 16:06:39 +0000 (18:06 +0200)]
Update miri

5 years agoImplement event filtering for self-profiler.
Michael Woerister [Fri, 12 Apr 2019 12:48:41 +0000 (14:48 +0200)]
Implement event filtering for self-profiler.

5 years agoAuto merge of #60025 - JohnTitor:rename-files, r=petrochenkov
bors [Thu, 18 Apr 2019 14:52:45 +0000 (14:52 +0000)]
Auto merge of #60025 - JohnTitor:rename-files, r=petrochenkov

Rename files about error codes

fixes #60017

This PR will be failed in tidy.

<details>
<summary>The log is here:</summary>

```
tidy check
tidy error: duplicate error code: 411
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:83:             __diagnostic_used!(E0411);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:84:             err.code(DiagnosticId::Error("E0411".to_owned()));
tidy error: duplicate error code: 424
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:90:             debug!("smart_resolve_path_fragment: E0424, source={:?}", source);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:92:             __diagnostic_used!(E0424);
tidy error: Documents\GitHub\rust\src\librustc_resolve\diagnostics.rs:93:             err.code(DiagnosticId::Error("E0424".to_owned()));
some tidy checks failed
```

</details>

I'd like to fix this but I don't know what to do.
I will work on later. Please let me know if you have any solutions.

r? @petrochenkov

5 years agoFix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.
Nathan Kleyn [Thu, 18 Apr 2019 13:48:15 +0000 (14:48 +0100)]
Fix small errors in docs for `rchunks_exact` and `rchunks_exact_mut`.

The documentation for `rchunks_exact` said it started at the beginning
of the slice, bit it actually starts at the end of the slice.

In addition, there were a couple of "of the slice of the slice"
duplicate phrases going on for `rchunks_exact` and `rchunks_exact_mut`.

This fixes #60068.

5 years agoUse more realistic example for thread builder
Aleksey Kladov [Thu, 18 Apr 2019 11:58:38 +0000 (14:58 +0300)]
Use more realistic example for thread builder

Stack size of 10 **bytes** does not make any sense: the minimal possible stack size is greater anyway.

5 years agoAuto merge of #60071 - RalfJung:miri, r=oli-obk
bors [Thu, 18 Apr 2019 11:55:13 +0000 (11:55 +0000)]
Auto merge of #60071 - RalfJung:miri, r=oli-obk

update miri

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

5 years agomake liballoc internal test suite mostly pass in Miri
Ralf Jung [Wed, 17 Apr 2019 17:11:56 +0000 (19:11 +0200)]
make liballoc internal test suite mostly pass in Miri

5 years agoupdate miri
Ralf Jung [Thu, 18 Apr 2019 09:05:10 +0000 (11:05 +0200)]
update miri

5 years agoAuto merge of #60058 - varkor:const-generics-ty-refactor, r=cramertj
bors [Thu, 18 Apr 2019 08:58:45 +0000 (08:58 +0000)]
Auto merge of #60058 - varkor:const-generics-ty-refactor, r=cramertj

Make const parameters enforce no variance constraints

Fixes https://github.com/rust-lang/rust/issues/60047. Also includes some minor const refactoring for convenience.

5 years agoAuto merge of #60048 - estebank:issue-54954, r=sanxiyn
bors [Thu, 18 Apr 2019 06:00:06 +0000 (06:00 +0000)]
Auto merge of #60048 - estebank:issue-54954, r=sanxiyn

Fix ICE on const evaluation of const method

Fix #54954.

5 years agoUpdate stdsimd
Taiki Endo [Thu, 18 Apr 2019 05:51:11 +0000 (14:51 +0900)]
Update stdsimd

5 years agolibcore => 2018
Taiki Endo [Mon, 15 Apr 2019 02:23:21 +0000 (11:23 +0900)]
libcore => 2018

5 years agoSimplify the returning of a Result a bit
Jan Nils Ferner [Wed, 17 Apr 2019 14:02:17 +0000 (16:02 +0200)]
Simplify the returning of a Result a bit

5 years agoAuto merge of #60051 - estebank:fn-sugg, r=davidtwco
bors [Thu, 18 Apr 2019 03:06:17 +0000 (03:06 +0000)]
Auto merge of #60051 - estebank:fn-sugg, r=davidtwco

Do not mention missing `PartialOrd` impl when involving uncalled fns

5 years agoGive custom error for E0277 on `?` error case
Esteban Küber [Thu, 18 Apr 2019 02:50:50 +0000 (19:50 -0700)]
Give custom error for E0277 on `?` error case

5 years agoPoint at try `?` on errors affecting the err match arm of the desugared code
Esteban Küber [Thu, 18 Apr 2019 01:30:26 +0000 (18:30 -0700)]
Point at try `?` on errors affecting the err match arm of the desugared code

5 years agoMake PlaceProjectionsIter a proper iterator
Santiago Pastorino [Wed, 17 Apr 2019 23:25:56 +0000 (01:25 +0200)]
Make PlaceProjectionsIter a proper iterator

5 years agowhitelist rtm x86 cpu feature
tyler [Wed, 17 Apr 2019 23:38:54 +0000 (16:38 -0700)]
whitelist rtm x86 cpu feature

5 years agoreview comment: add extra doc
Esteban Küber [Wed, 17 Apr 2019 23:42:52 +0000 (16:42 -0700)]
review comment: add extra doc

5 years agoAdd a test for unused const parameters
varkor [Wed, 17 Apr 2019 23:30:27 +0000 (00:30 +0100)]
Add a test for unused const parameters

5 years agoConst parameters should impose no variance constraints
varkor [Wed, 17 Apr 2019 23:30:17 +0000 (00:30 +0100)]
Const parameters should impose no variance constraints

5 years agoAdd a FIXME to collector
varkor [Wed, 17 Apr 2019 22:12:53 +0000 (23:12 +0100)]
Add a FIXME to collector

5 years agoAdd own_requires_monomorphization
varkor [Wed, 17 Apr 2019 22:09:22 +0000 (23:09 +0100)]
Add own_requires_monomorphization

5 years agoUpdate rustfmt to 1.2.1
topecongiro [Wed, 17 Apr 2019 22:42:18 +0000 (07:42 +0900)]
Update rustfmt to 1.2.1

5 years agoAuto merge of #60054 - Centril:rollup-o40xxaa, r=Centril
bors [Wed, 17 Apr 2019 22:24:11 +0000 (22:24 +0000)]
Auto merge of #60054 - Centril:rollup-o40xxaa, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #59908 (Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in std)
 - #59984 (Remove collection-specific `with_capacity` documentation from `std::collections`)
 - #60036 (Remove nrc from toolstate pings)
 - #60037 (Resolve inconsistency in error messages between "parameter" and "variable".)

Failed merges:

r? @ghost

5 years agoRollup merge of #60037 - eddyb:actually-its-param, r=estebank
Mazdak Farrokhzad [Wed, 17 Apr 2019 22:23:40 +0000 (00:23 +0200)]
Rollup merge of #60037 - eddyb:actually-its-param, r=estebank

Resolve inconsistency in error messages between "parameter" and "variable".

The inconsistency was introduced in 104fe1c4db24f860b890dfd25577f23ee111279a (#33619), when a label saying `type variable` was added to an error with a message talking about `type parameters`.
Given that `parameter` is far more prevalent when referring to generics in the context of Rust, IMO it should be that in both the message and the label.

r? @nikomatsakis or @estebank

5 years agoRollup merge of #60036 - rust-lang:nrc-patch-1, r=Xanewok
Mazdak Farrokhzad [Wed, 17 Apr 2019 22:23:39 +0000 (00:23 +0200)]
Rollup merge of #60036 - rust-lang:nrc-patch-1, r=Xanewok

Remove nrc from toolstate pings

🙉

5 years agoRollup merge of #59984 - gluyas:collections-with_capacity-doc-fix, r=rkruppe
Mazdak Farrokhzad [Wed, 17 Apr 2019 22:23:38 +0000 (00:23 +0200)]
Rollup merge of #59984 - gluyas:collections-with_capacity-doc-fix, r=rkruppe

Remove collection-specific `with_capacity` documentation from `std::collections`

Fixes #59931

The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle.

The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.

5 years agoRollup merge of #59908 - lzutao:str_escape, r=SimonSapin
Mazdak Farrokhzad [Wed, 17 Apr 2019 22:23:36 +0000 (00:23 +0200)]
Rollup merge of #59908 - lzutao:str_escape, r=SimonSapin

Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in std

cc #59893

5 years agoCorrect E0392 diagnostic
varkor [Wed, 17 Apr 2019 21:41:30 +0000 (22:41 +0100)]
Correct E0392 diagnostic

5 years agoDo not mention missing `PartialOrd` impl when involving uncalled fns
Esteban Küber [Wed, 17 Apr 2019 21:37:50 +0000 (14:37 -0700)]
Do not mention missing `PartialOrd` impl when involving uncalled fns

5 years agoRename module
Yuki OKUSHI [Wed, 17 Apr 2019 21:27:30 +0000 (06:27 +0900)]
Rename module

5 years agoRemove unnecessary condition
Yuki OKUSHI [Wed, 17 Apr 2019 21:22:48 +0000 (06:22 +0900)]
Remove unnecessary condition

5 years agoRename diagnositc_list into error_codes
Yuki OKUSHI [Wed, 17 Apr 2019 21:21:30 +0000 (06:21 +0900)]
Rename diagnositc_list into error_codes

5 years agoRename files in doc
Yuki OKUSHI [Wed, 17 Apr 2019 21:20:07 +0000 (06:20 +0900)]
Rename files in doc

5 years agoAuto merge of #59527 - matklad:sized-index, r=Centril
bors [Wed, 17 Apr 2019 19:18:51 +0000 (19:18 +0000)]
Auto merge of #59527 - matklad:sized-index, r=Centril

Add test checking that Index<T: ?Sized> works

I've noticed that we have an `Idx: ?Sized` bound on the **index** in the `Index`, which seems strange given that we accept index by value. My guess is that it was meant to be removed in https://github.com/rust-lang/rust/pull/23601, but was overlooked.

If I remove this bound, `./x.py src/libstd/ src/libcore/` passes, which means at least that this is not covered by test.

I think there's three things we can do here:

* run crater with the bound removed to check if there are any regressions, and merge this, to be consistent with other operator traits
* run crater, get regressions, write a test for this with a note that "hey, we tried to fix it, its unfixable"
* decide, in the light of by-value DSTs, that this is a feature rather than a bug, and add a test

cc @rust-lang/libs

EDIT: the forth alternative is that there exist a genuine reason why this is the case, but I failed to see it :D

5 years agoFix ICE on const evaluation of const method
Esteban Küber [Wed, 17 Apr 2019 19:00:35 +0000 (12:00 -0700)]
Fix ICE on const evaluation of const method

5 years agomaking adjust_span a closure
Saleem Jaffer [Wed, 17 Apr 2019 18:40:45 +0000 (00:10 +0530)]
making adjust_span a closure

5 years agoMake iterate take a FnOnce with PlaceBase and PlaceProjectionIter
Santiago Pastorino [Fri, 1 Mar 2019 01:37:35 +0000 (02:37 +0100)]
Make iterate take a FnOnce with PlaceBase and PlaceProjectionIter