-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 29 pull requests #37726
Closed
Closed
Rollup of 29 pull requests #37726
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The current wording [seems to be confusing](https://www.reddit.com/r/rust/comments/5aat03/why_is_implementing_traits_on_primitive_types/). As an explanation when and why this could be considered as poor style would go beyond of the scope of this chapter I suggest to remove this remark.
Use where clasues and only where clauses for bounds in the iterators for Graph. The rest of the code uses bounds on the generic declarations for Debug, and we may want to change those to for consistency. I did not do that here because I don't know whether or not that's a good idea. But for the iterators, they were inconsistent causing confusion, at least for me.
Also used those general iterators in other methods.
`cargo new` now creates a `src/lib.rs` with a `tests` module by default. I've updated the earlier examples in this doc to reflect this. However, I don't know how we want to approach the "introduction" to idiomatic testing that follows in "the tests module" section. I _think_ it should be broken apart, with the module concept being introduced early on, and the `super` concept being addressed when we hit the `add_two` example. I'd like to get agreement on that being the right approach before I do it though. I _also_ removed the `#fn main() {}` hidden at the beginning of each example, as these cause Rust Playground to not treat the file as a set of tests that it can run. Removing it _should_ cause Rust Playground to display a "Test >" button in the top left when a user runs the code, which will allow them to see the test runner output.
This allows the initial build of src/bootstrap itself to use a local cargo taken from `configure --local-rust-root`. It was already finding rustc this way, but was always downloading cargo since it didn't know where to find it. It now matches the same logic that `config.rs` will use for stage0, where both rustc and cargo are taken from `CFG_LOCAL_RUST_ROOT`.
Without these changes, play.rust-lang.org (as of today) would wrap our examples in `fn main() {}`. This prevents the user from being able to easily run the tests.
The narrative flows better if we follow what @steveklabnik is doing in rust-lang/book#288. Therefore, I completely copied it.
I had used `/tmp/adder` for my previous commits. Flipped over to `/home/you/projects/adder` for consistency with other parts of testing.md
Move all Linux/OSX CI infastructure to Travis This commit configures our `.travis.yml` to test the full suite of tests we have on Buildbot right now. A whole mess of docker images are added to the `src/ci` directory which represent all the build environments for each configuration. Each of these environments is then configured in `.travis.yml` to run on the auto branch. Note that the full matrix of tests aren't intended to be run on all PRs. Instead, we continue to run only one entry in the matrix, forcing all others to finish quickly. Only the `auto` branch should run the full matrix of builds. Also note that the infrastructure hasn't quite been allocated yet to the rust-lang/rust repository, so everything is disabled for now except for the one build that happens on PRs. Once that infrastructure is allocated though we can enable this and let it fly! Notable modifications from the current test suite today: * Android tests are run in rustbuild instead of the makefiles, for whatever reason I couldn't get the makefiles to work on Travis. * A debuginfo test was updated to work with the current version of the Android NDK. * Some dependencies in `mk/tests.mk` were fixed to allow running tests in parallel.
Add changelog for 1.13.0 The diagnostics PRs are excellent and some have excellent examples thanks @jonathandturner @estebank. [Here are some notes about the performance changes during the release. Compile times are improved %40 in some cases](https://gist.github.com/brson/1404c4bf4868d7d108f240a6ecba7f31). This desires to be backported to beta for 1.13. Sadly, the [1.12.1 changelog PR](rust-lang#37317) has not merged to master yet, and is sitting in a [rollup PR](rust-lang#37597). r? @rust-lang/lang @rust-lang/compiler @rust-lang/libs @rust-lang/core
Add support for ARMv5TE architecture
…eddyb introduce a `fudge_regions_if_ok` to address false region edges Fixes rust-lang#37655. r? @eddyb cc @sfackler
Add documentation to some of the unstable intrinsics Part of rust-lang#34338
Add missing urls for FusedIterator and TrustedLen traits r? @steveklabnik
rustbuild: enable an initial local cargo This allows the initial build of src/bootstrap itself to use a local cargo taken from `configure --local-rust-root`. It was already finding rustc this way, but was always downloading cargo since it didn't know where to find it. It now matches the same logic that `config.rs` will use for stage0, where both rustc and cargo are taken from `CFG_LOCAL_RUST_ROOT`.
[8/n] rustc: clean up lookup_item_type and remove TypeScheme. _This is part of a series ([prev](rust-lang#37676) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> * `tcx.tcache` -> `tcx.item_types` * `TypeScheme` (grouping `Ty` and `ty::Generics`) is removed * `tcx.item_types` entries no longer duplicated in `tcx.tables.node_types` * `tcx.lookup_item_type(def_id).ty` -> `tcx.item_type(def_id)` * `tcx.lookup_item_type(def_id).generics` -> `tcx.item_generics(def_id)` * `tcx.lookup_generics(def_id)` -> `tcx.item_generics(def_id)` * `tcx.lookup_{super_,}predicates(def_id)` -> `tcx.item_{super_,}predicates(def_id)`
rustbuild: support RelWithDebInfo for llvm r? @alexcrichton
Balance the debug output of Lvalue Subslice The current debug output for Lvalue Subslice is not balanced and does not respect the comment[1], which indicates that we use `slice[from:-to] in Python terms.`. In python terms slices which have a start but no end are written as `a[start:]`, so following the comment, I fixed the output accordingly. Grep-ing over the sources, I did not found any test cases checking this subslice debug output. Note, I have not yet tested this change yet, as I am still waiting for the end of LLVM compilation. [1] https://manishearth.github.io/rust-internals-docs/rustc/mir/enum.ProjectionElem.html
ICH: Add test case for call expressions. r? @nikomatsakis
ICH: Add test case for if- and if-let-expressions. r? @nikomatsakis
…chton On fmt string with unescaped `{` note how to escape On cases of malformed format strings where a `{` hasn't been properly escaped, like `println!("{");`, present a NOTE explaining how to escape the `{` char. Fix rust-lang#34300.
Remove one bounds check from BufReader Very minor thing. Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead. CC rust-lang#37573
Add missing urls for marker's traits r? @steveklabnik
…r=brson std: Derive `Default` for `Duration`. Discussed in rust-lang#37546 the libs team reached the conclusion that a default zero duration seems like a reasonable implementation of the `Default` trait. Closes rust-lang#37546
Avoid unnecessary mk_ty calls in Ty::super_fold_with. This speeds up compilation of several rustc-benchmarks by 1--2% and the workload in rust-lang#36799 by 5%. r? @eddyb
change the `box_free` lang item to accept pointers to unsized types in miri we use the `box_free` lang item as the destructor for `Box` objects, since the function's api matches that of an `fn drop(&mut self)` in a hypothetical `impl<T: ?Sized> Drop for Box<T>` exactly. This works fine except if we insert a check in the `size_of` intrinsic to ensure that it is only called with sized types, since the `box_free` lang item calls that intrinsic. cc @eddyb no clue who to r? here, probably lang team?
…chton vec: Write the .extend() specialization in cleaner style As far as possible, use regular `default fn` specialization in favour of ad-hoc conditionals. No intentional functional change. Code quality was validated against the same benchmarks that were used in initial trusted len development. This change is prompted by taking impressions from rust-lang#27749 (comment)
Bump verison to 1.15.0 The bootstrap compiler still needs to be updated, but that's waiting on new betas.
r? @arielb1 (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=10 |
📌 Commit c604dd2 has been approved by |
⌛ Testing commit c604dd2 with merge 14d64c8... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fudge_regions_if_ok
to address false region edges #37659, Add documentation to some of the unstable intrinsics #37662, Add missing urls for FusedIterator and TrustedLen traits #37669, rustbuild: enable an initial local cargo #37682, [8/n] rustc: clean up lookup_item_type and remove TypeScheme. #37688, rustbuild: support RelWithDebInfo for llvm #37690, Balance the debug output of Lvalue Subslice #37692, ICH: Add test case for call expressions. #37693, ICH: Add test case for if- and if-let-expressions. #37694, On fmt string with unescaped{
note how to escape #37695, Remove one bounds check from BufReader #37696, Add missing urls for marker's traits #37698, std: DeriveDefault
forDuration
. #37699, Avoid unnecessary mk_ty calls in Ty::super_fold_with. #37705, change thebox_free
lang item to accept pointers to unsized types #37708, vec: Write the .extend() specialization in cleaner style #37709, Mem urls #37716, Bump verison to 1.15.0 #37724RUST_BACKTRACE=1
on travis to be more helpful. #37689