-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 30 pull requests #37730
Merged
Merged
Rollup of 30 pull requests #37730
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
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.
Fix invalid src url Fixes rust-lang#37684. Thanks to @eddyb's help. r? @eddyb
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ p=100 |
📌 Commit 5dcf0e8 has been approved by |
@bors force |
bors
added a commit
that referenced
this pull request
Nov 12, 2016
Rollup of 30 pull requests - Successful merges: #37190, #37368, #37481, #37503, #37527, #37535, #37551, #37584, #37600, #37613, #37615, #37659, #37662, #37669, #37682, #37688, #37690, #37692, #37693, #37694, #37695, #37696, #37698, #37699, #37705, #37708, #37709, #37716, #37724, #37727 - Failed merges: #37640, #37689, #37717
This was referenced Nov 12, 2016
This was referenced Nov 12, 2016
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 #37724, Fix invalid src url #37727RUST_BACKTRACE=1
on travis to be more helpful. #37689, Refactoring towards region obligation #37717