about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-07-09Rollup merge of #62494 - sinkuu:unused_deps, r=alexcrichtonMazdak Farrokhzad-3/+0
Remove unused dependencies
2019-07-09Rollup merge of #62403 - SimonSapin:concat, r=alexcrichtonMazdak Farrokhzad-74/+76
Replace SliceConcatExt trait with inherent methods and SliceConcat helper trait Before this change `SliceConcatExt` was an unstable extension trait with stable methods. It was in the libstd prelude, so that its methods could be used on the stable channel. This replaces it with inherent methods, which can be used without any addition to the prelude. Since the methods are stable and very generic (with for example a return type that depends on the types of parameters), an helper trait is still needed. But now that trait does not need to be in scope for the methods to be used. Removing this depedency on the libstd prelude allows the methods to be used in `#![no_std]` crate that use liballoc, which does not have its own implicitly-imported prelude.
2019-07-09Rollup merge of #62090 - ↵Mazdak Farrokhzad-139/+217
davidtwco:ice-async-await-out-of-range-substitution, r=nikomatsakis typeck: merge opaque type inference logic Fixes #55872. See [relevant Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/187312-wg-async-foundations/topic/type.20parameter.20out.20of.20range.20.2355872). r? @nikomatsakis
2019-07-09Rollup merge of #60458 - KodrAus:debug_map_entry, r=alexcrichtonMazdak Farrokhzad-25/+238
Add key and value methods to DebugMap Implementation PR for an active (not approved) RFC: https://github.com/rust-lang/rfcs/pull/2696. Add two new methods to `std::fmt::DebugMap` for writing the key and value part of a map entry separately: ```rust impl<'a, 'b: 'a> DebugMap<'a, 'b> { pub fn key(&mut self, key: &dyn Debug) -> &mut Self; pub fn value(&mut self, value: &dyn Debug) -> &mut Self; } ``` I want to do this so that I can write a `serde::Serializer` that forwards to our format builders, so that any `T: Serialize` can also be treated like a `T: Debug`.
2019-07-09add feature to docsAshley Mannix-0/+2
2019-07-08Auto merge of #61224 - aloucks:drain_filter, r=Gankrobors-9/+169
Prevent Vec::drain_filter from double dropping on panic Fixes: #60977 The changes in this PR prevent leaking and double-panicking in addition to double-drop. Tracking issue: #43244
2019-07-09Remove unused dependenciesShotaro Yamada-3/+0
2019-07-08Auto merge of #62473 - timvermeulen:is_sorted_by_key, r=scottmcmbors-5/+5
Only call the closure parameter of Iterator::is_sorted_by_key once per item See https://github.com/rust-lang/rust/issues/53485#issuecomment-472314004. This changes `Iterator::is_sorted_by_key` to only call the given closure once for each item, which allows us to pass the items to the closure by value instead of by reference. **Important**: `is_sorted_by_key` for slices and slice iterators is now no longer implemented in terms of the custom `slice::Iter::is_sorted_by` implementation. It's a trade-off: we could forward `slice::Iter::is_sorted_by_key` to it directly for potential SIMD benefits, but that would mean that the closure is potentially called twice for (almost) every element of the slice.
2019-07-08Add documentation to float conversion methodsLzu Tao-20/+144
2019-07-08Add float conversions to and from bytesTobias Bucher-0/+106
Use the same API as for integers. Fixes #57492.
2019-07-08Rollup merge of #62478 - ↵Mazdak Farrokhzad-11/+11
fakenine:normalize_use_of_backticks_compiler_messages_p3, r=Centril normalize use of backticks for compiler messages in librustc_codegen https://github.com/rust-lang/rust/issues/60532
2019-07-08Rollup merge of #62477 - petrhosek:unwind-bootstrap, r=cramertjMazdak Farrokhzad-8/+15
Re-add bootstrap attribute to libunwind for llvm-libunwind feature This was removed in 8a7dded, but since #62286 hasn't yet made it into beta, this is breaking the build with llvm-libunwind feature enabled. Furthemore, restrict the link attribute to Fuchsia and Linux, matching the logic in build.rs since llvm-libunwind feature isn't yet supported on other systems.
2019-07-08Rollup merge of #62472 - ↵Mazdak Farrokhzad-26/+26
fakenine:normalize_use_of_backticks_compiler_messages_p2, r=Centril Normalize use of backticks in compiler messages p2 normalize use of backticks in compiler messages for librustc_typecheck https://github.com/rust-lang/rust/issues/60532
2019-07-08Rollup merge of #62462 - JohnTitor:document-while, r=CentrilMazdak Farrokhzad-9/+56
Document `while` keyword This is a rework of #60761. Closes #60736 r? @dtolnay
2019-07-08Rollup merge of #62356 - soc:topic/contains, r=CentrilMazdak Farrokhzad-0/+78
Implement Option::contains and Result::contains This increases consistency with other common data structures.
2019-07-08add key and value methods to DebugMapAshley Mannix-25/+236
2019-07-08normalize use of backticks for compiler messages in librustc_codegenSamy Kacimi-11/+11
https://github.com/rust-lang/rust/issues/60532
2019-07-07Re-add bootstrap attribute to libunwind for llvm-libunwind featurePetr Hosek-8/+15
This was removed in 8a7dded, but since #62286 hasn't yet made it into beta, this is breaking the build with llvm-libunwind feature enabled. Furthemore, restrict the link attribute to Fuchsia and Linux, matching the logic in build.rs since llvm-libunwind feature isn't yet supported on other systems.
2019-07-07Clarify double-drop commentAaron Loucks-1/+1
2019-07-07Only call the closure parameter of Iterator::is_sorted_by_key once per itemTim Vermeulen-5/+5
2019-07-07Auto merge of #62435 - scottmcm:constrained-array-impls, r=centrilbors-8/+479
Use const generics for array impls [part 1] Part 1 of #61415, following the plan in https://github.com/rust-lang/rust/issues/61415#issuecomment-497922482 Found a way that works 🙃
2019-07-07Use const generics for array impls, restricted to 0..=32Scott McMurray-8/+479
- uses a never-stable core::array::LengthAtMost32 to bound the impls - includes a custom error message to avoid mentioning LengthAtMost32 too often - doesn't use macros for the slice implementations to avoid #62433
2019-07-07Remove while loop in DrainFilter::drop and add additional docsAaron Loucks-19/+21
2019-07-07normalize use of backticks in compiler messages for librustc_typecheckSamy Kacimi-26/+26
https://github.com/rust-lang/rust/issues/60532
2019-07-07Rollup merge of #62286 - petrhosek:rustc-no-duplicate-archives, r=cramertjMazdak Farrokhzad-3/+16
Check if the archive has already been added to avoid duplicates This avoids adding archives multiple times, which results in duplicate objects in the resulting rlib, leading to symbol collision and link failures. This could happen when crate contains multiple link attributes that all reference the same archive.
2019-07-07Rollup merge of #62213 - QuietMisdreavus:cfg-doctest, r=GuillaumeGomezMazdak Farrokhzad-4/+78
rustdoc: set cfg(doctest) when collecting doctests Note: This PR builds on top of https://github.com/rust-lang/rust/pull/61199; only the last commit is specific to this PR. As discussed in https://github.com/rust-lang/rust/pull/61199, we want the ability to isolate items to only when rustdoc is collecting doctests, but we can't use `cfg(test)` because of libcore's `#![cfg(not(test))]`. This PR proposes a new cfg flag, `cfg(doctest)`, specific to this situation, rather than reusing an existing flag. I've isolated it behind a feature gate so that we can contain the effects to nightly only. (A stable workaround that can be used in lieu of `#[cfg(doctest)]` is `#[cfg(rustdoc)] #[doc(hidden)]`, at least once https://github.com/rust-lang/rust/pull/61351 lands.) Tracking issue: https://github.com/rust-lang/rust/issues/62210
2019-07-07Rollup merge of #62042 - petrochenkov:macstab, r=matthewjasperMazdak Farrokhzad-431/+517
Support stability and deprecation checking for all macros RELNOTES: Deprecation attributes on macros now have effect. Fixes https://github.com/rust-lang/rust/issues/34079 Fixes https://github.com/rust-lang/rust/issues/49912 Unblocks https://github.com/rust-lang/rust/pull/62086 Unblocks https://github.com/rust-lang/rust/pull/61000
2019-07-07Rollup merge of #61883 - zackmdavis:non_ascii_idents_lint, r=ManishearthMazdak Farrokhzad-0/+68
`non_ascii_idents` lint (part of RFC 2457) RFC 2457 [declares](https://github.com/rust-lang/rfcs/blob/121bbeff500c3274cea22c7e0ca176274d592646/text/2457-non-ascii-idents.md): "A `non_ascii_idents` lint is added to the compiler. This lint is allow by default." (Part of #55467.) r? @Manishearth
2019-07-07Implement Option::contains, Result::contains and Result::contains_errSimon Ochsenreither-0/+78
This increases consistency with other common data structures.
2019-07-07Document `while` keywordYuki Okushi-9/+56
2019-07-07Auto merge of #59800 - Zoxc:less-dylibs, r=alexcrichtonbors-118/+36
rustc: Remove `dylib` crate type from most rustc crates Revival of https://github.com/rust-lang/rust/pull/56987 cc @alexcrichton r? @michaelwoerister
2019-07-07Address review comments + Fix rebaseVadim Petrochenkov-12/+22
2019-07-07syntax: Pre-intern names of all built-in macrosVadim Petrochenkov-27/+45
They always end up interned anyway
2019-07-07syntax: Migrate built-in macros to the regular stability checkingVadim Petrochenkov-209/+161
2019-07-07Support deprecation checking for macrosVadim Petrochenkov-79/+203
2019-07-07resolve: Use standard stability diagnostics for macrosVadim Petrochenkov-40/+43
2019-07-07syntax: Keep full `Stability` in `SyntaxExtension`Vadim Petrochenkov-26/+18
2019-07-07resolve: Check stability for local macros as wellVadim Petrochenkov-13/+20
2019-07-07Collect library features from non-exported macrosVadim Petrochenkov-2/+14
2019-07-07resolve/expand: Move macro stability checking to an earlier pointVadim Petrochenkov-45/+23
2019-07-07syntax: Remove `NodeId` from `SyntaxExtension`Vadim Petrochenkov-30/+20
2019-07-07Auto merge of #62434 - Manishearth:clippyup, r=Manishearthbors-9/+7
Update clippy r? @ghost
2019-07-07Auto merge of #62458 - Centril:rollup-j6o2sqj, r=Centrilbors-54/+63
Rollup of 4 pull requests Successful merges: - #61990 (First question mark in doctest) - #62379 (Add missing links in Option documentation) - #62438 (rustbuild: Cleanup global lint settings) - #62455 (name the trait in ambiguous-associated-items fully qualified suggestion) Failed merges: r? @ghost
2019-07-06Update clippyManish Goregaokar-9/+7
2019-07-07Rollup merge of #62455 - zackmdavis:name_trait_for_ambiguous_assoc_item, ↵Mazdak Farrokhzad-3/+3
r=petrochenkov name the trait in ambiguous-associated-items fully qualified suggestion We have the trait at this point, so we can name it in the error message, rather than using "Trait" as a (potentially confusing) placeholder. Thanks to Yuki "@JohnTitor" Okushi for pointing out where to look (in the same file) for a closely related issue for ambiguous associated types (as opposed to items; that was #59225, except that one won't be quite as easy to resolve, because we actually don't have the trait `DefId` at that point). r? @petrochenkov
2019-07-07Rollup merge of #62438 - petrochenkov:buildwarn, r=Mark-SimulacrumMazdak Farrokhzad-37/+31
rustbuild: Cleanup global lint settings Lint settings do not depend on `if let Some(target) = target` in any way, so they are moved out of that clause. Internal lints now respect `RUSTC_DENY_WARNINGS`. Crate name treatment is cleaned up a bit. cc https://github.com/rust-lang/rust/pull/61545 @flip1995 r? @Mark-Simulacrum
2019-07-07Rollup merge of #62379 - GuillaumeGomez:option-doc-links, r=QuietMisdreavusMazdak Farrokhzad-10/+22
Add missing links in Option documentation r? @rust-lang/docs
2019-07-07Rollup merge of #61990 - llogiq:questionmark-test, r=QuietMisdreavusMazdak Farrokhzad-4/+7
First question mark in doctest We have had `?` for `Result`s in doctests for some time, but so far haven't used them in doctests. With this PR, I want to start the de-`unwrap`ping of doctests – and the discussion on where to do so. There is one downside, which is that the code can no longer be copied into a plain `main()` method, on the other hand, there should be a workable error if one does this.
2019-07-06force single-threaded text executionQuietMisdreavus-2/+2
2019-07-06rustdoc: set cfg(doctest) when collecting doctestsQuietMisdreavus-3/+77