about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2019-08-15Auto merge of #63575 - Centril:rollup-anlv9g5, r=Centrilbors-6/+6
Rollup of 11 pull requests Successful merges: - #62984 (Add lint for excess trailing semicolons) - #63075 (Miri: Check that a ptr is aligned and inbounds already when evaluating `*`) - #63490 (libsyntax: cleanup and refactor `pat.rs`) - #63507 (When needing type annotations in local bindings, account for impl Trait and closures) - #63509 (Point at the right enclosing scope when using `await` in non-async fn) - #63528 (syntax: Remove `DummyResult::expr_only`) - #63537 (expand: Unimplement `MutVisitor` on `MacroExpander`) - #63542 (Add NodeId for Arm, Field and FieldPat) - #63543 (Merge Variant and Variant_) - #63560 (move test that shouldn't be in test/run-pass/) - #63570 (Adjust tracking issues for `MaybeUninit<T>` gates) Failed merges: r? @ghost
2019-08-14Auto merge of #63534 - Mark-Simulacrum:stage0-bump, r=Centrilbors-72/+7
Bump to 1.39 r? @Centril
2019-08-14Adjust tracking issues for `MaybeUninit<T>` gatesMazdak Farrokhzad-6/+6
2019-08-14Handle cfg(bootstrap) throughoutMark Rousskov-72/+7
2019-08-14Rollup merge of #63512 - 95th:master, r=cramertjMazdak Farrokhzad-0/+28
Provide map_ok and map_err method for Poll<Option<Result<T, E>>> Currently `map_ok` and `map_err` methods are given for `Poll<Result<T, E>>`. This PR adds these methods for `Poll<Option<Result<T, E>>>` as they are helpful in stream building code.
2019-08-14Rollup merge of #63493 - ↵Mazdak Farrokhzad-2/+0
sd234678:remove-unneeded-comment-from-src/libcore/hash, r=Centril Remove unneeded comment in src/libcore/hash/mod.rs Split out from larger PR #63347 - other sections in there require further discussion. r? @Centril
2019-08-14Rollup merge of #63421 - clarfon:escape_default, r=dtolnayMazdak Farrokhzad-0/+9
Implement Clone, Display for ascii::EscapeDefault This will mimic the same behaviour as the `char` version; `Display`ing the iterator will give its string representation without advancing it.
2019-08-13Provide map_ok and map_err method for Poll<Option<Result<T, E>>>Gurwinder Singh-0/+28
2019-08-12Reduce genericity in InspectJosh Stone-12/+22
2019-08-12Reduce genericity in ScanJosh Stone-8/+17
2019-08-12Reduce genericity in TakeJosh Stone-7/+14
2019-08-12Reduce genericity in SkipJosh Stone-8/+18
2019-08-12Reduce genericity in TakeWhileJosh Stone-16/+23
2019-08-12Reduce genericity in SkipWhileJosh Stone-8/+15
2019-08-12Avoid closures in PeekableJosh Stone-1/+4
2019-08-12Reduce genericity in EnumerateJosh Stone-54/+77
2019-08-12Reduce genericity in Filter and FilterMapJosh Stone-58/+70
2019-08-12Remove genericity in StepBy::size_hintJosh Stone-5/+15
2019-08-12Reduce genericity in Copied and ClonedJosh Stone-16/+34
2019-08-12Avoid closures in the default <Zip as ZipImpl>::nextJosh Stone-5/+3
2019-08-12Reduce genericity in FlattenCompatJosh Stone-26/+52
2019-08-12Avoid closures in OnceWith and SuccessorsJosh Stone-5/+5
2019-08-12Reduce genericity in Iterator::lastJosh Stone-1/+6
2019-08-12Reduce the genericity of Map foldsJosh Stone-12/+22
2019-08-12Explicitly test Iterator::position overflowsJosh Stone-3/+2
2019-08-12Explicitly test Iterator::count overflowsJosh Stone-4/+3
2019-08-12Use if-let in is_sorted_byJosh Stone-3/+2
2019-08-12Reduce the genericity of closures in the iterator traitsJosh Stone-80/+194
By default, closures inherit the generic parameters of their scope, including `Self`. However, in most cases, the closures used to implement iterators don't need to be generic on the iterator type, only its `Item` type. We can reduce this genericity by redirecting such closures through local functions. This does make the closures more cumbersome to write, but it will hopefully reduce duplication in their monomorphizations, as well as their related type lengths.
2019-08-12Rollup merge of #63297 - RalfJung:ptr_offset, r=dtolnayMazdak Farrokhzad-34/+128
Improve pointer offset method docs Cc @rkruppe @gnzlbg
2019-08-11Rollup merge of #63442 - lzutao:vec-bin-search-insert, r=Mark-SimulacrumMark Rousskov-0/+11
Add an example to show how to insert item to a sorted vec Closes #61684 cc #61742 r? @Mark-Simulacrum, @jonas-schievink
2019-08-11Rollup merge of #63346 - RalfJung:zeroed-lint, r=eddybMark Rousskov-1/+5
Lint on some incorrect uses of mem::zeroed / mem::uninitialized Cc https://github.com/rust-lang/rust/issues/62825 and https://internals.rust-lang.org/t/make-mem-uninitialized-and-mem-zeroed-panic-for-some-types-where-0-is-a-niche/10605 This does not yet handle `NonNull`/`NonZero*`, but it is a start. I also improved some doc issues I hit on the way, and added a useful helper to `TyS`. EDIT: I added the relnotes label mostly as a proposal -- I think this is worth mentioning, but leave the decision up to the release team.
2019-08-11allow the lint if a few UB-demonstrating doc testsRalf Jung-1/+5
2019-08-11Auto merge of #63343 - ishitatsuyuki:revert-62150, r=RalfJungbors-4/+25
Back out #62150 Ref: #62825 cc @RalfJung
2019-08-10Use Result::unwrap_or_else instead of matchingLzu Tao-4/+1
2019-08-10Add an example to show how to insert item to a sorted vecLzu Tao-0/+14
2019-08-10Revert "Rollup merge of #62150 - alex:mem-uninit-refactor, r=RalfJung"Tatsuyuki Ishi-4/+25
This reverts commit 1d45156866b54c3fc36edfdfcdd8149ad9cb5711, reversing changes made to 0f92eb8a4a7d8715381f5b5d748d22315f6ff9c7.
2019-08-10Rollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=CentrilMazdak Farrokhzad-80/+120
Use associated_type_bounds where applicable - closes #61738
2019-08-10Rollup merge of #63056 - petrochenkov:macstd2, r=alexcrichtonMazdak Farrokhzad-138/+171
Give built-in macros stable addresses in the standard library Continuation of https://github.com/rust-lang/rust/pull/62086. Derive macros corresponding to traits from libcore are now available through the same paths as those traits: - `Clone` - `{core,std}::clone::Clone` - `PartialEq` - `{core,std}::cmp::PartialEq` - `Eq` - `{core,std}::cmp::Eq` - `PartialOrd` - `{core,std}::cmp::PartialOrd` - `Ord` - `{core,std}::cmp::Ord` - `Default` - `{core,std}::default::Default` - `Debug` - `{core,std}::fmt::Debug` - `Hash` - `{core,std}::hash::Hash` - `Copy` - `{core,std}::marker::Copy` Fn-like built-in macros are now available through libcore and libstd's root module, by analogy with non-builtin macros defined by libcore and libstd: ```rust {core,std}::{ __rust_unstable_column, asm, assert, cfg, column, compile_error, concat, concat_idents, env, file, format_args, format_args_nl, global_asm, include, include_bytes, include_str, line, log_syntax, module_path, option_env, stringify, trace_macros, } ``` Derive macros without a corresponding trait in libcore or libstd are still available only through prelude (also see https://github.com/rust-lang/rust/pull/62507). Attribute macros also keep being available only through prelude, mostly because they don't have an existing practice to follow. An advice from the library team on their eventual placement would be appreciated. ```rust RustcDecodable, RustcEncodable, bench, global_allocator, test, test_case, ``` r? @alexcrichton
2019-08-09Implement Clone, Display for ascii::EscapeDefaultClar Fon-0/+9
2019-08-10Auto merge of #62756 - newpavlov:stabilize_dur_float, r=alexcrichtonbors-22/+14
Stabilize duration_float Closes: #54361
2019-08-09Remove unneeded comment in src/libcore/hash/mod.rssd234678-2/+0
2019-08-10Give built-in macros stable addresses in the standard libraryVadim Petrochenkov-138/+171
2019-08-09Rollup merge of #63407 - RalfJung:miri-test-sizes, r=CentrilMazdak Farrokhzad-1/+1
reduce some test sizes in Miri
2019-08-09Rollup merge of #63404 - RalfJung:flt2dec, r=CentrilMazdak Farrokhzad-7/+42
enable flt2dec tests in Miri With ldexp implemented (thanks to @christianpoveda), we can finally enable these tests in Miri. Well, most of them -- some are just too slow.
2019-08-09Rollup merge of #63403 - sntdevco:master, r=CentrilMazdak Farrokhzad-9/+9
Improve test output I'm continuing to improve the test output for liballoc and libcore
2019-08-09Rollup merge of #63114 - matthewjasper:hygienic-format-args, r=petrochenkovMazdak Farrokhzad-22/+20
Remove gensym in format_args This also fixes some things to allow us to export opaque macros from libcore: * Don't consider items that are only reachable through opaque macros as public/exported (so they aren't linted as needing docs) * Mark private items reachable from the root of libcore as unstable - they are now reachable (in principle) in other crates via macros in libcore r? @petrochenkov
2019-08-09Rollup merge of #62672 - lzutao:deprecated-try-macro, r=CentrilMazdak Farrokhzad-0/+1
Deprecate `try!` macro Replaces #62077 Fixes rust-lang/rust-clippy#1361 Fixes #61000
2019-08-09explain Miri disablingRalf Jung-1/+1
2019-08-09Don't use associated type bounds in docs until it is stableIlija Tovilo-3/+2
2019-08-09Add missing #![feature(associated_type_bounds)]Ilija Tovilo-0/+2