- 18 9月, 2020 1 次提交
-
-
由 Pietro Albini 提交于
The Rust version number is currently embedded in bootstrap's source code, which makes it hard to update it automatically or access it outside of ./x.py (as you'd have to parse the source code). This commit moves the version number to a standalone plaintext file, which makes accessing or updating it trivial.
-
- 17 9月, 2020 20 次提交
-
-
由 bors 提交于
Improve E0118 - Changes the "base type" terminology to "nominal type" (according to the [reference](https://doc.rust-lang.org/stable/reference/items/implementations.html#inherent-implementations)). - Suggests removing a reference, if one is present on the type. - Clarify what is meant by a "nominal type". closes #69392 This is my first not-entirely-trivial PR, so please let me know if I missed anything or if something could be improved. Though I probably won't be able to fix anything in the upcoming week.
-
由 bors 提交于
Rollup of 16 pull requests Successful merges: - #75026 (Add array_windows fn) - #76642 (Do not lint ignored private doc tests) - #76719 (Change error message for ty param in const) - #76721 (Use intra-doc links in `core::mem`) - #76728 (Add a comment why `extern crate` is necessary for rustdoc) - #76735 (Remove unnecessary `clone()`s in bootstrap) - #76741 (Avoid printing dry run timings) - #76747 (Add missing code examples in libcore) - #76756 (fix a couple of stylistic clippy warnings) - #76758 ([fuchsia] Propagate the userspace UTC clock) - #76759 (Fix stabilization marker for future_readiness_fns) - #76760 (don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations)) - #76764 (Update books) - #76775 (Strip a single leading tab when rendering dataflow diffs) - #76778 (Simplify iter fuse struct doc) - #76794 (Make graphviz font configurable) Failed merges: r? `@ghost`
-
由 Tyler Mandry 提交于
Make graphviz font configurable Alternative to PR #76776. To change the graphviz output to use an alternative `fontname` value, add a command line option like: `rustc --graphviz-font=monospace`. r? @ecstatic-morse
-
由 Tyler Mandry 提交于
Simplify iter fuse struct doc
-
由 Tyler Mandry 提交于
Strip a single leading tab when rendering dataflow diffs The `fmt_diff_with` formatter uses a tab to separate additions from subtractions. Strip it when rendering those diffs on separate lines. r? @Mark-Simulacrum (since you're speedy)
-
由 Tyler Mandry 提交于
Update books ## nomicon 1 commits in 25854752549d44d76fbd7650e17cb4f167a0b8fb..6e57e64501f61873ab80cb78a07180a22751a5d6 2020-08-19 16:41:48 -0400 to 2020-09-14 11:40:23 -0400 - Fix API change to alloc::Global::grow. (rust-lang-nursery/nomicon#236) ## reference 3 commits in 25391dba46262f882fa846beefaff54a966a8fa5..56a13c082ee90736c08d6abdcd90462517b703d3 2020-09-02 07:22:55 -0700 to 2020-09-14 23:20:16 -0700 - Update the description of staticlib (rust-lang-nursery/reference#884) - Rust 1.46 now allows more features in const fn (rust-lang-nursery/reference#883) - Document the enum changes in RFC 2195 (rust-lang-nursery/reference#879) ## book 1 commits in e5ed97128302d5fa45dbac0e64426bc7649a558c..cb28dee95e5e50b793e6ba9291c5d1568d3ad72e 2020-08-31 12:53:40 -0500 to 2020-09-09 10:06:00 -0500 - Fixed the error message of invalid array element access in ch03.2 (rust-lang/book#2446)
-
由 Tyler Mandry 提交于
don't lazily evaluate some trivial values for Option::None replacements (clippy::unnecessary_lazy_evaluations)
-
由 Tyler Mandry 提交于
Fix stabilization marker for future_readiness_fns Updated the rustc version in which this will be stabilized from `1.47.0 -> 1.48.0`. Fixes https://github.com/rust-lang/rust/pull/74328#issuecomment-692133125. Ref #70921. r? @Dylan-DPC
-
由 Tyler Mandry 提交于
[fuchsia] Propagate the userspace UTC clock On Fuchsia, spawning a subprocess does not automatically clone all of the parent process' capabilities. UTC time on Fuchsia is managed by a top-level userspace clock capability that is cloned and passed to subprocesses. This change ensures that any Rust subprocess gets access to the UTC clock, if the parent had access to it. This is critical for tests, which on Fuchsia, use panic=abort and spawn subprocesses per test.
-
由 Tyler Mandry 提交于
fix a couple of stylistic clippy warnings namely: clippy::redundant_pattern_matching clippy::redundant_pattern clippy::search_is_some clippy::filter_next clippy::into_iter_on_ref clippy::clone_on_copy clippy::needless_return
-
由 Tyler Mandry 提交于
Add missing code examples in libcore
-
由 Tyler Mandry 提交于
Avoid printing dry run timings This avoids a wall of text on CI with 0.000 as the likely time. r? @alexcrichton
-
由 Tyler Mandry 提交于
Remove unnecessary `clone()`s in bootstrap The performance difference is negligible, but it makes me feel better. r? @Mark-Simulacrum
-
由 Tyler Mandry 提交于
Add a comment why `extern crate` is necessary for rustdoc r? @ehuss From https://github.com/rust-lang/rust/pull/74293#discussion_r488335500.
-
由 Tyler Mandry 提交于
Use intra-doc links in `core::mem` Part of #75080. Last one for now! --- @rustbot modify labels: A-intra-doc-links T-doc
-
由 Tyler Mandry 提交于
Change error message for ty param in const This PR introduces the following changes: * Change error message for type param in a const expression when using `min_const_generics` * Change `ParamInNonTrivialAnonConst` to contain an extra `bool` used for distinguishing whether the passed-in symbol is a type or a value. Fixes #76701
-
由 Tyler Mandry 提交于
Do not lint ignored private doc tests Fixes #76457. r? @ehuss
-
由 Tyler Mandry 提交于
Add array_windows fn This mimicks the functionality added by array_chunks, and implements a const-generic form of `windows`. It makes egregious use of `unsafe`, but by necessity because the array must be re-interpreted as a slice of arrays, and unlike array_chunks this cannot be done by casting the original array once, since each time the index is advanced it needs to move one element, not `N`. I'm planning on adding more tests, but this should be good enough as a premise for the functionality. Notably: should there be more functions overwritten for the iterator implementation/in general? ~~I've marked the issue as #74985 as there is no corresponding exact issue for `array_windows`, but it's based of off `array_chunks`.~~ Edit: See Issue #75027 created by @lcnr for tracking issue ~~Do not merge until I add more tests, please.~~ r? @lcnr
-
由 Rich Kadel 提交于
Overrides the debugging_opts.graphviz_font setting.
-
由 bors 提交于
Add aarch64-unknown-linux-musl host builds This adds aarch64-unknown-linux-musl to the hosts list and adds the build to the dist-arm-linux builder as `@Mark-Simulacrum` suggested to me in Zulip. `@jyn514` requested to be mentioned
😄 I had to update the config for crosstool-ng as it had a prompt about the glibc version. I ran `src/ci/docker/run.sh dist-arm-linux` to test it. ``` Build completed successfully in 1:31:50 Compile requests 8180 Compile requests executed 8135 Cache hits 287 Cache misses 7848 Cache timeouts 0 Cache read errors 0 Forced recaches 0 Cache write errors 0 Compilation failures 0 Cache errors 0 Non-cacheable compilations 0 Non-cacheable calls 36 Non-compilation calls 9 Unsupported compiler calls 0 Average cache write 0.000 s Average cache read miss 6.389 s Average cache read hit 0.000 s Cache location Local disk: "/sccache" Cache size 202 MiB Max cache size 10 GiB == clock drift check == local time: Sun Sep 6 19:30:17 UTC 2020 network time: Sun, 06 Sep 2020 19:30:17 GMT == end clock drift check == ``` Only errors were in miri due to struct fields being private (already been reported [here](https://github.com/rust-lang/rust/issues/76337)) Edit: Maybe it is helpful if I add that it is a working compiler ```sh /rust-nightly-aarch64-unknown-linux-musl # ash install.sh install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh install: installing component 'rustc' install: installing component 'cargo' install: installing component 'rls-preview' install: installing component 'rust-analyzer-preview' install: installing component 'clippy-preview' install: installing component 'rustfmt-preview' install: installing component 'llvm-tools-preview' install: installing component 'rust-analysis-aarch64-unknown-linux-musl' install: installing component 'rust-std-aarch64-unknown-linux-musl' install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error Rust is ready to roll. / # cat test.rs fn main() { println!("hello world"); } / # rustc test.rs / # ./test hello world # file test test: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped ```
-
- 16 9月, 2020 19 次提交
-
-
由 Rich Kadel 提交于
Alternative to PR ##76776. To change the graphviz output to use an alternative `fontname` value, add a command line option like: `rustc --graphviz-font=monospace`.
-
由 kadmin 提交于
Updated issue to #75027 Update to rm oob access And hopefully fix docs as well Fixed naming conflict in test Fix test which used 1-indexing Nth starts from 0, woops Fix a bunch of off by 1 errors See https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=757b311987e3fae1ca47122969acda5a Add even more off by 1 errors And also write `next` and `next_back` in terms of `nth` and `nth_back`. Run fmt Fix forgetting to change fn name in test add nth_back test & document unsafe Remove as_ref().unwrap() Documented occurrences of unsafe, noting what invariants are maintained
-
由 bors 提交于
Rollup of 10 pull requests Successful merges: - #76669 (Prefer asm! over llvm_asm! in core) - #76675 (Small improvements to asm documentation) - #76681 (remove orphaned files) - #76694 (Introduce a PartitioningCx struct) - #76695 (fix syntax error in suggesting generic constraint in trait parameter) - #76699 (improve const infer error) - #76707 (Simplify iter flatten struct doc) - #76710 (
⬆ rust-analyzer) - #76714 (Small docs improvements) - #76717 (Fix generating rustc docs with non-default lib directory.) Failed merges: r? `@ghost` -
由 Joshua Nelson 提交于
The performance difference is negligible, but it makes me feel better. Note that this does not remove some clones in `config`, because it would require changing the logic around (and performance doesn't matter for bootstrap).
-
由 Dylan DPC 提交于
Fix generating rustc docs with non-default lib directory. If `libdir` is set in `config.toml`, then the tool to generate the rustc docs was unable to run `rustc` because it could not find the shared libraries. The solution is to set the dylib search path to include the libdir. I changed the API of `add_rustc_lib_path` to take `Command` instead of `Cargo` to try to share the code in several places. This is how it worked before https://github.com/rust-lang/rust/pull/64316, and I think this still retains the spirit of that change. Fixes #76702
-
由 Dylan DPC 提交于
Small docs improvements @rustbot modify labels: T-doc T-compiler
-
由 Dylan DPC 提交于
Simplify iter flatten struct doc
-
由 Dylan DPC 提交于
improve const infer error cc #72328 reduces it from ``` error[E0282]: type annotations needed --> src/main.rs:17:5 | 17 | Foo.bar().bar().bar().bar().baz(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: unable to infer the value of a const parameter ``` to ``` error[E0282]: type annotations needed --> $DIR/method-chain.rs:21:33 | LL | Foo.bar().bar().bar().bar().baz(); | ^^^ | = note: cannot infer the value of the const parameter `N` ``` r? @varkor
-
由 Dylan DPC 提交于
fix syntax error in suggesting generic constraint in trait parameter suggest `where T: Foo` for the first bound on a trait, then suggest `, T: Foo` when the suggested bound would add to an existing set of `where` clauses. `where T: Foo` may be the first bound if `T` has a default, because we'd rather suggest ``` trait A<T=()> where T: Copy ``` than ``` trait A<T: Copy=()> ``` for legibility reasons. the test case i added here is derived from [this reproduction](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=0bf3ace9f2a183d0bdbd748c6b8e3971): ``` struct B<T: Copy> { t: T } trait A<T = ()> { fn returns_constrained_type(&self, t: T) -> B<T> { B { t } } } ``` where the suggested fix, ``` trait A<T = ()>, T: Copy { ... } ``` is in fact invalid syntax! i also found an error in the existing suggestion for `trait Base<T = String>: Super<T>` where rustc would suggest `trait Base<T = String>: Super<T>, T: Copy`, but `T: Copy` is the first of the trait's `where` clauses and should be `where T: Copy` as well. the test for that suggestion expects invalid syntax, and has been revised to a compiler-pleasing `trait Base<T = String>: Super<T> where T: Copy`. judging by https://github.com/rust-lang/rust/pull/70009 i'll.. cc @estebank ?
-
由 Dylan DPC 提交于
Introduce a PartitioningCx struct This contains all the data used by the partitioning algorithm and allows that data to be used at each stage of the partitioning. This is useful for other approaches to partitioning which may want different pieces of the data available at each step. cc @rust-lang/wg-incr-comp
-
由 Dylan DPC 提交于
remove orphaned files Should been part of https://github.com/rust-lang/rust/pull/74163
-
由 Dylan DPC 提交于
Small improvements to asm documentation Save people from searching and reading tons of comments in tracking issues.
-
由 Dylan DPC 提交于
Prefer asm! over llvm_asm! in core Replace llvm_asm! with asm! in core. x86 asm compare (in somecases I replaced generic type with String). * https://rust.godbolt.org/z/59eEMv * https://rust.godbolt.org/z/v78s6q * https://rust.godbolt.org/z/7qYY41
-
由 Lzu Tao 提交于
Co-authored-by: NAmanieu <amanieu@gmail.com>
-
由 bors 提交于
Rollup of 10 pull requests Successful merges: - #76056 (Add more info for Vec Drain doc) - #76062 (Vec slice example fix style and show type elision) - #76262 (Use inline(never) instead of cold) - #76335 (Make all methods of `Duration` unstably const) - #76366 (Add Arith Tests in Library) - #76369 (Move Various str tests in library) - #76534 (Add doc comments for From impls) - #76622 (Update bootstrap readme) - #76641 (Some cleanup changes and commenting) - #76662 (Fix liballoc test suite for Miri) Failed merges: r? `@ghost`
-
由 Ralf Jung 提交于
Fix liballoc test suite for Miri Mostly, fix the regression introduced by https://github.com/rust-lang/rust/pull/75207 that caused slices (i.e., references) to be created to invalid memory or memory that has aliasing pointers that we want to keep valid. @dylni this changes the type of `check_range` to only require the length, not the full reference to the slice, which indeed is all the information this function requires. Also reduce the size of a test introduced in https://github.com/rust-lang/rust/pull/70793 to make it not take 3 minutes in Miri. This makes https://github.com/RalfJung/miri-test-libstd work again.
-
由 Ralf Jung 提交于
Update bootstrap readme - Reflect changes in x.py defaults - Remove recommendation to use nightly for incremental; it works fine on beta - Remove note that incremental chooses stage 1 by default; stage 1 is already the default - Update Discord -> Zulip r? @Mark-Simulacrum
-