]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoOverride `Iterator::is_sorted_by` in `slice::Iter` impl
Lukas Kalbertodt [Mon, 17 Dec 2018 14:54:19 +0000 (15:54 +0100)]
Override `Iterator::is_sorted_by` in `slice::Iter` impl

Additionally, the root implementation was changed a bit: it now uses
`all` instead of coding that logic manually.

To avoid duplicate code, the inherent `[T]::is_sorted_by` method now
calls `self.iter().is_sorted_by(...)`. This should always be inlined
and not result in overhead.

5 years agoCompare pairs with `slice::windows`
Kevin Leimkuhler [Mon, 15 Oct 2018 03:45:28 +0000 (20:45 -0700)]
Compare pairs with `slice::windows`

5 years agoImprove documentation and slice impl
Kevin Leimkuhler [Sun, 14 Oct 2018 00:26:57 +0000 (17:26 -0700)]
Improve documentation and slice impl

5 years agoAdd is_sorted unstable documentation
Kevin Leimkuhler [Fri, 12 Oct 2018 21:47:01 +0000 (14:47 -0700)]
Add is_sorted unstable documentation

5 years agoAdd is_sorted impl for [T]
Kevin Leimkuhler [Thu, 11 Oct 2018 22:59:54 +0000 (15:59 -0700)]
Add is_sorted impl for [T]

5 years agoAdd initial impl of is_sorted to Iterator
Kevin Leimkuhler [Thu, 11 Oct 2018 16:53:15 +0000 (09:53 -0700)]
Add initial impl of is_sorted to Iterator

5 years agoFix tidy error
Esteban Küber [Fri, 18 Jan 2019 06:32:59 +0000 (22:32 -0800)]
Fix tidy error

5 years agoPoint at more cases involving return types
Esteban Küber [Fri, 18 Jan 2019 05:18:51 +0000 (21:18 -0800)]
Point at more cases involving return types

5 years agoAvoid pointing at multiple places on return type error
Esteban Küber [Fri, 18 Jan 2019 05:06:09 +0000 (21:06 -0800)]
Avoid pointing at multiple places on return type error

5 years agoPoint more places where expectation comes from
Esteban Küber [Fri, 18 Jan 2019 04:45:50 +0000 (20:45 -0800)]
Point more places where expectation comes from

5 years agoDo not give incorrect label for return type mismatch
Esteban Küber [Fri, 18 Jan 2019 04:26:00 +0000 (20:26 -0800)]
Do not give incorrect label for return type mismatch

5 years agoUse structured suggestion to surround struct literal with parenthesis
Esteban Küber [Fri, 18 Jan 2019 05:19:30 +0000 (21:19 -0800)]
Use structured suggestion to surround struct literal with parenthesis

5 years agofix compat-mode ui test
Mark Mansi [Fri, 18 Jan 2019 04:04:27 +0000 (22:04 -0600)]
fix compat-mode ui test

5 years agoUpdate tests
Mark Mansi [Tue, 11 Dec 2018 21:49:40 +0000 (15:49 -0600)]
Update tests

5 years agobetter lifetime error message
Mark Mansi [Mon, 3 Dec 2018 20:40:04 +0000 (14:40 -0600)]
better lifetime error message

5 years agoUpdate cargo
Eric Huss [Fri, 18 Jan 2019 01:36:34 +0000 (17:36 -0800)]
Update cargo

5 years agoFix suggestions given mulitple bad lifetimes
Dan Robertson [Thu, 17 Jan 2019 13:53:21 +0000 (13:53 +0000)]
Fix suggestions given mulitple bad lifetimes

When given multiple lifetimes prior to type parameters in generic
parameters, do not ICE and print the correct suggestion.

5 years agoInline `expand_node`.
Nicholas Nethercote [Thu, 17 Jan 2019 23:00:51 +0000 (10:00 +1100)]
Inline `expand_node`.

This requires restructuring things a little so that there is only one
callsite, ensuring that inlinining doesn't cause unnecessary code bloat.

This reduces instruction counts for the `unicode_normalization`
benchmark by up to 4%.

5 years agoRemove unneeded `origin` arg from `iterate_until_fixed_point`'s closure.
Nicholas Nethercote [Thu, 17 Jan 2019 22:51:24 +0000 (09:51 +1100)]
Remove unneeded `origin` arg from `iterate_until_fixed_point`'s closure.

5 years agoBless test.
Wesley Norris [Tue, 1 Jan 2019 01:03:33 +0000 (20:03 -0500)]
Bless test.

Bless test, remove submodule, and fix book entry.

bless test again? maybe it'll work this time...

5 years agoAdd book section and fix typo.
Wesley Norris [Mon, 31 Dec 2018 23:05:57 +0000 (18:05 -0500)]
Add book section and fix typo.

5 years agoMinor changes to wording and formatting.
Wesley Norris [Sun, 16 Dec 2018 22:31:36 +0000 (17:31 -0500)]
Minor changes to wording and formatting.

5 years agoBless test.
Wesley Norris [Sat, 8 Dec 2018 20:50:03 +0000 (15:50 -0500)]
Bless test.

5 years agoFix tidy error.
Wesley Norris [Sat, 8 Dec 2018 19:22:08 +0000 (14:22 -0500)]
Fix tidy error.

5 years agoPersist doc test executables to given path.
Wesley Norris [Sat, 8 Dec 2018 19:17:50 +0000 (14:17 -0500)]
Persist doc test executables to given path.

5 years agoprivacy: Account for associated existential types
Vadim Petrochenkov [Tue, 15 Jan 2019 22:47:49 +0000 (01:47 +0300)]
privacy: Account for associated existential types

5 years agoFix non-clickable urls
Guillaume Gomez [Thu, 17 Jan 2019 20:28:23 +0000 (21:28 +0100)]
Fix non-clickable urls

5 years agoFix tests
Yuki Okushi [Thu, 17 Jan 2019 20:24:17 +0000 (05:24 +0900)]
Fix tests

5 years agoAdd token::Err
Yuki Okushi [Thu, 17 Jan 2019 20:23:56 +0000 (05:23 +0900)]
Add token::Err

5 years agoChange from mk_lit! to cx.expr
Yuki Okushi [Thu, 17 Jan 2019 20:23:25 +0000 (05:23 +0900)]
Change from mk_lit! to cx.expr

5 years agoContinue cheking
Yuki Okushi [Thu, 17 Jan 2019 20:22:00 +0000 (05:22 +0900)]
Continue cheking

5 years agoChange from error to invalid
Yuki Okushi [Thu, 17 Jan 2019 20:20:27 +0000 (05:20 +0900)]
Change from error to invalid

5 years agoFix typo: 'rust-gdbgui' instead of 'rust-gdbui'
Nicolas Bigaouette [Thu, 17 Jan 2019 20:05:55 +0000 (15:05 -0500)]
Fix typo: 'rust-gdbgui' instead of 'rust-gdbui'

5 years agoInstall missing 'rust-gdbui''
Nicolas Bigaouette [Thu, 17 Jan 2019 19:16:26 +0000 (14:16 -0500)]
Install missing 'rust-gdbui''

See https://github.com/rust-lang/rust/pull/53774#issuecomment-419704939

5 years agoUpdate bootstrap.py
lenoil98 [Thu, 17 Jan 2019 18:20:00 +0000 (13:20 -0500)]
Update bootstrap.py

Add PowerPC64 support on FreeBSD

5 years agoAdd signed num::NonZeroI* types
Simon Sapin [Wed, 9 Jan 2019 18:37:38 +0000 (19:37 +0100)]
Add signed num::NonZeroI* types

Multiple people have asked for them, in
https://github.com/rust-lang/rust/issues/49137.
Given that the unsigned ones already exist,
they are very easy to add and not an additional maintenance burden.

5 years agoproperly deprecate suggestion methods
Andy Russell [Thu, 17 Jan 2019 15:18:56 +0000 (10:18 -0500)]
properly deprecate suggestion methods

5 years agoFix typo bug in DepGraph::try_mark_green().
Michael Woerister [Thu, 17 Jan 2019 14:32:05 +0000 (15:32 +0100)]
Fix typo bug in DepGraph::try_mark_green().

5 years agoUse a faster early exit during region expansion
Björn Steinbrink [Tue, 15 Jan 2019 20:53:37 +0000 (21:53 +0100)]
Use a faster early exit during region expansion

Turns out that the equality check for regions is rather expensive, and
the current early exit check works in such a way, that the comparison is
even done twice. As we only really care about the case of equal scopes,
we can perform a faster, more specialized check and move it up one
level, so we can eventually skip the additional full comparison as well.

5 years agoAuto merge of #57694 - pietroalbini:revert-beta-on-master, r=pietroalbini
bors [Thu, 17 Jan 2019 10:15:57 +0000 (10:15 +0000)]
Auto merge of #57694 - pietroalbini:revert-beta-on-master, r=pietroalbini

Revert "Auto merge of #57670 - rust-lang:beta-next, r=Mark-Simulacrum"

For whatever reason bors merged this in master `:/`

r? @ghost

5 years agoRevert "Auto merge of #57670 - rust-lang:beta-next, r=Mark-Simulacrum"
Pietro Albini [Thu, 17 Jan 2019 09:48:10 +0000 (10:48 +0100)]
Revert "Auto merge of #57670 - rust-lang:beta-next, r=Mark-Simulacrum"

This reverts commit 722b4d695964906807b12379577bce5ee3d23e08, reversing
changes made to 956dba47d33fc8b2bdabcd50e5bfed264b570382.

5 years agoQuerify glob map usage (last use of CrateAnalysis)
Igor Matuszewski [Mon, 7 Jan 2019 10:46:44 +0000 (11:46 +0100)]
Querify glob map usage (last use of CrateAnalysis)

5 years agoRemove access level mention from DocContext
Igor Matuszewski [Mon, 7 Jan 2019 09:04:30 +0000 (10:04 +0100)]
Remove access level mention from DocContext

Leftover from https://github.com/rust-lang/rust/commit/c754e8240cfbeeaca1672c349eccba3d050f866c.

5 years agoAuto merge of #57520 - alexreg:tidy-copyright-lint, r=Mark-Simulacrum
bors [Thu, 17 Jan 2019 07:36:37 +0000 (07:36 +0000)]
Auto merge of #57520 - alexreg:tidy-copyright-lint, r=Mark-Simulacrum

Add lint for copyright headers to 'tidy' tool

r? @Mark-Simulacrum

CC @centril

5 years agoFix tidy errors.
Alexander Ronald Altman [Thu, 17 Jan 2019 05:03:29 +0000 (23:03 -0600)]
Fix tidy errors.

5 years agoAuto merge of #57670 - rust-lang:beta-next, r=Mark-Simulacrum
bors [Thu, 17 Jan 2019 05:00:14 +0000 (05:00 +0000)]
Auto merge of #57670 - rust-lang:beta-next, r=Mark-Simulacrum

Prepare beta 1.33.0

This PR includes the usual changes for a new beta, and suppresses a few lints on libcore: those lints are false positives caused by an internal attribute (`rustc_layout_scalar_valid_range_start`) and only happen on stage0.

r? @Mark-Simulacrum

5 years agoAdd test for linking non-existent static library
AB1908 [Thu, 17 Jan 2019 03:40:36 +0000 (03:40 +0000)]
Add test for linking non-existent static library

5 years agoAuto merge of #56869 - GuillaumeGomez:index-size-reduction, r=QuietMisdreavus
bors [Thu, 17 Jan 2019 02:12:17 +0000 (02:12 +0000)]
Auto merge of #56869 - GuillaumeGomez:index-size-reduction, r=QuietMisdreavus

Reduce search-index.js size

Coming from:

```
1735683 Dec 16 01:35 build/x86_64-apple-darwin/doc/search-index.js
```

to:

```
727755 Dec 16 01:51 build/x86_64-apple-darwin/doc/search-index.js
```

r? @QuietMisdreavus

5 years agoEnhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.
Alexander Ronald Altman [Thu, 17 Jan 2019 02:10:18 +0000 (20:10 -0600)]
Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.

5 years agoRemove `hir::StmtKind::Decl`.
Nicholas Nethercote [Wed, 16 Jan 2019 23:39:24 +0000 (10:39 +1100)]
Remove `hir::StmtKind::Decl`.

It's a level of indirection that hurts far more than it helps. The code
is simpler without it. (This commit cuts more than 120 lines of code.)

In particular, this commit removes some unnecessary `Span`s within
`DeclKind` that were always identical to those in the enclosing `Stmt`,
and some unnecessary allocations via `P`.

5 years agoEnd fixing search index minification
Guillaume Gomez [Sun, 13 Jan 2019 23:46:11 +0000 (00:46 +0100)]
End fixing search index minification

5 years agoMinify search-index in one pass
Guillaume Gomez [Thu, 10 Jan 2019 20:26:41 +0000 (21:26 +0100)]
Minify search-index in one pass

5 years agoReduce search-index.js size
Guillaume Gomez [Sun, 16 Dec 2018 01:35:39 +0000 (02:35 +0100)]
Reduce search-index.js size

5 years agoDocument Unpin in std::prelude documentation
Konrad Borowski [Wed, 16 Jan 2019 23:39:15 +0000 (00:39 +0100)]
Document Unpin in std::prelude documentation

5 years agoAuto merge of #57392 - Xanewok:always-calc-glob-map, r=petrochenkov
bors [Wed, 16 Jan 2019 23:25:41 +0000 (23:25 +0000)]
Auto merge of #57392 - Xanewok:always-calc-glob-map, r=petrochenkov

Always calculate glob map but only for glob uses

Previously calculating glob map was *opt-in*, however it did record node id -> ident use for every use directive. This aims to see if we can unconditionally calculate the glob map and not regress performance.

Main motivation is to get rid of some of the moving pieces and simplify the compilation interface - this would allow us to entirely remove `CrateAnalysis`. Later, we could easily expose a relevant query, similar to the likes of `maybe_unused_trait_import` (so using precomputed data from the resolver, but which could be rewritten to be on-demand).

r? @nikomatsakis

Local perf run showed mostly noise (except `ctfe-stress-*`) but I'd appreciate if we could do a perf run run here and double-check that this won't regress performance.

5 years agoFix error template
AB1908 [Wed, 16 Jan 2019 23:08:42 +0000 (23:08 +0000)]
Fix error template

5 years agoMake `hir::Stmt` a separate struct.
Nicholas Nethercote [Wed, 16 Jan 2019 22:45:02 +0000 (09:45 +1100)]
Make `hir::Stmt` a separate struct.

Benefits:

- It lets us move the `NodeId` field out of every `hir::StmtKind`
  variant `NodeId` to a more sensible spot.

- It eliminates sadness in `Stmt::fmt`.

- It makes `hir::Stmt` match `ast::Stmt`.

5 years ago[rustbuild] Rebuild std after changes to codegen backends
Josh Stone [Wed, 16 Jan 2019 21:13:58 +0000 (13:13 -0800)]
[rustbuild] Rebuild std after changes to codegen backends

Use `clear_if_dirty` on std for backend changes, just as we do for
changes to rustc itself, so new codegen is correctly applied to all
later compiler stages.

Fixes #48298.

5 years agoPrioritize variants as inherent associated items during name resolution
Vadim Petrochenkov [Thu, 10 Jan 2019 20:23:30 +0000 (23:23 +0300)]
Prioritize variants as inherent associated items during name resolution

5 years agoDon't explicitly increment the depth for new trait predicates
Aaron Hill [Wed, 16 Jan 2019 17:55:22 +0000 (12:55 -0500)]
Don't explicitly increment the depth for new trait predicates

5 years agoallow unused warnings related to rustc_layout_scalar_valid_range_start
Pietro Albini [Wed, 16 Jan 2019 16:55:23 +0000 (17:55 +0100)]
allow unused warnings related to rustc_layout_scalar_valid_range_start

5 years agoprepare beta 1.33.0
Pietro Albini [Wed, 16 Jan 2019 16:18:44 +0000 (17:18 +0100)]
prepare beta 1.33.0

5 years agoAuto merge of #57321 - petrochenkov:atokens, r=nikomatsakis
bors [Wed, 16 Jan 2019 15:01:20 +0000 (15:01 +0000)]
Auto merge of #57321 - petrochenkov:atokens, r=nikomatsakis

Implement basic input validation for built-in attributes

Correct top-level shape (`#[attr]` vs `#[attr(...)]` vs `#[attr = ...]`) is enforced for built-in attributes, built-in attributes must also fit into the "meta-item" syntax (aka the "classic attribute syntax").

For some subset of attributes (found by crater run), errors are lowered to deprecation warnings.

NOTE: This PR previously included https://github.com/rust-lang/rust/pull/57367 as well.

5 years agoWith this change, I am able to build and test cross-platform `rustc`
Felix S. Klock II [Wed, 16 Jan 2019 13:37:22 +0000 (14:37 +0100)]
With this change, I am able to build and test cross-platform `rustc`

In particular, I can use the following in my `config.toml`:

```
[build]
host = ["i686-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]
target = ["i686-unknown-linux-gnu", "x86_64-unknown-linux-gnu"]
```

Before this change, my attempt to run the test suite would fail
because the error output differs depending on what your host and
targets are.

----

To be concrete, here are the actual messages one can observe:

```
% ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused  --target=x86_64-unknown-linux-gnu
error: the type `std::option::Option<[u32; 35184372088831]>` is too big for the current architecture

error: aborting due to previous error

% ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused  --target=i686-unknown-linux-gnu
error: the type `std::option::Option<[u32; 536870911]>` is too big for the current architecture

error: aborting due to previous error

% ./build/i686-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused  --target=i686-unknown-linux-gnu
error: the type `std::option::Option<[u32; 536870911]>` is too big for the current architecture

error: aborting due to previous error

% ./build/i686-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused  --target=x86_64-unknown-linux-gnu
error: the type `[u32; 35184372088831]` is too big for the current architecture

error: aborting due to previous error
```

To address these variations, I changed the test to be more aggressive
in its normalization strategy. We cannot (and IMO should not)
guarantee that `Option` will appear in the error output here. So I
normalized both types `Option<[u32; N]>` and `[u32; N]` to just `TYPE`

5 years agoAuto merge of #57416 - alexcrichton:remove-platform-intrinsics, r=nagisa
bors [Wed, 16 Jan 2019 12:15:10 +0000 (12:15 +0000)]
Auto merge of #57416 - alexcrichton:remove-platform-intrinsics, r=nagisa

rustc: Remove platform intrinsics crate

This was originally attempted in #57048 but it was realized that we
could fully remove the crate via the `"unadjusted"` ABI on intrinsics.
This means that all intrinsics in stdsimd are implemented directly
against LLVM rather than using the abstraction layer provided here. That
ends up meaning that this crate is no longer used at all.

This crate developed long ago to implement the SIMD intrinsics, but we
didn't end up using it in the long run. In that case let's remove it!

5 years agoRemove trailing whitespace
AB1908 [Wed, 16 Jan 2019 06:29:44 +0000 (06:29 +0000)]
Remove trailing whitespace

5 years agoFix release manifest generation
Jethro Beekman [Wed, 16 Jan 2019 06:06:38 +0000 (11:36 +0530)]
Fix release manifest generation

5 years agoAdd regression test to close #53787
AB1908 [Wed, 16 Jan 2019 05:32:03 +0000 (05:32 +0000)]
Add regression test to close #53787

5 years agoRemove `hir::Label`.
Nicholas Nethercote [Wed, 16 Jan 2019 05:20:32 +0000 (16:20 +1100)]
Remove `hir::Label`.

It's identical to `ast::Label`.

5 years agoUse `Lit` rather than `P<Lit>` in `hir::ExprKind`.
Nicholas Nethercote [Wed, 16 Jan 2019 02:51:24 +0000 (13:51 +1100)]
Use `Lit` rather than `P<Lit>` in `hir::ExprKind`.

It's simpler and makes some benchmark run up to 1% faster. It also makes
`hir::ExprKind` more like `ast::ExprKind` (which underwent the
equivalent change in #55777).

5 years agoOSX: fix #57534 registering thread dtors while running thread dtors
tyler [Wed, 16 Jan 2019 04:09:06 +0000 (20:09 -0800)]
OSX: fix #57534 registering thread dtors while running thread dtors

5 years agoUpdated Book and Reference submodules.
Alexander Regueiro [Sun, 13 Jan 2019 15:43:09 +0000 (15:43 +0000)]
Updated Book and Reference submodules.

5 years agoAdd some links in std::fs.
Eric Huss [Wed, 16 Jan 2019 02:46:09 +0000 (18:46 -0800)]
Add some links in std::fs.

A few items were referenced, but did not have links.

5 years agodemonstrate symmetry
Corey Farwell [Wed, 16 Jan 2019 02:21:24 +0000 (21:21 -0500)]
demonstrate symmetry

5 years agomake the contribution doc reference the guide more; deduplication
mark [Wed, 16 Jan 2019 02:02:28 +0000 (20:02 -0600)]
make the contribution doc reference the guide more; deduplication

5 years agoFix tests
Yuki Okushi [Wed, 16 Jan 2019 00:28:26 +0000 (09:28 +0900)]
Fix tests

5 years agoCancel process
Yuki Okushi [Wed, 16 Jan 2019 00:28:06 +0000 (09:28 +0900)]
Cancel process

5 years agoAdd new literal type Err
Yuki Okushi [Wed, 16 Jan 2019 00:27:43 +0000 (09:27 +0900)]
Add new literal type Err

5 years agoupdate test output
mark [Tue, 15 Jan 2019 22:40:10 +0000 (16:40 -0600)]
update test output

5 years agoFixes text becoming invisible when element targetted
Guillaume Gomez [Tue, 15 Jan 2019 22:21:10 +0000 (23:21 +0100)]
Fixes text becoming invisible when element targetted

5 years agoMove spin_loop_hint to core::hint module
Clar Fon [Wed, 19 Dec 2018 21:43:29 +0000 (16:43 -0500)]
Move spin_loop_hint to core::hint module

5 years agoupdate/add tests
mark [Tue, 15 Jan 2019 17:31:49 +0000 (11:31 -0600)]
update/add tests

5 years agofix nested matchers with ?
mark [Mon, 14 Jan 2019 21:50:33 +0000 (15:50 -0600)]
fix nested matchers with ?

5 years agoAuto merge of #57629 - matthiaskrgr:clippy_submodule_upd, r=oli-obk
bors [Tue, 15 Jan 2019 18:41:42 +0000 (18:41 +0000)]
Auto merge of #57629 - matthiaskrgr:clippy_submodule_upd, r=oli-obk

submodules: update clippy from c63b6349 to 1b89724b

Changes:
````
Really fix issue number in `map_clone` test
Fix issue number in `map_clone` test
Remove `map_clone` fixed known problem
Fix `map_clone` bad suggestion
Add run-rustfix to unnecessary_fold
Add run-rustfix to unit_arg test
Add run-rustfix for types test
Add run-rustfix to starts_ends_with
Add run-rustfix to replace_const test
Add run-rustfix to redundant_field_names
Missing docs: don't require documenting Global Asm items.
Add run-rustfix for precedence test
Add run-rustfix to mem_replace test
Add run-rustfix to map_clone test
Add run-rustfix to large_digit_groups
Add run-rustfix to into_iter_on_ref
Add run-rustfix to infallible_destructuring_match
Add rustfix to inconsistent_digit_grouping test
Add run-rustfix to explicit_write test
Add run-rustfix to excessive_precision test
Add run-rustfix to duration_subsec test
Disable deprecated_cfg_attr lint for inner attributes
Add run-rustfix to collapsible_if test
Update Readme
Update Readme for (arguably) better readability
rustup: the features if_while_or_patterns has been stabilized
Fix comments in clippy_lints/src/len_zero.rs
readme: update travis badge to reflect migration from travis-ci.org to travis-ci.com
Remove all copyright license headers
Move cast_ref_to_mut list to correctness group
Rustftmt
Don't import ty::Ref in cast_ref_to_mut lint
Move a hint to an error message in cast_ref_to_mut lint
Add a note to cast_ref_to_mut lint
Use ty::Ref instead of ty::TyKind::Ref
cast_ref_to_mut lint
Add missing ` in default lint
Improve tests and exclude nested impls
Update `unwrap_get` code review suggestions
Update known problems
Restrict use_self on nested items
Improve `get_unwrap` suggestion
````

5 years agoFix sources sidebar not showing up
Guillaume Gomez [Tue, 15 Jan 2019 16:57:06 +0000 (17:57 +0100)]
Fix sources sidebar not showing up

5 years agoMake the query comment into a doc comment
Igor Matuszewski [Tue, 15 Jan 2019 16:44:41 +0000 (17:44 +0100)]
Make the query comment into a doc comment

5 years agouse structured macro and path resolve suggestions
Andy Russell [Tue, 15 Jan 2019 16:27:58 +0000 (11:27 -0500)]
use structured macro and path resolve suggestions

5 years agoRemove an unused function argument
Oliver Scherer [Tue, 15 Jan 2019 16:11:07 +0000 (17:11 +0100)]
Remove an unused function argument

5 years agoAuto merge of #57630 - Centril:rollup, r=Centril
bors [Tue, 15 Jan 2019 13:56:16 +0000 (13:56 +0000)]
Auto merge of #57630 - Centril:rollup, r=Centril

Rollup of 8 pull requests

Successful merges:

 - #56044 (Drop partially bound function parameters in the expected order)
 - #57352 (forbid manually impl'ing one of an object type's marker traits)
 - #57456 (RawVec doesn't always abort on allocation errors)
 - #57467 (Implement `check_attribute` to forbid `#[allow_internal_unsafe]`)
 - #57579 (Add core::iter::once_with())
 - #57587 (Add 'rustc-env:RUST_BACKTRACE=0' to const-pat-ice test)
 - #57608 (Simplify 'product' factorial example)
 - #57614 ([rustdoc] Fix crates filtering box not being filled)

Failed merges:

r? @ghost

5 years agoRollup merge of #57614 - GuillaumeGomez:fix-crate-filtering, r=QuietMisdreavus
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:14 +0000 (12:42 +0100)]
Rollup merge of #57614 - GuillaumeGomez:fix-crate-filtering, r=QuietMisdreavus

[rustdoc] Fix crates filtering box not being filled

Currently, the filter crate box (at the left of the search input) is always empty. To get the number of keys of dictionary in JS, you need to call `Object.keys()` on it.

r? @QuietMisdreavus

5 years agoRollup merge of #57608 - timvisee:master, r=frewsxcv
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:13 +0000 (12:42 +0100)]
Rollup merge of #57608 - timvisee:master, r=frewsxcv

Simplify 'product' factorial example

This simplifies the [`factorial(n: 32)`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#examples-46) implementation as example for the `Iterator::product()` function.
It currently uses unnecessary additional complexity.

Although very minimal, I do not want to include it in some other irrelevant PR.

5 years agoRollup merge of #57587 - Aaron1011:fix/const-pat-ice, r=alexcrichton
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:12 +0000 (12:42 +0100)]
Rollup merge of #57587 - Aaron1011:fix/const-pat-ice, r=alexcrichton

Add 'rustc-env:RUST_BACKTRACE=0' to const-pat-ice test

This ensures that the test passes, regardless of what the user has set
RUST_BACKTRACE to.

5 years agoRollup merge of #57579 - stjepang:once-with, r=SimonSapin
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:10 +0000 (12:42 +0100)]
Rollup merge of #57579 - stjepang:once-with, r=SimonSapin

Add core::iter::once_with()

Functions `iter::once()` and `iter::repeat()` construct iterators from values. The latter has the lazy variant `iter::repeat_with()`, but the former doesn't. This PR therefore adds `iter::once_with()`.

Another way to think of `iter::once_with()` is that it's a function that converts `FnOnce() -> T` into `Iterator<Item = T>`.

If this seems like a reasonable addition, I'll open a tracking issue and update the `#[feature(...)]` attributes.

5 years agoRollup merge of #57467 - JohnTitor:implement-the-check-attribute-1, r=oli-obk
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:08 +0000 (12:42 +0100)]
Rollup merge of #57467 - JohnTitor:implement-the-check-attribute-1, r=oli-obk

Implement `check_attribute` to forbid `#[allow_internal_unsafe]`

Fixes #56768.

r? @oli-obk

5 years agoRollup merge of #57456 - fintelia:patch-4, r=dtolnay
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:07 +0000 (12:42 +0100)]
Rollup merge of #57456 - fintelia:patch-4, r=dtolnay

RawVec doesn't always abort on allocation errors

5 years agoRollup merge of #57352 - arielb1:no-manual-markers, r=nikomatsakis
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:06 +0000 (12:42 +0100)]
Rollup merge of #57352 - arielb1:no-manual-markers, r=nikomatsakis

forbid manually impl'ing one of an object type's marker traits

This shouldn't break compatibility for crates that do not use
`feature(optin_builtin_traits)`, because as the test shows, it is
only possible to impl a marker trait for a trait object in the crate the
marker trait is defined in, which must define
`feature(optin_builtin_traits)`.

Fixes #56934.

r? @nikomatsakis

5 years agoRollup merge of #56044 - matthewjasper:function-param-drop-order, r=cramertj
Mazdak Farrokhzad [Tue, 15 Jan 2019 11:42:04 +0000 (12:42 +0100)]
Rollup merge of #56044 - matthewjasper:function-param-drop-order, r=cramertj

Drop partially bound function parameters in the expected order

Given the function

```rust
fn foo((_x, _): (LogDrop, LogDrop), (_, _y): (LogDrop, LogDrop)) {}
```

Prior to 1.12.0 we dropped both `_x` and `_y` before the rest of their
respective parameters, since then we dropped `_x` and `_y` after. The
original order appears to be the correct order, as the value created
later is dropped first, so we revert to that order and add a test for
it.

While this is technically a breaking change, I can't work out how
anyone could be relying on this without making their code very
brittle. If this is considered to be too likely to break real world code
then I can revert the change and change the test to check for the
current order.

5 years agoAuto merge of #57625 - drrlvn:patch-1, r=Centril
bors [Tue, 15 Jan 2019 11:18:24 +0000 (11:18 +0000)]
Auto merge of #57625 - drrlvn:patch-1, r=Centril

Stabilize FileExt::read_exact_at/write_all_at

r? alexcrichton

Closes #51984.

5 years agoQuerify entry_fn
Igor Matuszewski [Sun, 13 Jan 2019 12:06:26 +0000 (13:06 +0100)]
Querify entry_fn

5 years agosubmodules: update clippy from c63b6349 to 1b89724b
Matthias Krüger [Tue, 15 Jan 2019 09:40:11 +0000 (10:40 +0100)]
submodules: update clippy from c63b6349 to 1b89724b

Changes:
````
Really fix issue number in `map_clone` test
Fix issue number in `map_clone` test
Remove `map_clone` fixed known problem
Fix `map_clone` bad suggestion
Add run-rustfix to unnecessary_fold
Add run-rustfix to unit_arg test
Add run-rustfix for types test
Add run-rustfix to starts_ends_with
Add run-rustfix to replace_const test
Add run-rustfix to redundant_field_names
Missing docs: don't require documenting Global Asm items.
Add run-rustfix for precedence test
Add run-rustfix to mem_replace test
Add run-rustfix to map_clone test
Add run-rustfix to large_digit_groups
Add run-rustfix to into_iter_on_ref
Add run-rustfix to infallible_destructuring_match
Add rustfix to inconsistent_digit_grouping test
Add run-rustfix to explicit_write test
Add run-rustfix to excessive_precision test
Add run-rustfix to duration_subsec test
Disable deprecated_cfg_attr lint for inner attributes
Add run-rustfix to collapsible_if test
Update Readme
Update Readme for (arguably) better readability
rustup: the features if_while_or_patterns has been stabilized
Fix comments in clippy_lints/src/len_zero.rs
readme: update travis badge to reflect migration from travis-ci.org to travis-ci.com
Remove all copyright license headers
Move cast_ref_to_mut list to correctness group
Rustftmt
Don't import ty::Ref in cast_ref_to_mut lint
Move a hint to an error message in cast_ref_to_mut lint
Add a note to cast_ref_to_mut lint
Use ty::Ref instead of ty::TyKind::Ref
cast_ref_to_mut lint
Add missing ` in default lint
Improve tests and exclude nested impls
Update `unwrap_get` code review suggestions
Update known problems
Restrict use_self on nested items
Improve `get_unwrap` suggestion
````