about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-03-11Update testsVadim Petrochenkov-6703/+6703
2019-03-11fix testArtyom Pavlov-2/+2
2019-03-11compiletest: Filter away test annotations from UI test outputVadim Petrochenkov-0/+6
2019-03-11Add initial implementation of 'sort_at_index' for slices -- analog to C++'s ↵Pavel Krajcevski-0/+355
std::nth_element (a.k.a. quickselect) Add some more notes to the documentation: - Mention that the median can be found if we used `len() / 2`. - Mention that this function is usually called "kth element" in other libraries. Address some comments in PR: - Change wording on some of the documentation - Change recursive function into a loop Update name to `partition_at_index` and add convenience return values. Address reviewer comments: - Don't swap on each iteration when searching for min/max element. - Add some docs about when we panic. - Test that the sum of the lengths of the output matches the length of the input. - Style fix for for-loop. Address more reviewer comments Fix Rng stuff for test Fix doc test build Don't run the partition_at_index test on wasm targets Miri does not support entropy for test partition_at_index
2019-03-11Auto merge of #58021 - ishitatsuyuki:57667-fix, r=RalfJungbors-33/+6
Fix fallout from #57667
2019-03-11fix testsnewpavlov-5/+9
2019-03-12removed the definition of maskkenta7777-6/+0
2019-03-12replaced some bit operations with truncatekenta7777-3/+3
2019-03-11Resolved nits raised in review.Alexander Regueiro-6/+6
2019-03-11Test illustrating that the nested_impl_trait lint should only catch shallow ↵Felix S. Klock II-0/+72
cases.
2019-03-11move MAX_NANOS_F64/32 to methodsnewpavlov-2/+4
2019-03-11consistent naming for duration_float methods and additional f32 methodsnewpavlov-9/+121
2019-03-11Revised warning-downgrade strategy for nested impl trait.Felix S. Klock II-27/+77
Instead of a sticky-boolean flag that would downgrade errors to warnings during further recursion into the type (which is overly broad because we were not missing errors at arbitrarily deep levels), this instead tracks state closer to what the original bug actually was. In particular, the actual original bug was that we were failing to record the existence of an outer `impl Trait` solely when it occurred as an *immediate child* during the walk of the child types in `visit_generic_args`. Therefore, the correct way to precisely model when that bug would manifest itself (and thus downgrade the error-to-warning accordingly) is to track when those outer `impl Trait` cases were previously unrecorded. That's what this code does, by storing a flag with the recorded outer `impl Trait` indicating at which point in the compiler's control flow it had been stored. I will note that this commit passes the current test suite. A follow-up commit will also include tests illustrating the cases that this commit gets right (and were handled incorrectly by the previous sticky boolean).
2019-03-11reduced some code repetitions of bit operationkenta7777-2/+3
2019-03-11added a function for reducing repetition of bit operationkenta7777-0/+6
2019-03-11Auto merge of #59073 - Xanewok:rustup-rustc-interface, r=Zoxcbors-3/+8
Update RLS and Clippy due to #56732 (rustc_interface crate) Closes #59060. In addition to plain submodule bumps, this also contains update to rls-rustc. The in-tree, from the RLS monorepo, version is used instead of the crates.io one (@nrc I think we might stop publishing `rls-rustc` altogether, right? It's only there to work around passing `-Zsave-analysis` to stable `rustc` and meant to be used only by RLS, IIRC). @Zoxc also due to how we need to access the expanded AST still from the RLS side in order to pass save analysis data in-memory, I delayed the AST drop after the `after_analysis` callback if the `-Zsave-analysis` is passed. It'd be also good if you could take a look at the changes inside the `rls` and `rls-rustc`: https://github.com/rust-lang/rls/compare/6a1b5a9cfda2ae19372e0613e76ebefba36edcf5...6840dd69af3ada1f8a432075f1f0be679ea8a468. The `rls-rustc` is based on your [PR](https://github.com/rust-dev-tools/rls-rustc/pull/11) but I also had to change some bits in the RLS itself. r? @Zoxc / @Manishearth
2019-03-11Auto merge of #59071 - Manishearth:clippyup, r=oli-obkbors-5/+10
Update clippy r? @oli-obk
2019-03-11Remove precompute_in_scope_traits_hashesJohn Kåre Alsaker-11/+0
2019-03-11Auto merge of #58788 - matthewjasper:compare-children, r=pnkfelixbors-25/+129
Make migrate mode work at item level granularity Migrate mode now works entirely at the item level rather than the body level, ensuring that we don't lose any errors in contained closures. Closes #58776 r? @pnkfelix
2019-03-10Fix #54822 and associated faulty testskyren-28/+33
Type checking associated constants can require trait bounds, but an empty parameter environment was provided to the trait solver. Providing an appropriate parameter environment seems to fix #54822 and also make one of the cases in src/test/ui/nll/trait-associated-constant.rs that should compile successfully do so. It also (slightly) improves the error message in src/test/ui/associated-const/associated-const-generic-obligations.rs
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-36/+39
2019-03-11Auto merge of #58784 - oli-obk:accidental_promotion, r=eddybbors-5/+22
Don't promote function calls to nonpromotable things fixes https://github.com/rust-lang/rust/issues/58767 and fixes https://github.com/rust-lang/rust/issues/58634 r? @eddyb should we additionally check the function call return type? It might be a promotable function (or any `const fn` inside a `const fn`), but its return type might contain interior mutability.
2019-03-11Fix incorrect links in librustc_codegen_llvm documentationNikita Baksalyar-3/+3
2019-03-10Make js tests work even with resource-suffix optionGuillaume Gomez-3/+30
2019-03-10Auto merge of #59054 - ehuss:ci-i686-gnu-tests, r=pietroalbinibors-1/+7
CI: Trim some tests from i686-gnu This removes some tests from the i686-gnu job. This job clocks in at 2hr 56min, and removing these should cut about 10 to 15 minutes, giving a little more breathing room. I suspect these don't need to be tested on every platform.
2019-03-10Make migrate mode work at item level granularityMatthew Jasper-25/+129
2019-03-10enabled too many testsRalf Jung-1/+3
2019-03-10Add provided methods `Seek::{stream_len, stream_position}`Lukas Kalbertodt-2/+119
These two methods are defined in terms of `Seek::seek` and are added for convenience. Tests are included.
2019-03-10we can now skip should_panic tests with the libtest harnessRalf Jung-91/+1
2019-03-10Update clippyManish Goregaokar-5/+10
2019-03-10Bump Clippy and RLSIgor Matuszewski-5/+10
2019-03-10Drop expanded AST later if in save_analysis modeIgor Matuszewski-3/+8
2019-03-10CI: Trim some tests from i686-gnuEric Huss-1/+7
This removes some tests from the i686-gnu job. This job clocks in at 2hr 56min, and removing these should cut about 10 to 15 minutes, giving a little more breathing room. I suspect these don't need to be tested on every platform.
2019-03-10Replace TimeLine with SelfProfilerWesley Wiser-435/+155
2019-03-10hir: remove trait_auto_implljedrz-17/+0
2019-03-10HirIdification: remove all NodeIds from rustc_mirljedrz-8/+4
2019-03-10HirIdification: remove all NodeIds from typeckljedrz-23/+16
2019-03-10HirIdification: remove all NodeIds from borrowckljedrz-13/+8
2019-03-10hir: replace NodeId with HirId in trait_implsljedrz-14/+15
2019-03-10refactor build-mainfest.Mazdak Farrokhzad-204/+197
2019-03-10Fix tidykennytm-1/+4
2019-03-10Update src/tools/publish_toolstate.pyJames Munns-1/+1
Co-Authored-By: kennytm <kennytm@gmail.com>
2019-03-10Auto merge of #56732 - Zoxc:rustc-interface, r=oli-obkbors-2745/+2511
Make the rustc driver and interface demand driven This introduces a new crate `rustc_interface` which is the canonical interface for creating and using the compiler. It allows you to access a `Compiler` type in a closure and that types have methods to run passes on demand. The interesting parts are found [here (defining the queries)](https://github.com/Zoxc/rust/blob/rustc-interface/src/librustc_interface/queries.rs#L78) and [here (methods to create a `Compiler`)](https://github.com/Zoxc/rust/blob/rustc-interface/src/librustc_interface/interface.rs). cc @rust-lang/compiler @rust-lang/dev-tools @rust-lang/rustdoc
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-2745/+2511
2019-03-10Auto merge of #58498 - euclio:e0432-suggestions, r=estebankbors-152/+310
use structured suggestions for E0432
2019-03-09Use lifetime contravariance to elide more lifetimes in core+alloc+stdScott McMurray-93/+93
2019-03-10Fix ICE in MIR pretty printingDan Robertson-1/+21
A `Def::Variant` should be considered as a function in mir pretty printing. Each variant has a constructor that we must print. Given the following enum definition: ``` pub enum TestMe { X(usize), } ``` We will need to generate a constructor for the variant `X` with a signature that looks something like the following: ``` fn TestMe::X(_1: usize) -> TestMe; ```
2019-03-09Avoid some common false positives in intra doc link checkingManish Goregaokar-0/+6
2019-03-09add feature clampDirk Leifeld-0/+3
2019-03-09review commentsEsteban Küber-8/+8