Commit Graph

88946 Commits

Author SHA1 Message Date
Simon Sapin
fb5d3c1f37 Stabilize Any::get_type_id and rename to type_id
FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749
2019-01-22 14:25:27 +01:00
Mazdak Farrokhzad
dec7b7b131
Rollup merge of #57813 - RalfJung:validation-range-printing, r=oli-obk
fix validation range printing when encountering undef
2019-01-22 12:20:36 +01:00
Mazdak Farrokhzad
e3849cc8c9
Rollup merge of #57809 - MikaelUrankar:powerpc64-unknown-freebsd, r=nagisa
Add powerpc64-unknown-freebsd

FreeBSD review: https://reviews.freebsd.org/D18367
2019-01-22 12:20:34 +01:00
Mazdak Farrokhzad
8c551155d9
Rollup merge of #57798 - hellow554:master, r=davidtwco
Corrected spelling inconsistency

resolves #57773
2019-01-22 12:20:33 +01:00
Mazdak Farrokhzad
892e6930ce
Rollup merge of #57791 - estebank:issue-54582, r=zackmdavis
Add regression test for #54582

Fix #54582.
2019-01-22 12:20:32 +01:00
Mazdak Farrokhzad
973e754fc4
Rollup merge of #57677 - dotdash:locals, r=michaelwoerister
const_eval: Predetermine the layout of all locals when pushing a stack frame

Usually the layout of any locals is required at least three times, once
when it becomes live, once when it is written to, and once it is read
from. By adding a cache for them, we can reduce the number of layout
queries speeding up code that is heavy on const_eval.
2019-01-22 12:20:31 +01:00
Mazdak Farrokhzad
7fb44e8604
Rollup merge of #57667 - ishitatsuyuki:p-leak, r=nnethercote
Fix memory leak in P::filter_map

Probably this function isn't widely used, but anyway this wasn't working as intended.

r? @eddyb

Do not rollup if you want to see if max-rss change in perf.
2019-01-22 12:20:29 +01:00
Mazdak Farrokhzad
ad55b73da1
Rollup merge of #57604 - alercah:str-index, r=sfackler
Make `str` indexing generic on `SliceIndex`.

Fixes #55603
2019-01-22 12:20:28 +01:00
Mazdak Farrokhzad
e3d3cff019
Rollup merge of #57552 - GuillaumeGomez:default-images, r=QuietMisdreavus
Default images

Add default rust logo (the image at the top of the sidebar) and default favicon. No more missing image or inexistent icon on the documentation tabs!

r? @QuietMisdreavus
2019-01-22 12:20:27 +01:00
Mazdak Farrokhzad
e437861d27
Rollup merge of #57537 - sinkuu:fmt_perf, r=alexcrichton
Small perf improvement for fmt

Added benchmark is based on #10761
2019-01-22 12:20:23 +01:00
bors
76c87a166f Auto merge of #56221 - estebank:remove-dummy-checks, r=varkor
Remove unnecessary dummy span checks

The emitter already verifies wether a given span note or span label
can be emitted to the output. If it can't, because it is a dummy
span, it will be either elided for labels or emitted as an unspanned
note/help when applicable.
2019-01-22 10:59:09 +00:00
danielhenrymantilla
86d5cb4110
Fixed Deref coercion explanation for DerefMut using shared references 2019-01-22 11:30:59 +01:00
gnzlbg
785f529d6e Add intrinsic to create an integer bitmask from the MSB of integer vectors 2019-01-22 09:39:09 +01:00
bors
70015373b4 Auto merge of #57821 - RalfJung:miri, r=oli-obk
update miri

r? @oli-obk
2019-01-22 08:24:58 +00:00
James Duley
9aa1ca2f46 Ignore aarch64 in simd-intrinsic-generic-reduction
This fails on AArch64 see https://github.com/rust-lang/rust/issues/54510
2019-01-22 08:20:37 +00:00
Marcel Hellwig
051835b903 Corrected spelling inconsistency
resolves #57773
2019-01-22 09:08:52 +01:00
bors
8e9774ffcf Auto merge of #57475 - SimonSapin:signed, r=estebank
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.
2019-01-22 05:42:11 +00:00
varkor
f077990ed4
Fix typo
Co-Authored-By: estebank <estebank@users.noreply.github.com>
2019-01-21 15:53:56 -08:00
varkor
1d6e5e7108
Fix typo
Co-Authored-By: estebank <estebank@users.noreply.github.com>
2019-01-21 15:53:45 -08:00
Esteban Küber
4745b86202 Accept more invalid code that is close to correct fields 2019-01-21 15:47:23 -08:00
David Wood
914d142c02
Extend trailing > detection for paths.
This commit extends the trailing `>` detection to also work for paths
such as `Foo::<Bar>>:Baz`.

This involves making the existing check take the token that is expected
to follow the path being checked as a parameter.

Care is taken to ensure that this only happens on the construction of a
whole path segment and not a partial path segment (during recursion).

Through this enhancement, it was also observed that the ordering of
right shift token and greater than tokens was overfitted to the examples
being tested.

In practice, given a sequence of `>` characters: `>>>>>>>>>`
..then they will be split into `>>` eagerly: `>> >> >> >> >`.
..but when a `<` is prepended, then the first `>>` is split:
`<T> > >> >> >> >`
..and then when another `<` is prepended, a right shift is first again:
`Vec<<T>> >> >> >> >`

In the previous commits, a example that had two `<<` characters was
always used and therefore it was incorrectly assumed that `>>` would
always be first - but when there is a single `<`, this is not the case.
2019-01-22 00:35:31 +01:00
Esteban Küber
ab2479b00d Move logic to its own method 2019-01-21 15:13:59 -08:00
bors
51cc3cdcf0 Auto merge of #55009 - oli-obk:const_safety, r=RalfJung
Make raw ptr ops unsafe in const contexts

r? @RalfJung

cc @Centril
2019-01-21 23:10:11 +00:00
David Wood
3f0fc9b035
Pluralize error messages.
This commit pluralizes error messages when more than a single trailing
`>` character is present.
2019-01-21 22:42:54 +01:00
David Wood
6c399d155c
Add error for trailing angle brackets.
This commit adds a error (and accompanying machine applicable
suggestion) for trailing angle brackets on function calls with a
turbofish.
2019-01-21 22:42:54 +01:00
Ralf Jung
e7998bf6a6 un-deprecate mem::zeroed 2019-01-21 22:30:52 +01:00
Ralf Jung
2aa52035d5 update miri 2019-01-21 22:25:02 +01:00
Ralf Jung
400e28d27a fix validation range printing when encountering undef 2019-01-21 19:08:47 +01:00
Your Name
58b02000c5 Add powerpc64-unknown-freebsd 2019-01-21 18:50:54 +01:00
Simon Sapin
e195ce654a Fix some non-determinism in help messages for E0277 errors.
The diagnostic for this error prints `the following implementations
were found` followed by the first N relevant impls, sorted.

This commit makes the sort happen before slicing,
so that the set of impls being printed is deterministic
when the input is not.
2019-01-21 18:41:53 +01:00
Jethro Beekman
6abba95045 Update libunwind for SGX target 2019-01-21 22:01:42 +05:30
Jethro Beekman
fcb3d0d6ae Expose alloc/dealloc properly for SGX libunwind 2019-01-21 21:03:56 +05:30
Oliver Scherer
aedc3a51df Declare some unconst operations as unsafe in const fn 2019-01-21 16:01:57 +01:00
bors
7164a9f151 Auto merge of #55045 - kleimkuhler:add-std-is_sorted, r=KodrAus
Add `is_sorted` to `Iterator` and `[T]`

This is an initial implementation for the first step of [RFC 2351](https://github.com/rust-lang/rfcs/blob/master/text/2351-is-sorted.md)

Tracking issue: https://github.com/rust-lang/rust/issues/53485
2019-01-21 13:55:45 +00:00
David Wood
1db42756f7
Print visible name for types as well as modules.
This commit extends previous work in #55007 where the name from the
visible parent was used for modules. Now, we also print the name from
the visible parent for types.
2019-01-21 13:25:15 +01:00
bors
0974bdc7e8 Auto merge of #57756 - matthiaskrgr:clippy_submodule_upd, r=oli-obk
submodules: update clippy from 1b89724b to e648adf0

Fixes clippy toolstate

Changes:
````
Catch up with `format_args` change
Fix bad `while_let_on_iterator` suggestion.
rustup https://github.com/rust-lang/rust/pull/57747
Fixing issues pointed out by dogfood tests.
Update to collect all the files then throw the error.
Adding a test for checking if test files are missing.
Remove bors.toml
add applicability to lint name suggestion
````

r? @oli-obk
2019-01-21 11:07:29 +00:00
Oliver Scherer
64afc6b517 Differentiate between closure and function bodies 2019-01-21 10:12:17 +01:00
bors
33b0b7148f Auto merge of #57792 - Centril:rollup, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #56796 (Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`)
 - #57768 (Continue parsing after parent type args and suggest using angle brackets)
 - #57769 (Suggest correct cast for struct fields with shorthand syntax)
 - #57783 (Add "dereference boxed value" suggestion.)
 - #57784 (Add span for bad doc comment)

Failed merges:

r? @ghost
2019-01-21 08:32:19 +00:00
Esteban Küber
45a95b512c Use structured suggestion in stead of notes 2019-01-20 21:41:25 -08:00
bors
b5f5a2715e Auto merge of #57708 - nbigaouette:pr-53774-fix-missing-rust-gdbui-install, r=Mark-Simulacrum
Install missing 'rust-gdbui''

PR #53774 added `rust-gdbui` as wrapper to launch [gdbui](https://gdbgui.com/), similar to `rust-gdb`.

Unfortunately I've never seen the script in my local installation (from rustup, using rust 1.31.1). @tromey on the PR [suggested it might be missing](https://github.com/rust-lang/rust/pull/53774#issuecomment-419704939) from the installation process.

This PR simply adds a line for `rust-gdbui` too.
2019-01-21 03:12:26 +00:00
Esteban Küber
e33f7f7de1 Explain type mismatch cause pointing to return type when it is impl Trait 2019-01-20 18:42:10 -08:00
Matthias Krüger
8c4a7a9701 submodules: update clippy from 1b89724b to 1838bfe5
Changes:
````
Fixing typo in CONTRIBUTING.md
Fix breakage due to rust-lang/rust#57651
Run rustfmt
Fixed breakage due to rust-lang/rust#57489
Fix breakage due to rust-lang/rust#57755
Catch up with `format_args` change
Fix bad `while_let_on_iterator` suggestion.
rustup https://github.com/rust-lang/rust/pull/57747
Fixing issues pointed out by dogfood tests.
Update to collect all the files then throw the error.
Adding a test for checking if test files are missing.
Remove bors.toml
add applicability to lint name suggestion
````
2019-01-21 02:58:57 +01:00
Mazdak Farrokhzad
00c60d115c
Rollup merge of #57784 - JohnTitor:improve-error-message, r=estebank
Add span for bad doc comment

Fixes #57382

r? @estebank
2019-01-21 02:21:58 +01:00
Mazdak Farrokhzad
74b8cd4957
Rollup merge of #57783 - davidtwco:issue-57741, r=estebank
Add "dereference boxed value" suggestion.

Contributes to #57741.

This PR adds a `help: consider dereferencing the boxed value` suggestion to discriminants of match statements when the match arms have type `T` and the discriminant has type `Box<T>`.

r? @estebank
2019-01-21 02:21:57 +01:00
Mazdak Farrokhzad
3bb9fc4007
Rollup merge of #57769 - estebank:cast-suggestion-struct-field, r=matthewjasper
Suggest correct cast for struct fields with shorthand syntax

```
error[E0308]: mismatched types
  --> $DIR/type-mismatch-struct-field-shorthand.rs:8:19
   |
LL |     let _ = RGB { r, g, b };
   |                   ^ expected f64, found f32
help: you can cast an `f32` to `f64` in a lossless way
   |
LL |     let _ = RGB { r: r.into(), g, b };
   |                   ^^^^^^^^^^^
```

Fix #52497.
2019-01-21 02:21:56 +01:00
Mazdak Farrokhzad
627e001a72
Rollup merge of #57768 - estebank:type-args-sugg, r=zackmdavis
Continue parsing after parent type args and suggest using angle brackets

```
error[E0214]: parenthesized parameters may only be used with a trait
--> $DIR/E0214.rs:2:15
   |
LL |     let v: Vec(&str) = vec!["foo"];
   |               ^^^^^^
   |               |
   |               only traits may use parentheses
   |               help: use angle brackets instead: `<&str>`
```

r? @zackmdavis
2019-01-21 02:21:55 +01:00
Mazdak Farrokhzad
ebc70e2e9e
Rollup merge of #56796 - KrishnaSannasi:try_from_impl_change, r=shepmaster
Change bounds on `TryFrom` blanket impl to use `Into` instead of `From`

This is from this [comment](https://github.com/rust-lang/rust/issues/33417#issuecomment-447111156) I made.

This will expand the impls available for `TryFrom` and `TryInto`, without losing anything in the process.
2019-01-21 02:21:53 +01:00
Esteban Küber
3ecbe1efa0 Add regression test for #54582 2019-01-20 17:14:15 -08:00
bors
7bac68a5d3 Auto merge of #57789 - ehuss:update-cargo, r=Mark-Simulacrum
Update cargo

Pull in fix for #57774.

6 commits in ffe65875fd05018599ad07e7389e99050c7915be..907c0febe7045fa02dff2a35c5e36d3bd59ea50d
2019-01-17 23:57:50 +0000 to 2019-01-20 22:31:07 +0000
- Put mtime-on-use behind a feature flag. (rust-lang/cargo#6573)
- Fix a typo in the unstable docs (rust-lang/cargo#6569)
- Perhaps you meant: foo, bar or foobar (rust-lang/cargo#6550)
- Refactor: Create uninstall submodule (rust-lang/cargo#6557)
- Fix spurious Windows errors with switch_features_rerun. (rust-lang/cargo#6561)
- Stop building on master on Travis. (rust-lang/cargo#6562)

r? @Mark-Simulacrum
2019-01-21 00:29:31 +00:00
Eric Huss
c949d8ee69 Update cargo 2019-01-20 15:31:43 -08:00