about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-01-23Fix std::future::from_generator documentationAaron Hill-1/+1
This function takes a generator and wraps it in a future, not vice-versa.
2019-01-23Don't ICE when logging unusual typesAaron Hill-30/+44
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-23Optimize snapshot usage.David Wood-68/+57
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-23Fix race condition when emitting stored diagnosticsJohn Kåre Alsaker-21/+63
2019-01-23Don't export table by default in wasmSergey Pepyakin-3/+0
2019-01-23Add os::fortanix_sgx::ffi moduleJethro Beekman-1/+111
2019-01-23Fix invalid background colorGuillaume Gomez-8/+0
2019-01-23Remove unused feature gatesOliver Scherer-2/+0
2019-01-23Follow naming scheme for "frame" methodsOliver Scherer-7/+7
2019-01-23Suggest removing leading left angle brackets.David Wood-8/+339
This commit adds errors and accompanying suggestions as below: ``` bar::<<<<<T as Foo>::Output>(); ^^^ help: remove extra angle brackets ```
2019-01-23make sure to accept all android licensesPietro Albini-1/+1
2019-01-22reposition markdown hyperlink referenceCorey Farwell-2/+2
2019-01-22Rebase and fix new instantiation fnAlex Berghage-1/+1
2019-01-22Move Instant backing type to DurationAlex Berghage-22/+14
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-22Simplify units in Duration/Instant math on WindowsAlex Berghage-42/+87
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-22Don't try to clean predicates involving ReErasedAaron Hill-15/+37
There's nothing to render when we have a bound involving ReErased (either a type or region outliving it), so we don't attempt to generate a clean WherePredicate Fixes #57806
2019-01-22Mention that core::intrinsics::transmute is available at core::mem::transmute.Johnathan Van Why-0/+4
In #[no_std] environments, std::mem::transmute is unavailable. Searching for transmute in libcore only pulls up core::intrinsics::transmute, which is behind the (unstable) core_intrinsics feature flag. Users wishing to use transmute in #[no_std] environments typically should use core::mem::transmute instead, as it is stable. This documentation makes core::mem::transmute discoverable.
2019-01-22Auto merge of #57835 - pnkfelix:issue-57673-remove-leaky-nested-probe, r=arielb1bors-9/+28
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-22dbg!() without parameters.Clar Fon-0/+6
2019-01-22Move trivial constructors to inherent methodsClar Fon-26/+76
2019-01-22Move nontrivial constructors to inherent methodsClar Fon-25/+60
2019-01-22Don't expose ZipImpl to IteratorClar Fon-5/+5
2019-01-22Move super_nth out of ZipImplClar Fon-7/+9
2019-01-22Don't expose FlattenCompat to IteratorClar Fon-13/+24
2019-01-22Don't expose ChainState to IteratorClar Fon-8/+12
2019-01-22Move Flatten and FlatMap to own moduleClar Fon-313/+321
2019-01-22Move Chain and ChainState to own moduleClar Fon-251/+258
2019-01-22Move TrustedRandomAccess into Zip moduleClar Fon-6/+20
2019-01-22Move Zip and ZipImpl to own moduleClar Fon-258/+266
2019-01-22Move FusedIterator, TrustedLen to own moduleClar Fon-45/+46
2019-01-22Move Sum, Product to own moduleClar Fon-226/+227
2019-01-22Move FromIterator, IntoIterator, Extend into own moduleClar Fon-350/+351
2019-01-22Move ExactSizeIterator to own moduleClar Fon-143/+145
2019-01-22Move DoubleEndedIterator to own moduleClar Fon-298/+300
2019-01-22Move core::iter iterator.rs to traits moduleClar Fon-8/+11
2019-01-22Move core::iter adapters to adapters.rsClar Fon-2769/+2790
2019-01-22add intra-doc link test to proc-macro testQuietMisdreavus-0/+5
2019-01-22don't call get_macro on proc-macro stubsQuietMisdreavus-2/+6
2019-01-22use port 80 for retrieving GPG keyAndy Russell-1/+1
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-22Auto merge of #57805 - matthiaskrgr:rls, r=Xanewokbors-9/+8
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-22Simplify the version checkTom Tromey-4/+3
Address the review comments by simplifying the version check to just "< 8".
2019-01-22Fix issue 57762Tom Tromey-1/+5
Issue 57762 points out a compiler crash when the compiler was built using 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-22submodules: update clippy from 1838bfe5 to 280069ddMatthias Krüger-9/+7
Changes: ```` Rustfmt all the things Don't make decisions on values that don't represent the decision Rustup Actually check for constants. formatting fix Update clippy_lints/src/needless_bool.rs formatting fix needless bool lint suggestion is wrapped in brackets if it is an "else" clause of an "if-else" statement Remove negative integer literal checks. Fix `implicit_return` false positives. ````
2019-01-22submodules: update rls from ae0d89a to c9d25b6Matthias Krüger-0/+1
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-22Remove unused linksJacob Kiesel-2/+0
2019-01-22Add regression testOliver Scherer-3/+11
2019-01-22Span fixupOliver Scherer-7/+9
2019-01-22Bail out on overly generic substitutionsOliver Scherer-21/+38
2019-01-22Get rid of the fake stack frameOliver Scherer-81/+44
2019-01-22Auto merge of #57647 - cuviper:gdb-version, r=tromeybors-1/+1
[rust-gdb] relax the GDB version regex The pretty-printer script is checking `gdb.VERSION` to see if it's at least 8.1 for some features. With `re.match`, it will only find the version at the beginning of that string, but in Fedora the string is something like "Fedora 8.2-5.fc29". Using `re.search` instead will find the first location that matches anywhere, so it will find my 8.2.