Commit Graph

89121 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
86244854b5
Rollup merge of #57844 - euclio:keyserver-port, r=alexcrichton
use port 80 for retrieving GPG key

This works around firewalls blocking port 11371.

See https://unix.stackexchange.com/questions/75892/keyserver-timed-out-when-trying-to-add-a-gpg-public-key.
2019-01-24 00:20:02 +01:00
Mazdak Farrokhzad
ab998a2eeb
Rollup merge of #57840 - tromey:fix-issue-57762, r=nikic
Fix issue 57762

against a stock LLVM 7.  LLVM 7 was released without a necessary fix
for a bug in the DWARF discriminant code.

This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.

Closes #57762
2019-01-24 00:20:00 +01:00
Mazdak Farrokhzad
d17f62d857
Rollup merge of #57836 - oli-obk:existential_crisis, r=estebank
Fix some cross crate existential type ICEs

fixes #53443
2019-01-24 00:19:59 +01:00
Mazdak Farrokhzad
5749bac989
Rollup merge of #57834 - SimonSapin:type_id, r=Centril
Stabilize Any::get_type_id and rename to type_id

FCP: https://github.com/rust-lang/rust/issues/27745#issuecomment-373906749

Closes https://github.com/rust-lang/rust/issues/27745.
2019-01-24 00:19:58 +01:00
Mazdak Farrokhzad
b5447b50b0
Rollup merge of #57817 - davidtwco:issue-54521, r=estebank
Add error for trailing angle brackets.

Fixes #54521.

This PR adds a error (and accompanying machine applicable
suggestion) for trailing angle brackets on function calls with a
turbofish.

r? @estebank
2019-01-24 00:19:57 +01:00
Mazdak Farrokhzad
da182a0fe7
Rollup merge of #57795 - estebank:did-you-mean, r=zackmdavis
Use structured suggestion in stead of notes
2019-01-24 00:19:55 +01:00
Mazdak Farrokhzad
8ef8d57029
Rollup merge of #57793 - estebank:impl-trait-resolve, r=oli-obk
Explain type mismatch cause pointing to return type when it is `impl Trait`

Fix #57743.
2019-01-24 00:19:54 +01:00
Mazdak Farrokhzad
2dd63a2e10
Rollup merge of #57779 - estebank:recover-struct-fields, r=davidtwco
Recover from parse errors in literal struct fields and incorrect float literals

Fix #52496.
2019-01-24 00:19:53 +01:00
Mazdak Farrokhzad
b0ec43f569
Rollup merge of #57730 - Zoxc:combined-ast-validator, r=cramertj
Merge visitors in AST validation

Cuts runtime for AST validation on `syntex_syntax` from 31.5 ms to 17 ms.
2019-01-24 00:19:52 +01:00
Mazdak Farrokhzad
e7b584cee1
Rollup merge of #57179 - Xaeroxe:patch-1, r=QuietMisdreavus
Update std/lib.rs docs to reflect Rust 2018 usage

Fixes #56544

This paragraph was written for Rust 2015.  Since 2018 has been stable for a while I think we can update it.
2019-01-24 00:19:50 +01:00
David Wood
f14d007ee4
Add suggestion for incorrect field syntax.
This commit adds a suggestion when a `=` character is used when
specifying the value of a field in a struct constructor incorrectly
instead of a `:` character.
2019-01-23 23:40:58 +01:00
Aaron Hill
31cd65f712
Fix std::future::from_generator documentation
This function takes a generator and wraps it in a future, not
vice-versa.
2019-01-23 17:39:28 -05:00
Aaron Hill
fc0c8839f7
Don't ICE when logging unusual types
MonoItemExt#to_string is used for both debug logging and LLVM symbol
name generation. When debugging, we want to print out any type we
encounter, even if it's something weird like GeneratorWitness. However,
during codegen, we still want to error if we encounter an unexpected
type when generating a name.

To resolve this issue, this commit introduces a new 'debug' parameter to
the relevant methods. When set to 'true', it allows any type to be
printed - when set to 'false', it 'bug!'s when encountering an
unexpected type.

This prevents an ICE when enabling debug logging (via RUST_LOG) while
running rustc on generator-related code.
2019-01-23 16:32:59 -05:00
David Wood
8ab12f6cc0
Optimize snapshot usage.
This commit implements a suggestion from @estebank that optimizes the
use of snapshots.

Instead of creating a snapshot for each recursion in `parse_path_segment`
and then replacing `self` with them until the first invocation where if
leading angle brackets are detected, `self` is not replaced and instead the
snapshot is used to inform how parsing should continue.

Now, a snapshot is created in the first invocation that acts as a backup
of the parser state before any generic arguments are parsed (and
therefore, before recursion starts). This backup replaces `self` if after
all parsing of generic arguments has concluded we can determine that
there are leading angle brackets. Parsing can then proceed from the
backup state making use of the now known number of unmatched leading
angle brackets to recover.
2019-01-23 21:39:15 +01:00
bors
19f8958f82 Auto merge of #57857 - pietroalbini:fix-android-ci, r=aidanhs
Fix Android CI failing to download SDKs

A component of the Android SDK now requires an additional license ([full license text](https://gist.github.com/pietroalbini/28b46a6fed0921d129de58e7aef29f11)) to be accepted before it's possible to use it. The license is dated January 16th 2019, so it's recent.

The weird thing about the license is that it doesn't prompt you to accept it during `sdkmanager --licenses` like all the other ones, but during `sdkmanager platform-tools emulator ...`, and we didn't pipe `yes` to it before this PR.

The PR changes the SDK installation script to accept all the licenses even on the `sdkmanager platform-tools emulator` command.
2019-01-23 15:53:23 +00:00
John Kåre Alsaker
b2dfd9680d Fix race condition when emitting stored diagnostics 2019-01-23 16:20:57 +01:00
Sergey Pepyakin
0db2587a1c Don't export table by default in wasm 2019-01-23 15:06:32 +01:00
Jethro Beekman
8db59d49f3 Add os::fortanix_sgx::ffi module 2019-01-23 18:53:39 +05:30
Pietro Albini
645b7c2c36
ignore images line ending on older git versions
On Ubuntu 16.04 git 2.7.4 tries to fix the line ending of .png and .ico
files, and obviously it ruins them. This commit adds an attribute to
those files to properly mark them as binary.
2019-01-23 12:44:15 +01:00
Guillaume Gomez
0cf97042d1 Fix invalid background color 2019-01-23 12:05:00 +01:00
Oliver Scherer
5d6faf7b4a Remove unused feature gates 2019-01-23 11:34:58 +01:00
Oliver Scherer
d4ee556126 Follow naming scheme for "frame" methods 2019-01-23 11:34:02 +01:00
David Wood
22f794b00f
Suggest removing leading left angle brackets.
This commit adds errors and accompanying suggestions as below:

```
bar::<<<<<T as Foo>::Output>();
     ^^^ help: remove extra angle brackets
```
2019-01-23 11:25:45 +01:00
Pietro Albini
91f328fb55
make sure to accept all android licenses 2019-01-23 11:21:24 +01:00
Corey Farwell
8af02faab8
reposition markdown hyperlink reference 2019-01-22 22:51:33 -05:00
Alex Berghage
41be93c2f6 Rebase and fix new instantiation fn 2019-01-22 19:31:55 -07:00
Alex Berghage
0f566ec575
Move Instant backing type to Duration
Per review comments, this commit switches out the backing
type for Instant on windows to a Duration. Tests all pass,
and the code's a lot simpler (plus it should be portable now,
with the exception of the QueryPerformanceWhatever functions).
2019-01-22 19:18:28 -07:00
Alex Berghage
55dea0edec
Simplify units in Duration/Instant math on Windows
Right now we do unit conversions between PerfCounter measurements
and nanoseconds for every add/sub we do between Durations and Instants
on Windows machines. This leads to goofy behavior, like this snippet
failing:

```
let now = Instant::now();
let offset = Duration::from_millis(5);
assert_eq!((now + offset) - now, (now - now) + offset);
```

with precision problems like this:

```
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `4.999914ms`,
 right: `5ms`', src\main.rs:6:5
```

To fix it, this changeset does the unit conversion once, when we
measure the clock, and all the subsequent math in u64 nanoseconds.

It also adds an exact associativity test to the `sys/time.rs`
test suite to make sure we don't regress on this in the future.
2019-01-22 19:18:28 -07:00
bors
6bba352cad Auto merge of #57835 - pnkfelix:issue-57673-remove-leaky-nested-probe, r=arielb1
typeck: remove leaky nested probe during trait object method resolution

addresses #57673  (but not marking with f-x because thats now afflicting beta channel).

Fix #57216
2019-01-22 23:02:38 +00:00
Clar Fon
02bda7a061 Move trivial constructors to inherent methods 2019-01-22 17:45:11 -05:00
Clar Fon
4c28b2c4b1 Move nontrivial constructors to inherent methods 2019-01-22 17:45:11 -05:00
Clar Fon
5971ccc08d Don't expose ZipImpl to Iterator 2019-01-22 17:45:11 -05:00
Clar Fon
52b36e28d8 Move super_nth out of ZipImpl 2019-01-22 17:45:11 -05:00
Clar Fon
53b400c30c Don't expose FlattenCompat to Iterator 2019-01-22 17:45:11 -05:00
Clar Fon
7e4177311a Don't expose ChainState to Iterator 2019-01-22 17:45:11 -05:00
Clar Fon
fb974df281 Move Flatten and FlatMap to own module 2019-01-22 17:45:11 -05:00
Clar Fon
ebfd083125 Move Chain and ChainState to own module 2019-01-22 17:45:11 -05:00
Clar Fon
520e8b001e Move TrustedRandomAccess into Zip module 2019-01-22 17:45:11 -05:00
Clar Fon
3c44e1f085 Move Zip and ZipImpl to own module 2019-01-22 17:45:11 -05:00
Clar Fon
9228f3c6b2 Move FusedIterator, TrustedLen to own module 2019-01-22 17:45:11 -05:00
Clar Fon
4a036142a0 Move Sum, Product to own module 2019-01-22 17:45:11 -05:00
Clar Fon
3ba9733d71 Move FromIterator, IntoIterator, Extend into own module 2019-01-22 17:45:11 -05:00
Clar Fon
6a2845954a Move ExactSizeIterator to own module 2019-01-22 17:45:11 -05:00
Clar Fon
34d5624255 Move DoubleEndedIterator to own module 2019-01-22 17:45:11 -05:00
Clar Fon
c40450ce65 Move core::iter iterator.rs to traits module 2019-01-22 17:45:11 -05:00
Clar Fon
aff7772a1d Move core::iter adapters to adapters.rs 2019-01-22 17:45:10 -05:00
QuietMisdreavus
b876694734 add intra-doc link test to proc-macro test 2019-01-22 15:44:19 -06:00
QuietMisdreavus
b1542341da don't call get_macro on proc-macro stubs 2019-01-22 15:40:27 -06:00
Andy Russell
4e649ccc3a
use port 80 for retrieving GPG key
This works around firewalls blocking port 11371.

See https://unix.stackexchange.com/questions/75892/keyserver-timed-out-when-trying-to-add-a-gpg-public-key.
2019-01-22 16:18:29 -05:00
bors
4c2be9c97f Auto merge of #57805 - matthiaskrgr:rls, r=Xanewok
submodules: update rls and clippy

Changes:
````
Remove state.analysis due to Rust PR #57476
Improve missing nightly readme info
Bump languageserver-types to v0.54.0 and renam crate name to lsp-types
Delete bors.toml
Fix tests
Fix https://github.com/rust-lang/rls/issues/1231
Implement asynchronous message reading
Use typed requests
Implement Tokio-based test LSP client
Update README.md to account for Travis url change
Simplify wait_for_all recv calls
Update dependencies
Revert NLL bug workaround
Remove old test_data entry in .gitignore
Reorganize some tests
Don't test RLS binary target directly
Move tooltip tests to integration tests
Simplify tooltip test harness
Only use FIXTURES_DIR to determine fixtures
Remove src/test/mod.rs
Centralise FIXTURES_DIR across unit and integration tests
Move lens test to tests/
Suppress unused warnings in tests/*
Beautify main.rs and lib.rs
WIP: Move tests
Move src/test/harness to tests/support/harness
Split RLS into bin/lib
Update Clippy
Change all mentions of `rls-preview` to `rls`
Make config mutex borrow scope explicit
Fallback to racer definition
````

Fixes rls build.
2019-01-22 20:04:13 +00:00