about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2019-08-10Rollup merge of #63350 - iluuu1994:use-associated-type-bounds, r=CentrilMazdak Farrokhzad-2/+11
Use associated_type_bounds where applicable - closes #61738
2019-08-10Give built-in macros stable addresses in the standard libraryVadim Petrochenkov-21/+30
2019-08-09Add missing #![feature(associated_type_bounds)]Ilija Tovilo-0/+1
2019-08-09Postpone deprecating try! until 1.39.0Lzu Tao-1/+2
2019-08-09Deprecate `try!` macroBO41-1/+4
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com> Co-Authored-By: Oliver Middleton <olliemail27@gmail.com>
2019-08-08Use associated_type_bounds where applicable - closes #61738Ilija Tovilo-2/+10
2019-08-08Rollup merge of #63332 - marmistrz:truncate, r=alexcrichtonMazdak Farrokhzad-3/+11
Add an overflow check in truncate implementation for Unix. Closes #63326. cc @alexcrichton
2019-08-08Move the TryInto import into the inner scopeMarcin Mielniczuk-1/+1
2019-08-08Rollup merge of #63327 - lzutao:fix-as_raw_stat-dep-msg, r=Mark-SimulacrumMazdak Farrokhzad-3/+4
doc: Reword deprecation message of MetadataExt::as_raw_stat Closes #62711 r? @Mark-Simulacrum
2019-08-06Fix cfg_if usageJeremy Soller-2/+2
2019-08-06redox: convert to target_family unixJeremy Soller-6425/+551
2019-08-06Add an overflow check in truncate implementation for Unix.Marcin Mielniczuk-3/+11
2019-08-06doc: Reword deprecation message of MetadataExt::as_raw_statLzu Tao-3/+4
2019-08-06Auto merge of #63319 - Centril:rollup-d89rmey, r=Centrilbors-0/+2
Rollup of 14 pull requests Successful merges: - #61457 (Implement DoubleEndedIterator for iter::{StepBy, Peekable, Take}) - #63017 (Remove special code-path for handing unknown tokens) - #63184 (Explaining the reason why validation is performed in to_str of path.rs) - #63230 (Make use of possibly uninitialized data [E0381] a hard error) - #63260 (fix UB in a test) - #63264 (Revert "Rollup merge of #62696 - chocol4te:fix_#62194, r=estebank") - #63272 (Some more libsyntax::attr cleanup) - #63285 (Remove leftover AwaitOrigin) - #63287 (Don't store &Span) - #63293 (Clarify align_to's requirements and obligations) - #63295 (improve align_offset docs) - #63299 (Make qualify consts in_projection use PlaceRef) - #63312 (doc: fix broken sentence) - #63315 (Fix #63313) Failed merges: r? @ghost
2019-08-06Rollup merge of #63184 - JasonShin:master, r=sfacklerMazdak Farrokhzad-0/+2
Explaining the reason why validation is performed in to_str of path.rs I thought it's good to explain the reason for the validation during the conversion between Path/PathBuffer into str, which explains the reason for returning an Option at this point (good for beginners who are reading through the docs).
2019-08-06Auto merge of #62987 - Thomasdezeeuw:ioslice-advance, r=Thomasdezeeuwbors-1/+351
Add {IoSlice, IoSliceMut}::advance API inspired by the [`Buf::advance`](https://docs.rs/bytes/0.4.12/bytes/trait.Buf.html#tymethod.advance) method found in the [bytes](https://docs.rs/bytes) crate. Closes #62726.
2019-08-05Auto merge of #61491 - stjepang:impls-for-accesserror, r=dtolnaybors-0/+5
Add a few trait impls for AccessError
2019-08-04Add #[stable] to Error implStjepan Glavina-0/+1
2019-08-03Add {IoSlice, IoSliceMut}::advanceThomas de Zeeuw-1/+351
2019-08-02Auto merge of #63228 - Centril:rollup-x39p5ga, r=Centrilbors-64/+0
Rollup of 7 pull requests Successful merges: - #63107 (Added support for armv7-unknown-linux-gnueabi/musleabi) - #63121 (On `format!()` arg count mismatch provide extra info) - #63196 (build_helper: try less confusing method names) - #63206 (remove unsupported test case) - #63208 (Round generator sizes to a multiple of their alignment) - #63212 (Pretty print attributes in `print_arg`) - #63215 (Clarify semantics of mem::zeroed) Failed merges: r? @ghost
2019-08-03Rollup merge of #63206 - BaoshanPang:master, r=alexcrichtonMazdak Farrokhzad-64/+0
remove unsupported test case r? @alexcrichton
2019-08-02Auto merge of #62309 - jlevon:62302, r=alexcrichtonbors-1/+14
provide thread name to OS for Solarish systems Fixes #62302 Passes a Linux bootstrap build. python x.py test src/tools/tidy happy. I tested this with a small test binary that spawns a few threads, and verified that: - on an illumos system lacking the libc function, the binary runs but no OS-level thread names are set - on an illumos system with the feature, the binary runs, and the thread names are visible and correct under tools like MDB, pstack, core dump, etc.
2019-08-02remove unsupported test caseBaoshan Pang-64/+0
2019-08-02Auto merge of #63214 - Centril:rollup-hdb7dnx, r=Centrilbors-2/+2
Rollup of 7 pull requests Successful merges: - #62663 (More questionmarks in doctests) - #62969 (Changing the structure of `mir::interpret::InterpError`) - #63153 (Remove redundant method with const variable resolution) - #63189 (Doc improvements) - #63198 (Allow trailing comma in macro 2.0 declarations.) - #63202 (Fix ICE in #63135) - #63203 (Make is_mutable use PlaceRef instead of it's fields) Failed merges: r? @ghost
2019-08-02Rollup merge of #63189 - waywardmonkeys:doc-improvements, r=CentrilMazdak Farrokhzad-2/+2
Doc improvements Miscellaneous documentation fixes.
2019-08-02provide thread name to OS for Solarish systemsJohn Levon-1/+14
2019-08-02Auto merge of #61393 - gnzlbg:update_libc, r=gnzlbgbors-4/+21
Update Cargo.lock
2019-08-02Remove extraneous {} in use stmts in doc comments.Bruce Mitchener-2/+2
2019-08-01Remove mach dependencygnzlbg-12/+21
2019-08-01Update libc and use the Mach kernel APIs via the mach crate instead.gnzlbg-4/+12
2019-08-01Auto merge of #63194 - pietroalbini:rollup-xgnvb1b, r=pietroalbinibors-1/+1
Rollup of 8 pull requests Successful merges: - #62644 (simplify std::io::Write::write rustdoc) - #62971 (Add keywords item into the sidebar) - #63122 (Account for `maybe_whole_expr` in range patterns) - #63158 (Add test for issue-58951) - #63170 (cleanup StringReader fields) - #63179 (update test cases for vxWorks) - #63188 (Fix typos in release notes.) - #63191 (ci: fix toolstate not pushing data for Linux) Failed merges: r? @ghost
2019-08-01Rollup merge of #62644 - arnottcr:std_io-doc, r=steveklabnikPietro Albini-1/+1
simplify std::io::Write::write rustdoc The std::io::Write::write method currensly suggests consumers guaranteed that `0 <= n <= buf.len()`, for `Ok(n)`, however `n` is of type `usize` causing the compiler to emit a warning: ``` warning: comparison is useless due to type limits --> lib.rs:6:18 | 6 | Ok(n) => 0 <= n && n <= output.len(), | ^^^^^^ | = note: #[warn(unused_comparisons)] on by default ``` This PR removes the suggestion to check `0 <= n` since it is moot. r? @steveklabnik
2019-08-01Auto merge of #62507 - petrochenkov:macunstab, r=alexcrichtonbors-3/+2
Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]` `Encodable` and `Decodable` were deprecated before 1.0 and emitted an unsuppressable warning all this time. `#[bench]` is a part of the custom test framework feature and cannot be used meaningfully on stable, only as `cfg(false)`. Crater results can be found in https://github.com/rust-lang/rust/pull/62507#issuecomment-513850732 and below. This PR also reroutes the tracking issue for `feature(test)` from #27812 (compiler internals) to #50297 (custom test frameworks). Closes https://github.com/rust-lang/rust/issues/62048
2019-08-01Update src/libstd/path.rs to shorten the explanation for .to_str validation stepJason Shin-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-08-01Explaining the reason why validation is performed in to_str of path.rsJason Shin-0/+2
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-3/+2
2019-07-31Attempt to fix backtrace tests on i686-msvcAlex Crichton-1/+1
Some fixes for i686-msvc and Windows have landed on the `backtrace` crate but hadn't made their way here yet. Let's update that and see if it passes CI.
2019-07-30Rollup merge of #63117 - BaoshanPang:bugfix, r=alexcrichtonMazdak Farrokhzad-14/+3
Use global variable 'environ' to pass environments to rtpSpawn r? @alexcrichton
2019-07-30Rollup merge of #63109 - alexcrichton:disable-windows-fs-test, r=sfacklerMazdak Farrokhzad-2/+2
std: Fix a failing `fs` test on Windows In testing 4-core machines on Azure the `realpath_works_tricky` test in the standard library is failing with "The directory name is invalid". In attempting to debug this test I was able to reproduce the failure locally on my machine, and after inspecing the test it I believe is exploiting Unix-specific behavior that seems to only sometimes work on Windows. Specifically the test basically executes: mkdir -p a/b mkdir -p a/d touch a/f ln -s a/b/c ../d/e ln -s a/d/e ../f and then asserts that `canonicalize("a/b/c")` and `canonicalize("a/d/e")` are equivalent to `a/f`. On Windows however the first symlink is a "directory symlink" and the second is a file symlink. In both cases, though, they're pointing to files. This means that for whatever reason locally and on the 4-core environment the call to `canonicalize` is failing. On Azure today it seems to be passing, and I'm not entirely sure why. I'm sort of presuming that there's some sort of internals going on here where there's some global Windows setting which makes symlinks behavior more unix-like and ignore the directory hint. In any case this should keep the test working and also fixes the test locally for me. It's also worth pointing out that this test was made Windows compatible in https://github.com/rust-lang/rust/pull/31360, a pretty ancient PR at this point.
2019-07-29std: Fix a failing `fs` test on WindowsAlex Crichton-2/+2
In testing 4-core machines on Azure the `realpath_works_tricky` test in the standard library is failing with "The directory name is invalid". In attempting to debug this test I was able to reproduce the failure locally on my machine, and after inspecing the test it I believe is exploiting Unix-specific behavior that seems to only sometimes work on Windows. Specifically the test basically executes: mkdir -p a/b mkdir -p a/d touch a/f ln -s a/b/c ../d/e ln -s a/d/e ../f and then asserts that `canonicalize("a/b/c")` and `canonicalize("a/d/e")` are equivalent to `a/f`. On Windows however the first symlink is a "directory symlink" and the second is a file symlink. In both cases, though, they're pointing to files. This means that for whatever reason locally and on the 4-core environment the call to `canonicalize` is failing. On Azure today it seems to be passing, and I'm not entirely sure why. I'm sort of presuming that there's some sort of internals going on here where there's some global Windows setting which makes symlinks behavior more unix-like and ignore the directory hint. In any case this should keep the test working and also fixes the test locally for me.
2019-07-29use gloabl variable 'environ' to pass environments to rtpSpawnBaoshan Pang-14/+3
2019-07-28vxworks: Remove Linux-specific comments.Joe Richey-25/+1
2019-07-29Rollup merge of #62809 - alexcrichton:wasm-llvm-9, r=nikicMazdak Farrokhzad-134/+56
rustc: Update wasm32 support for LLVM 9 This commit brings in a number of minor updates for rustc's support for the wasm target which has changed in the LLVM 9 update. Notable updates include: * The compiler now no longer manually inserts the `producers` section, instead relying on LLVM to do so. LLVM uses the `llvm.ident` metadata for the `processed-by` directive (which is now emitted on the wasm target in this PR) and it uses debuginfo to figure out what `language` to put in the `producers` section. * Threaded WebAssembly code now requires different flags to be passed with LLD. In LLD we now pass: * `--shared-memory` - required since objects are compiled with atomics. This also means that the generated memory will be marked as `shared`. * `--max-memory=1GB` - required with the `--shared-memory` argument since shared memories in WebAssembly must have a maximum size. The 1GB number is intended to be a conservative estimate for rustc, but it should be overridable with `-C link-arg` if necessary. * `--passive-segments` - this has become the default for multithreaded memory, but when compiling a threaded module all data segments need to be marked as passive to ensure they don't re-initialize memory for each thread. This will also cause LLD to emit a synthetic function to initialize memory which users will have to arrange to call. * The `__heap_base` and `__data_end` globals are explicitly exported since they're now hidden by default due to the `--export` flags we pass to LLD.
2019-07-28Auto merge of #63090 - Centril:rollup-xnjwm2h, r=Centrilbors-2/+8
Rollup of 8 pull requests Successful merges: - #61856 (Lint attributes on function arguments) - #62360 (Document that ManuallyDrop::drop should not called more than once) - #62392 (Update minifier-rs version) - #62871 (Explicit error message for async recursion.) - #62995 (Avoid ICE when suggestion span is at Eof) - #63053 (SystemTime docs: recommend Instant for elapsed time) - #63081 (tidy: Cleanup the directory whitelist) - #63088 (Remove anonymous_parameters from unrelated test) Failed merges: r? @ghost
2019-07-28Rollup merge of #63053 - kornelski:clockdrift, r=shepmasterMazdak Farrokhzad-2/+8
SystemTime docs: recommend Instant for elapsed time Introduction to `SystemTime` mentions problems with non-monotonic clocks, but individual methods don't. For benefit of users who jump directly to method's documentation, also recommend `Instant` in `elapsed` and `duration_since`. `SystemTime::elapsed()` docs overpromised the elapsed time. It's not elapsed time, but a difference between two clocks.
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-0/+1
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-4/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-28SystemTime docs: recommend Instant for elapsed timeKornel-2/+8
2019-07-28Rollup merge of #62806 - mati865:clippy, r=TimNNMazdak Farrokhzad-4/+4
Fix few Clippy warnings
2019-07-27Auto merge of #63029 - petrochenkov:rpass, r=Centrilbors-1/+1
Move run-pass tests to ui This is the second attempt at doing https://github.com/rust-lang/rust/pull/53994 (which was previously reverted in https://github.com/rust-lang/rust/pull/54530). The issue with inability to run the test suite in a faster way (https://github.com/rust-lang/rust/issues/54047) that motivated the revert was recently addressed by https://github.com/rust-lang/rust/pull/61755. r? @Centril