]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #57101 - o01eg:fix-57014, r=alexcrichton
bors [Sat, 5 Jan 2019 12:21:44 +0000 (12:21 +0000)]
Auto merge of #57101 - o01eg:fix-57014, r=alexcrichton

Search codegen backends based on target libdir instead of sysroot

Fixes #57014

Fixes cases with custom libdir when it consists of two or more parts.

5 years agoAuto merge of #57099 - davidtwco:issue-57098, r=nikomatsakis
bors [Sat, 5 Jan 2019 09:41:04 +0000 (09:41 +0000)]
Auto merge of #57099 - davidtwco:issue-57098, r=nikomatsakis

NLL: Add closure cannot be moved note.

Fixes #57098.

This PR extends existing logic for checking whether a closure that
is `FnOnce` and therefore moves variables that it captures from the
environment has already been invoked when being invoked again.

Now, this logic will also check whether the closure is being moved after
previously being moved or invoked and add an appropriate note.

r? @pnkfelix

5 years agoAuto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakis
bors [Sat, 5 Jan 2019 03:36:31 +0000 (03:36 +0000)]
Auto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakis

Add support for trait-objects without a principal

The hard-error version of #56481 - should be merged after we do something about the `traitobject` crate.

Fixes #33140.
Fixes #57057.

r? @nikomatsakis

5 years agoAuto merge of #56145 - weiznich:re_rebalance_coherence, r=nikomatsakis
bors [Sat, 5 Jan 2019 00:49:12 +0000 (00:49 +0000)]
Auto merge of #56145 - weiznich:re_rebalance_coherence, r=nikomatsakis

Implement the Re-rebalance coherence RFC

This is the first time I touch anything in the compiler so just tell me if I got something wrong.

Big thanks to @sgrif for the pointers where to look for those things.
cc #55437

5 years agoAuto merge of #56079 - mark-i-m:patch-1, r=nikomatsakis
bors [Fri, 4 Jan 2019 22:14:13 +0000 (22:14 +0000)]
Auto merge of #56079 - mark-i-m:patch-1, r=nikomatsakis

Link to rustc guide

As proposed in https://github.com/rust-lang-nursery/rustc-guide/issues/239

5 years agoadd test for #57162
Ariel Ben-Yehuda [Fri, 4 Jan 2019 19:53:00 +0000 (21:53 +0200)]
add test for #57162

Fixes #57162.

5 years agoadd some debug logging to collect
Ariel Ben-Yehuda [Fri, 4 Jan 2019 13:27:55 +0000 (15:27 +0200)]
add some debug logging to collect

5 years agoAuto merge of #56897 - euclio:parse-fatal, r=estebank
bors [Fri, 4 Jan 2019 19:39:24 +0000 (19:39 +0000)]
Auto merge of #56897 - euclio:parse-fatal, r=estebank

make `panictry!` private to libsyntax

This commit completely removes usage of the `panictry!` macro from
outside libsyntax. The macro causes parse errors to be fatal, so using
it in libsyntax_ext caused parse failures *within* a syntax extension to
be fatal, which is probably not intended.

Furthermore, this commit adds spans to diagnostics emitted by empty
extensions if they were missing, à la #56491.

5 years agoAuto merge of #56723 - oli-obk:lazy_const, r=nikomatsakis
bors [Fri, 4 Jan 2019 17:01:24 +0000 (17:01 +0000)]
Auto merge of #56723 - oli-obk:lazy_const, r=nikomatsakis

Don't emit `Unevaluated` from `const_eval`

cc @eddyb @RalfJung

5 years agoAuto merge of #56074 - matthewjasper:forbid-recursive-impl-trait, r=nikomatsakis
bors [Fri, 4 Jan 2019 14:21:19 +0000 (14:21 +0000)]
Auto merge of #56074 - matthewjasper:forbid-recursive-impl-trait, r=nikomatsakis

Forbid recursive impl trait

There is no type T, such that `T = [T; 2]`, but impl Trait could sometimes
be to circumvented this.

This patch makes it a hard error for an opaque type to resolve to such a
"type". Before this can be merged it needs

- [x] A better error message - it's good enough for now.
- [x] A crater run (?) to see if this any real-world code

closes #47659

5 years agoalphabetize marker traits when printed
Ariel Ben-Yehuda [Fri, 4 Jan 2019 13:09:09 +0000 (15:09 +0200)]
alphabetize marker traits when printed

This makes sure they are printed in a compiler-version-independent
order, avoiding ui test instability.

5 years agoAuto merge of #55986 - cjgillot:issue-45510, r=nikomatsakis
bors [Fri, 4 Jan 2019 11:51:30 +0000 (11:51 +0000)]
Auto merge of #55986 - cjgillot:issue-45510, r=nikomatsakis

Allow to dispatch fn traits depending on number of parameters

Hello,

By following @eddyb's advise on issue #45510, I managed to have the snippets of code in #45510 and #18952 passing without breaking older diagnostics.

EDIT: the codegen tests breakage I experienced is due to the poor quality of my laptop.

If any kind reviewer has any advice, you are very welcome.

5 years agoUpdate tests changed by rebase
Georg Semmler [Fri, 4 Jan 2019 09:19:22 +0000 (10:19 +0100)]
Update tests changed by rebase

5 years agoAuto merge of #57315 - ehuss:update-cargo, r=alexcrichton
bors [Fri, 4 Jan 2019 09:10:13 +0000 (09:10 +0000)]
Auto merge of #57315 - ehuss:update-cargo, r=alexcrichton

Update cargo

24 commits in 0d1f1bbeabd5b43a7f3ecfa16540af8e76d5efb4..34320d212dca8cd27d06ce93c16c6151f46fcf2e
2018-12-19 14:45:14 +0000 to 2019-01-03 19:12:38 +0000
- Display environment variables for rustc commands (rust-lang/cargo#6492)
- Fix a very minor race condition in `cargo fix`. (rust-lang/cargo#6515)
- Add a high-level overview of how `fix` works. (rust-lang/cargo#6516)
- Add dependency `registry` to `cargo metadata`. (rust-lang/cargo#6500)
- Fix fingerprint calculation for patched deps. (rust-lang/cargo#6493)
- serialize version directly (rust-lang/cargo#6512)
- use DYLD_FALLBACK_LIBRARY_PATH for dylib_path_envvar on macOS (rust-lang/cargo#6355)
- Fix error message when resolving dependencies (rust-lang/cargo#6510)
- use PathBuf in cargo metadata (rust-lang/cargo#6511)
- Fixed link to testsuite in CONTRIBUTING.md (rust-lang/cargo#6506)
- Update display of contents of Cargo.toml (rust-lang/cargo#6501)
- Update display of contents of Cargo.toml (rust-lang/cargo#6502)
- Fixup cargo install's help message (rust-lang/cargo#6495)
- testsuite: Require failing commands to check output. (rust-lang/cargo#6497)
- Delete unnecessary 'return' (rust-lang/cargo#6496)
- Fix new unused patch warning. (rust-lang/cargo#6494)
- Some minor documentation changes. (rust-lang/cargo#6481)
- Add `links` to `cargo metadata`. (rust-lang/cargo#6480)
- Salvaged semver work (rust-lang/cargo#6476)
- Warn on unused patches. (rust-lang/cargo#6470)
- don't write a an incorrect rustc version to the fingerprint file (rust-lang/cargo#6473)
- Rewrite `login` and registry cleanups. (rust-lang/cargo#6466)
- [issue#6461] Fix cargo commands list (rust-lang/cargo#6462)
- Restrict registry names to same style as package names. (rust-lang/cargo#6469)

5 years agoAuto merge of #56958 - alexcrichton:upgrade-docker, r=kennytm
bors [Fri, 4 Jan 2019 04:34:13 +0000 (04:34 +0000)]
Auto merge of #56958 - alexcrichton:upgrade-docker, r=kennytm

ci: Upgrade Travis to Xenial

In theory we shouldn't require trusty so long as docker continues to
work!

5 years agoimplement a hack to make traitobject 0.1.0 compile
Ariel Ben-Yehuda [Thu, 3 Jan 2019 21:46:46 +0000 (23:46 +0200)]
implement a hack to make traitobject 0.1.0 compile

5 years agoRevert "add coherence future-compat warnings for marker-only trait objects"
Ariel Ben-Yehuda [Tue, 1 Jan 2019 21:53:52 +0000 (23:53 +0200)]
Revert "add coherence future-compat warnings for marker-only trait objects"

This reverts commit 760639635facb6c9a0926ac9278bcba71880b0b3.

5 years agoRevert "fix stupid bug"
Ariel Ben-Yehuda [Tue, 1 Jan 2019 21:22:37 +0000 (23:22 +0200)]
Revert "fix stupid bug"

This reverts commit 6e4b2b3ae79770c7ccfcdbfc90dc34fe47ec5f09.

5 years agoadd comment to <List<ExistentialPredicates>>::principal
Ariel Ben-Yehuda [Mon, 17 Dec 2018 22:50:58 +0000 (00:50 +0200)]
add comment to <List<ExistentialPredicates>>::principal

5 years agohack-fix to rustdoc
Ariel Ben-Yehuda [Sat, 15 Dec 2018 15:35:55 +0000 (17:35 +0200)]
hack-fix to rustdoc

5 years agoadd tests
Ariel Ben-Yehuda [Sat, 15 Dec 2018 01:21:00 +0000 (03:21 +0200)]
add tests

5 years agofix ppaux
Ariel Ben-Yehuda [Fri, 14 Dec 2018 23:52:50 +0000 (01:52 +0200)]
fix ppaux

5 years agoavoid giving a principal to marker-only trait objects
Ariel Ben-Yehuda [Tue, 4 Dec 2018 13:17:35 +0000 (15:17 +0200)]
avoid giving a principal to marker-only trait objects

Fixes #33140.

5 years agoadd support for principal-less trait object types
Ariel Ben-Yehuda [Tue, 4 Dec 2018 11:28:06 +0000 (13:28 +0200)]
add support for principal-less trait object types

should be a pure refactoring.

5 years agoForbid impl Trait from referring to unnamable recursive types
Matthew Jasper [Sun, 18 Nov 2018 18:33:44 +0000 (18:33 +0000)]
Forbid impl Trait from referring to unnamable recursive types

There is no type T, such that `T = [T; 2]`, we should not allow this
to be circumvented by impl Trait.

5 years agoMore test deduplication
Georg Semmler [Thu, 3 Jan 2019 12:25:49 +0000 (13:25 +0100)]
More test deduplication

5 years agoAdd missing files
Georg Semmler [Sat, 29 Dec 2018 01:13:06 +0000 (02:13 +0100)]
Add missing files

5 years agoFix typo
Georg Semmler [Fri, 28 Dec 2018 23:51:26 +0000 (00:51 +0100)]
Fix typo

5 years agoUnify tests
Georg Semmler [Fri, 28 Dec 2018 23:11:13 +0000 (00:11 +0100)]
Unify tests

Implement compile tests as variants of existing tests

5 years agoUpdate some new tests to changed error messages
Georg Semmler [Fri, 14 Dec 2018 14:06:03 +0000 (15:06 +0100)]
Update some new tests to changed error messages

5 years agoFix failing compile tests
Georg Semmler [Fri, 14 Dec 2018 11:18:29 +0000 (12:18 +0100)]
Fix failing compile tests

5 years agoDirectly check if input_ty is a type parameter and therefore a
Georg Semmler [Fri, 23 Nov 2018 09:45:17 +0000 (10:45 +0100)]
Directly check if input_ty is a type parameter and therefore a
uncoverd type

5 years agoUpdate src/doc/unstable-book/src/language-features/re-rebalance-coherence.md
varkor [Thu, 22 Nov 2018 22:00:19 +0000 (22:00 +0000)]
Update src/doc/unstable-book/src/language-features/re-rebalance-coherence.md

Co-Authored-By: weiznich <Georg_semmler_05@web.de>
5 years agoFix tidy
Georg Semmler [Wed, 21 Nov 2018 23:14:35 +0000 (00:14 +0100)]
Fix tidy

5 years agoAdd some docs about the new feature to the unstable book
Georg Semmler [Wed, 21 Nov 2018 20:37:09 +0000 (21:37 +0100)]
Add some docs about the new feature to the unstable book

5 years agoAdd some tests
Georg Semmler [Wed, 21 Nov 2018 20:35:56 +0000 (21:35 +0100)]
Add some tests

This copies and adjusts the existing coherence tests to ensure that
they continue to work using the new implementation.

5 years agoImplement the re-rebalance coherence rfc
Georg Semmler [Tue, 20 Nov 2018 22:37:19 +0000 (23:37 +0100)]
Implement the re-rebalance coherence rfc

5 years agoUpdate cargo
Eric Huss [Thu, 3 Jan 2019 20:59:54 +0000 (12:59 -0800)]
Update cargo

5 years agoDisplay `impl Sized` correctly
Matthew Jasper [Wed, 14 Nov 2018 22:24:22 +0000 (22:24 +0000)]
Display `impl Sized` correctly

It used to display as just `impl`

5 years agoci: Upgrade Travis to Xenial
Alex Crichton [Tue, 18 Dec 2018 21:32:09 +0000 (13:32 -0800)]
ci: Upgrade Travis to Xenial

In theory we shouldn't require trusty so long as docker continues to
work!

5 years agoAuto merge of #55517 - nikomatsakis:universes, r=scalexm
bors [Thu, 3 Jan 2019 17:18:15 +0000 (17:18 +0000)]
Auto merge of #55517 - nikomatsakis:universes, r=scalexm

Universes

This PR transitions the compiler to use **universes** instead of the **leak-check**. It is marked as [WIP] for a few reasons:

- The diagnostics at present are terrible =)
- This changes the behavior of coherence, regressing some things that used to compile

The goals of this PR at present are:

- To start getting some eyes on the code
- To do a crater run
- To see the full travis results (due to https://github.com/rust-lang/rust/issues/52452, I am not able to run the full test suite locally anymore at present)

The first few commits in the PR are changing how `evaluate` treats regions. We now track whether region comparisons occurred, reverting the "staticized" query approach that @arielb1 put in. The problem with "staticized" queries is that it relied on the leak-check to get higher-ranked things correct, and we are removing the leak-check in this PR series, so that caused problems.

You can see at the end a collection of test updates. Mostly we behave the same but with atrocious diagnostics, but there are a number of cases where we used to error and now no longer do, as well as single case where we used to **not** error but we now do (the coherence-subtyping change).

(Note: it would be possible to do a version of leak-check that propagates universe information and recover the old behavior. I am reluctant to do so because I'd like to leave us room to get more precise -- e.g., I want to eventually handle things like `exists<'a> { for<'b> { if ('a: 'b) { 'a: 'b } } }` which presently the leak-check cannot cope with etc. Also because it seems more consistent to me: most folks I've talked to expect the new behavior and are surprised to learn that binding sites were so significant before when it comes to coherence. One question is, though, to what extent are people relying on this in the wild?)

5 years agoAuto merge of #56507 - nikomatsakis:polonius-integrate, r=MatthewJasper
bors [Thu, 3 Jan 2019 12:42:16 +0000 (12:42 +0000)]
Auto merge of #56507 - nikomatsakis:polonius-integrate, r=MatthewJasper

polonius tweaks

- bump polonius to 0.6.0
- fix 2-phase-borrow activations

r? @matthewjasper

5 years agoAuto merge of #57282 - matthewjasper:wellformed-return-ty, r=nikomatsakis
bors [Thu, 3 Jan 2019 03:48:12 +0000 (03:48 +0000)]
Auto merge of #57282 - matthewjasper:wellformed-return-ty, r=nikomatsakis

Wf-check the output type of a function in MIR-typeck

Closes #57265

cc @scalexm

5 years agorename `type_moves_by_default` to `type_is_copy_modulo_regions`
Niko Matsakis [Tue, 20 Nov 2018 16:59:06 +0000 (11:59 -0500)]
rename `type_moves_by_default` to `type_is_copy_modulo_regions`

5 years agotry to detect affected code and direct people to #56105
Niko Matsakis [Tue, 20 Nov 2018 16:20:05 +0000 (11:20 -0500)]
try to detect affected code and direct people to #56105

5 years agotrack if any region constraints involved placeholders
Niko Matsakis [Tue, 20 Nov 2018 15:24:38 +0000 (10:24 -0500)]
track if any region constraints involved placeholders

5 years agopacify the mercilous eddyb ;)
Niko Matsakis [Mon, 19 Nov 2018 16:57:22 +0000 (11:57 -0500)]
pacify the mercilous eddyb ;)

5 years agoadd some comments about lifetimes etc
Niko Matsakis [Mon, 19 Nov 2018 15:56:24 +0000 (10:56 -0500)]
add some comments about lifetimes etc

5 years agoaddress tmandry nits
Niko Matsakis [Mon, 19 Nov 2018 15:47:34 +0000 (10:47 -0500)]
address tmandry nits

5 years agopacify the mercilous tidy
Niko Matsakis [Mon, 19 Nov 2018 15:29:50 +0000 (10:29 -0500)]
pacify the mercilous tidy

5 years agoimprove handling for subtype
Niko Matsakis [Mon, 19 Nov 2018 15:26:04 +0000 (10:26 -0500)]
improve handling for subtype

Still not great, but good enough to land this PR.

5 years agosay "the lifetime" instead of "some lifetime" when it feels right
Niko Matsakis [Mon, 19 Nov 2018 00:13:37 +0000 (19:13 -0500)]
say "the lifetime" instead of "some lifetime" when it feels right

In particular, when we want to indicate that there is a connection
between the self type and the other types.

5 years agoapply the same logic to ConcreteFailure errors
Niko Matsakis [Mon, 19 Nov 2018 00:07:38 +0000 (19:07 -0500)]
apply the same logic to ConcreteFailure errors

5 years agorefactor highlighting to take any RegionKind, making it more general
Niko Matsakis [Sun, 18 Nov 2018 20:25:57 +0000 (15:25 -0500)]
refactor highlighting to take any RegionKind, making it more general

5 years agoapply the new placeholder errors even with just one placeholder
Niko Matsakis [Sun, 18 Nov 2018 18:25:53 +0000 (13:25 -0500)]
apply the new placeholder errors even with just one placeholder

5 years agointroduce placeholder-placeholder errors for trait matching
Niko Matsakis [Sat, 17 Nov 2018 13:18:37 +0000 (08:18 -0500)]
introduce placeholder-placeholder errors for trait matching

5 years agoadd the ability to highlight placeholders
Niko Matsakis [Sat, 17 Nov 2018 12:03:26 +0000 (07:03 -0500)]
add the ability to highlight placeholders

5 years agogeneralize region highlights into a struct
Niko Matsakis [Sat, 17 Nov 2018 11:27:44 +0000 (06:27 -0500)]
generalize region highlights into a struct

5 years agodump out the exact state in error reporting debugs
Niko Matsakis [Sat, 17 Nov 2018 11:10:30 +0000 (06:10 -0500)]
dump out the exact state in error reporting debugs

5 years agomake `get_highlight_region_for_regionvid` only affect re-vid
Niko Matsakis [Sat, 17 Nov 2018 00:13:55 +0000 (19:13 -0500)]
make `get_highlight_region_for_regionvid` only affect re-vid

In NLL, ReVid is all there is, but I might want to repurpose.

5 years agoremove outdated `rustc_driver` tests
Niko Matsakis [Wed, 31 Oct 2018 17:20:48 +0000 (13:20 -0400)]
remove outdated `rustc_driver` tests

they are subsumed by `hr-subtype/hr-subtype.rs` and other tests

5 years agoWIP other test changes
Niko Matsakis [Mon, 31 Dec 2018 18:45:48 +0000 (13:45 -0500)]
WIP other test changes

5 years agotests: cases where we now do the right thing but did not before
Niko Matsakis [Mon, 31 Dec 2018 18:45:40 +0000 (13:45 -0500)]
tests: cases where we now do the right thing but did not before

Fixes #33684

5 years agotests: worse diagnostics, but basically same errors
Niko Matsakis [Tue, 30 Oct 2018 20:57:52 +0000 (16:57 -0400)]
tests: worse diagnostics, but basically same errors

5 years agotests: move coherence-subtyping from run-pass to compile-fail
Niko Matsakis [Tue, 30 Oct 2018 20:39:29 +0000 (16:39 -0400)]
tests: move coherence-subtyping from run-pass to compile-fail

This is the pattern we no longer accept.

5 years agoadd tests exercising `exists<'a> { forall<'b> { .. } }` pattern
Niko Matsakis [Tue, 30 Oct 2018 20:38:50 +0000 (16:38 -0400)]
add tests exercising `exists<'a> { forall<'b> { .. } }` pattern

Amazingly, this scenario was not tested for trait matching.

5 years agouniverse transition
Niko Matsakis [Sat, 8 Sep 2018 00:11:23 +0000 (20:11 -0400)]
universe transition

Remove the leak-check and its associated machinery. Replace with
making the solver aware of universes.

5 years agoWIP: wfcheck ability to detect
Niko Matsakis [Thu, 27 Dec 2018 15:23:02 +0000 (10:23 -0500)]
WIP: wfcheck ability to detect

5 years agoselect.rs: unsizing coercion should use a subtype
Niko Matsakis [Thu, 27 Dec 2018 15:22:55 +0000 (10:22 -0500)]
select.rs: unsizing coercion should use a subtype

When we coerce `dyn Foo` to `dyn Bar`, that is OK as long as `Foo` is
usable in all contexts where `Bar` is usable (hence using the source
must be a subtype of the target).

This is needed for the universe-based code to handle
`old-lub-glb-object`; that test used to work sort of by accident
before with the old code.

5 years agointroduce ability to detect region constraints from snapshot
Niko Matsakis [Tue, 16 Oct 2018 09:42:18 +0000 (05:42 -0400)]
introduce ability to detect region constraints from snapshot

5 years agomake evaluation track whether outlives relationships mattered
Niko Matsakis [Thu, 20 Sep 2018 17:56:11 +0000 (13:56 -0400)]
make evaluation track whether outlives relationships mattered

Previously, evaluation ignored outlives relationships. Since we using
evaluation to skip the "normal" trait selection (which enforces
outlives relationships) this led to incorrect results in some cases.

5 years agoremove wrapper functions that had no purpose
Niko Matsakis [Mon, 15 Oct 2018 21:28:37 +0000 (17:28 -0400)]
remove wrapper functions that had no purpose

5 years agoremove `commit_if_ok` wrapper
Niko Matsakis [Mon, 15 Oct 2018 21:20:10 +0000 (17:20 -0400)]
remove `commit_if_ok` wrapper

5 years agoAdd missing 'static bound for the Machine trait
Matthew Jasper [Wed, 2 Jan 2019 21:28:08 +0000 (21:28 +0000)]
Add missing 'static bound for the Machine  trait

5 years agoWf-check the output type of a function in MIR-typeck
Matthew Jasper [Wed, 2 Jan 2019 20:00:56 +0000 (20:00 +0000)]
Wf-check the output type of a function in MIR-typeck

5 years agoadopt polonius-engine 0.6.2
Niko Matsakis [Wed, 2 Jan 2019 19:45:22 +0000 (14:45 -0500)]
adopt polonius-engine 0.6.2

Also datafrog 2.0.1, which works around a rustdoc bug

5 years agogenerate invalidations from 2-phase-borrow activations
Niko Matsakis [Tue, 4 Dec 2018 15:03:34 +0000 (10:03 -0500)]
generate invalidations from 2-phase-borrow activations

5 years agomake `panictry!` private to libsyntax
Andy Russell [Tue, 4 Dec 2018 19:10:32 +0000 (14:10 -0500)]
make `panictry!` private to libsyntax

This commit completely removes usage of the `panictry!` macro from
outside libsyntax. The macro causes parse errors to be fatal, so using
it in libsyntax_ext caused parse failures *within* a syntax extension to
be fatal, which is probably not intended.

Furthermore, this commit adds spans to diagnostics emitted by empty
extensions if they were missing, à la #56491.

5 years agoAuto merge of #57243 - dingelish:master, r=sfackler
bors [Wed, 2 Jan 2019 15:09:41 +0000 (15:09 +0000)]
Auto merge of #57243 - dingelish:master, r=sfackler

Bound sgx target_env with fortanix as target_vendor

This PR adds `target_vendor` check, as discussed in issue [57231](https://github.com/rust-lang/rust/issues/57231)

Signed-off-by: Yu Ding <dingelish@gmail.com>
5 years agoAuto merge of #57250 - codeworm96:tyerr_msg, r=varkor
bors [Wed, 2 Jan 2019 11:59:15 +0000 (11:59 +0000)]
Auto merge of #57250 - codeworm96:tyerr_msg, r=varkor

Improve type mismatch error messages

Closes #56115.

Replace "integral variable" with "integer" and replace "floating-point variable" with "floating-point number" to make the message less confusing.

TODO the book and clippy needs to be changed accordingly later.

r? @varkor

5 years agoAuto merge of #57251 - petrochenkov:reregr, r=varkor
bors [Wed, 2 Jan 2019 09:24:10 +0000 (09:24 +0000)]
Auto merge of #57251 - petrochenkov:reregr, r=varkor

syntax: Fix regression in diagnostics for patterns in trait method parameters

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

5 years agoAuto merge of #56827 - faern:eliminate-recv-timeout-panic, r=KodrAus
bors [Wed, 2 Jan 2019 02:03:15 +0000 (02:03 +0000)]
Auto merge of #56827 - faern:eliminate-recv-timeout-panic, r=KodrAus

Eliminate Receiver::recv_timeout panic

Fixes #54552.

This panic is because `recv_timeout` uses `Instant::now() + timeout` internally. This possible panic is not mentioned in the documentation for this method.

Very recently we merged (still unstable) support for checked addition (#56490) of `Instant + Duration`, so it's now finally possible to add these together without risking a panic.

5 years agoAuto merge of #57209 - estebank:suggest-raw-ident, r=petrochenkov
bors [Tue, 1 Jan 2019 23:30:34 +0000 (23:30 +0000)]
Auto merge of #57209 - estebank:suggest-raw-ident, r=petrochenkov

Suggest using raw identifiers in 2018 edition when using keywords

5 years agoMerge remote-tracking branch 'upstream/master'
Yu Ding [Tue, 1 Jan 2019 22:55:33 +0000 (14:55 -0800)]
Merge remote-tracking branch 'upstream/master'

5 years agosyntax: Fix regression in diagnostics for patterns in trait method parameters
Vadim Petrochenkov [Tue, 1 Jan 2019 16:14:00 +0000 (19:14 +0300)]
syntax: Fix regression in diagnostics for patterns in trait method parameters

5 years agoAuto merge of #57125 - doitian:inconsistent-clone-doc, r=bluss
bors [Tue, 1 Jan 2019 20:50:13 +0000 (20:50 +0000)]
Auto merge of #57125 - doitian:inconsistent-clone-doc, r=bluss

Fix inconsistent Clone documentation.

Now, arrays of any size Clone if the element type is Clone. So remove the
the document that uses this as an example.

refs #57123

5 years agoRemove min_const_unsafe_fn since it is stable
Yu Ding [Tue, 1 Jan 2019 19:49:54 +0000 (11:49 -0800)]
Remove min_const_unsafe_fn since it is stable

Signed-off-by: Yu Ding <dingelish@gmail.com>
5 years agoCheck the correct arena
Oliver Scherer [Fri, 28 Dec 2018 20:09:47 +0000 (21:09 +0100)]
Check the correct arena

5 years agoRemove unused function
Oliver Scherer [Fri, 28 Dec 2018 19:45:51 +0000 (20:45 +0100)]
Remove unused function

5 years agoMacrofy more `Lift` impls
Oliver Scherer [Fri, 28 Dec 2018 19:30:06 +0000 (20:30 +0100)]
Macrofy more `Lift` impls

5 years agoProperly lift `Allocations`
Oliver Scherer [Fri, 28 Dec 2018 11:55:26 +0000 (12:55 +0100)]
Properly lift `Allocations`

5 years agowhat is going on?
Oliver Scherer [Thu, 27 Dec 2018 14:21:47 +0000 (15:21 +0100)]
what is going on?

5 years agoGit is drunk
Oliver Scherer [Sun, 23 Dec 2018 13:08:04 +0000 (14:08 +0100)]
Git is drunk

5 years agorebase fallout
Oliver Scherer [Sat, 15 Dec 2018 10:29:52 +0000 (11:29 +0100)]
rebase fallout

5 years agoPacify tidy
Oliver Scherer [Thu, 13 Dec 2018 11:20:29 +0000 (12:20 +0100)]
Pacify tidy

5 years agoUndo a few - now unnecessary - changes
Oliver Scherer [Thu, 13 Dec 2018 10:19:34 +0000 (11:19 +0100)]
Undo a few - now unnecessary - changes

5 years agoSimplify bit inspection of a constant
Oliver Scherer [Thu, 13 Dec 2018 10:15:18 +0000 (11:15 +0100)]
Simplify bit inspection of a constant

5 years ago`<&'tcx ty::Const as Deref>::deref`
Oliver Scherer [Thu, 13 Dec 2018 10:11:12 +0000 (11:11 +0100)]
`<&'tcx ty::Const as Deref>::deref`

5 years ago`const_to_op` is now `lazy_const_to_op`
Oliver Scherer [Thu, 13 Dec 2018 09:04:28 +0000 (10:04 +0100)]
`const_to_op` is now `lazy_const_to_op`

5 years agoAdd `unwrap_usize` to `LazyConst`, too
Oliver Scherer [Thu, 13 Dec 2018 08:34:23 +0000 (09:34 +0100)]
Add `unwrap_usize` to `LazyConst`, too