about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-09-03Changed comment to better reflect std's exceptional situationDaniel Henry-Mantilla-4/+4
2019-09-03Added warning around code with reference to uninit bytesDaniel Henry-Mantilla-0/+8
2019-09-03Auto merge of #63869 - GuillaumeGomez:fix-build-failure, r=Mark-Simulacrumbors-1/+1
Fix build failure in case file doesn't exist It fixes the following issue: ```bash $ ./x.py test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1 Updating only changed submodules Submodules updated in 0.05 seconds Finished dev [unoptimized] target(s) in 0.15s thread 'main' panicked at 'source "/Users/imperio/rust/rust/build/x86_64-apple-darwin/doc/version_info.html" failed to get metadata: No such file or directory (os error 2)', src/build_helper/lib.rs:179:19 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. failed to run: /Users/imperio/rust/rust/build/bootstrap/debug/bootstrap test src/tools/linkchecker ./build/x86_64-apple-darwin/doc/ --stage 1 Build completed unsuccessfully in 0:00:01 ``` If the file doesn't exist, it makes sense anyway to just run the command in order to generate it. r? @Mark-Simulacrum
2019-09-02Auto merge of #63561 - HeroicKatora:alloc-private-bytes, r=oli-obkbors-139/+311
Make Allocation::bytes private Fixes #62931. Direct immutable access to the bytes is still possible but redirected through the new method `raw_bytes_with_undef_and_ptr`, similar to `get_bytes_with_undef_and_ptr` but without requiring an interpretation context and not doing *any* relocation or bounds checks. The `size` of the allocation is stored separately which makes access as `Size` and `usize` more ergonomic. cc: @RalfJung
2019-09-02Auto merge of #63692 - iluuu1994:issue-49660, r=sfacklerbors-0/+85
Test that Wrapping arithmetic ops are implemented for all int types Closes #49660
2019-09-02Generate version file if it doesn't existGuillaume Gomez-1/+1
2019-09-02Auto merge of #63834 - andjo403:rustdoc-linker-remove, r=Mark-Simulacrumbors-31/+6
remove the unstable rustdoc parameter --linker use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-09-01Auto merge of #63870 - estebank:async-fn-call, r=oli-obkbors-2102/+1317
Suggest call fn ctor passed as arg to fn with type param bounds _Reviewer note: the relevant changes are in the second commit, the first is simple and mechanical, but verbose._ When forgetting to call a fn in an argument position to an fn that has a generic bound: ```rust async fn foo() {} fn bar(f: impl Future<Output=()>) {} fn main() { bar(foo); // <- should be `bar(foo());` } ``` suggest calling it: ``` error[E0277]: the trait bound `fn() -> impl std::future::Future {foo}: std::future::Future` is not satisfied --> $DIR/async-fn-ctor-passed-as-arg-where-it-should-have-been-called.rs:9:5 | LL | fn bar(f: impl Future<Output=()>) {} | --------------------------------- required by `bar` ... LL | bar(foo); | ^^^ the trait `std::future::Future` is not implemented for `fn() -> impl std::future::Future {foo}` | = help: it looks like you forgot to use parentheses to call the function: `foo()` ``` Fix #63100. Follow up to #63833 and #63337.
2019-09-01Auto merge of #64057 - Centril:rollup-nwtk2fb, r=Centrilbors-32/+37
Rollup of 5 pull requests Successful merges: - #63410 (Update BufWriter example to include call to flush()) - #64029 (Account for rounding errors when deciding the diagnostic boundaries) - #64032 (rustdoc use -Ccodegen-units=1 by default for test compile) - #64039 (Update sync condvar doc style) - #64042 (Fix word repetition in str documentation) Failed merges: r? @ghost
2019-09-01Rollup merge of #64042 - juliangehring:string-docs, r=jonas-schievinkMazdak Farrokhzad-4/+4
Fix word repetition in str documentation Fixes a few repetitions of "like like" in the `trim*` methods documentation of `str`.
2019-09-01Rollup merge of #64039 - pickfire:patch-1, r=jonas-schievinkMazdak Farrokhzad-2/+2
Update sync condvar doc style
2019-09-01Rollup merge of #64032 - andjo403:codegen-units, r=Mark-SimulacrumMazdak Farrokhzad-0/+1
rustdoc use -Ccodegen-units=1 by default for test compile as the test is small we do not want split up in multiple codegen units and also as there is multiple test running at the same time this will reduce the number of concurrent threads tested the test time with `./x.py test src/libcore --doc` for my 16 core 32 thread cpu i get about 6% faster execution and my 2 core 4 thread cpu I get about 10% faster execution cc #63638 r? @Mark-Simulacrum
2019-09-01Rollup merge of #64029 - estebank:fix-miri, r=RalfJungMazdak Farrokhzad-4/+6
Account for rounding errors when deciding the diagnostic boundaries Fix Miri by fixing the bug raised in https://github.com/rust-lang/rust/pull/63402#discussion_r319485328. Fixes https://github.com/rust-lang/rust/issues/64020
2019-09-01Rollup merge of #63410 - johnterickson:master, r=joshtriplettMazdak Farrokhzad-22/+24
Update BufWriter example to include call to flush() I was playing with a writing a Huffman encoder/decoder and was getting weird corruptions and truncations. I finally realized it was was because `BufWriter` was swallowing write errors 😬. I've found Rust to generally be explicit and err on the safe side, so I definitely found this unintuitive and not "rustic". https://twitter.com/johnterickson/status/1159514988123312128
2019-09-01review commentEsteban Küber-4/+3
2019-09-01Auto merge of #64036 - matthewjasper:kill-borrows-on-self-assign, r=estebankbors-4/+24
Kill borrows from assignments after generating new borrows Closes #63719
2019-09-01remove the unstable rustdoc parameter --linkerAndreas Jonson-31/+6
use the code generation parameter -Clinker (same parameter as rustc) to control what linker to use for building the rustdoc test executables. closes: #63816
2019-08-31Use saturating_subEsteban Küber-4/+6
2019-08-31Fix nll testsEsteban Küber-37/+24
2019-08-31Auto merge of #63703 - tommilligan:warn-empty-doctest, r=ollie27bors-10/+59
rustdoc: warn on empty doc test Closes #60319. A doc test that only contains whitespace should result in a warning. This PR adds detection of empty doc tests to `check-code-block-syntax`, as having an invalid doc test is mutually exclusive with an empty doc test.
2019-08-31Reorder AllocationDefinedness membersAndreas Molzer-2/+3
This improves the clarity of the documentation a bit since they can reference each other when reading the member docs in sequence.
2019-08-31Fix word repetition in str documentationJulian Gehring-4/+4
Fixes a few repetitions of "like like" in the `trim*` methods documentation of `str`.
2019-08-31Auto merge of #64025 - Wind-River:master_003, r=alexcrichtonbors-324/+0
remove directory libstd/sys/vxworks/backtrace which is not used any more r? @alexcrichton cc @n-salim
2019-08-31Improve documentation around allocation accessorsAndreas Molzer-8/+13
2019-08-31Update sync condvar doc styleIvan Tham-2/+2
2019-08-31clarify that not all errors are observedJohn Erickson-2/+3
2019-08-31Add in generic type to description of BufReader and BufWriterJohn Erickson-17/+17
2019-08-31Update BufWriter example to include call to flush()John Erickson-6/+7
2019-08-31Kill borrows from assignments after generating new borrowsMatthew Jasper-4/+24
2019-08-31fix rebaseEsteban Küber-1/+1
2019-08-31review comments: reword commentEsteban Küber-4/+4
2019-08-31Suggest call fn ctor passed as arg to fn with type param boundsEsteban Küber-7/+117
2019-08-31Use span label instead of note for cause in E0631Esteban Küber-2058/+1177
2019-08-31Auto merge of #63991 - Centril:unique-improper-ctype, r=rkruppebors-13/+23
`improper_ctypes`: guard against accidental change to `Unique<T>` r? @eddyb
2019-08-30Tweak terminal width trimmingEsteban Küber-2/+2
Properly account for left margin when setting terminal width through CLI flag and don't trim code by default if we can't get the terminal's dimensions.
2019-08-31Auto merge of #63975 - topecongiro:rustfmt-1.4.6, r=nikomatsakisbors-6/+21
Update rustfmt to 1.4.6 This PR updates rustfmt to 1.4.6. [CHANGELOG](https://github.com/rust-lang/rustfmt/blob/v1.4.6/CHANGELOG.md#146-2019-08-28).
2019-08-30Account for rounding errors when deciding the diagnostic boundariesEsteban Küber-2/+2
2019-08-31improper_ctypes: guard against accidental change to Unique<T>.Mazdak Farrokhzad-13/+23
2019-08-30Auto merge of #64026 - Centril:rollup-le667lp, r=Centrilbors-135/+209
Rollup of 7 pull requests Successful merges: - #62957 (Match the loop examples) - #63600 (Merge oli-obk mail addresses) - #63684 (Constify LinkedList new function) - #63847 ([rustdoc] Fix system theme detection) - #63999 (Add missing links on AsRef trait) - #64014 ( miri: detect too large dynamically sized objects ) - #64015 (some const-eval test tweaks) Failed merges: r? @ghost
2019-08-30Rollup merge of #64015 - RalfJung:const-tests, r=oli-obkMazdak Farrokhzad-60/+84
some const-eval test tweaks Best reviewed commit-by-commit. r? @oli-obk
2019-08-30Rollup merge of #64014 - RalfJung:miri-slice, r=oli-obkMazdak Farrokhzad-59/+105
miri: detect too large dynamically sized objects Needed to make https://github.com/rust-lang/miri/pull/929 pass. r? @oli-obk
2019-08-30Rollup merge of #63999 - GuillaumeGomez:as-ref-missing-links, r=Mark-SimulacrumMazdak Farrokhzad-11/+13
Add missing links on AsRef trait cc @rust-lang/docs
2019-08-30Rollup merge of #63847 - GuillaumeGomez:system-theme-detection, r=kinnisonMazdak Farrokhzad-1/+2
[rustdoc] Fix system theme detection Fixes #63830 The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue. cc @fenhl r? @kinnison
2019-08-30Rollup merge of #63684 - GrayJack:const_list_new, r=CentrilMazdak Farrokhzad-1/+1
Constify LinkedList new function Change the `LinkedList::new()` function to become a const fn, allowing the use in constant context.
2019-08-30Rollup merge of #62957 - dns2utf8:doc_loop_keyword, r=GuillaumeGomezMazdak Farrokhzad-3/+4
Match the loop examples The idea is to show the usefulness of the expression side by side.
2019-08-30remove directory libstd/sys/vxworks/backtrace which is not used any moreBaoshan Pang-324/+0
2019-08-30rustdoc use -Ccodegen-units=1 by default for test compileAndreas Jonson-0/+1
as the test is small we do not want split up in multiple codegen units and also as there is multiple test running at the same time this will reduce the number of concurrent threads
2019-08-30Auto merge of #63982 - sam09:fix-63976, r=estebankbors-3/+8
When accessing private field of union, do not misidentify it as a struct Fix incorrect error message when accessing private field of union. Fixes #63976.
2019-08-30Auto merge of #64018 - flip1995:clippyup, r=oli-obkbors-16/+7
Update Clippy cc rust-lang/rust-clippy#4475 r? @oli-obk
2019-08-30add testRalf Jung-0/+29