-
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 9 pull requests #66403
Merged
Merged
Rollup of 9 pull requests #66403
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
We should use expect instead of unwrap. This commit is based on Manishearth/compiletest-rs#58. Thanks to @colin-kiegel.
Obtain timestamps for common inputs (e.g., libraries in run-lib path, or sources in `src/tool/compiletest/`) only once and reuse the result, instead of repeating the work for each test case. No functional changes intended.
…ebalance-coherence, r=estebank Improve errors after re rebalance coherence Following rust-lang#65247, I noticed that some error messages should be updated to reflect the changes of `re_rebalance_coherence` (also there was a [note](https://rust-lang.github.io/rfcs/2451-re-rebalancing-coherence.html#teaching-users) in the RFC about it). First, error message `E0210` was updated to match the RFC, and I also tried to improve a little the error when the "order" of types is problematic. For code like this: ``` #![feature(re_rebalance_coherence)] // Now stable struct Wrap<T>(T); impl<T> From<Wrap<T>> for T { fn from(x: Wrap<T>) -> T { x.0 } } ``` The old error was: ``` error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`) --> src/lib.rs:5:6 | 5 | impl<T> From<Wrap<T>> for T { | ^ type parameter `T` must be used as the type parameter for some local type | = note: only traits defined in the current crate can be implemented for a type parameter ``` and the new error is: ``` error[E0210]: type parameter `T` must be covered by another type when it appears before the first local type (`Wrap<T>`) --> main.rs:66:6 | 66 | impl<T> From<Wrap<T>> for T { | ^ type parameter `T` must be covered by another type when it appears before the first local type (`Wrap<T>`) | = note: implementing a foreign trait is only possible if at least one of the types for which is it implemented is local, and no uncovered type parameters appear before that first local type = note: in this case, 'before' refers to the following order: `impl<..> ForeignTrait<T1, ..., Tn> for T0`, where `T0` is the first and `Tn` is the last ``` I tried to point at the uncovered `T`, but couldn't get something which was reliable (but I'll be happy to try if someone points me in the right direction). r? @estebank cc @nikomatsakis Fixes rust-lang#65247
…, r=estebank fix an ICE in macro's diagnostic message This has two small fixes: 1. for the left brace, we don't need `<space>{`, simply `{` is enough. 2. for the right brace, it tries to peel off one character even when the close delim is missing. Without this fix, it would crash in some cases. (as shown in the new test case) r? @estebank
…enkov expand source_util macros with def-site context cc @petrochenkov See https://internals.rust-lang.org/t/spans-from-built-in-macro-expansions-are-not-from-expansion/11276/2 for context.
…ntril Tweak non-char/numeric in range pattern diagnostic Fixes rust-lang#66283 r? @estebank
Fix link to Exten in Vec::set_len Fixes rust-lang#66354 Unrelated to this PR, I think we should stop using `../../std/MODULE` and replace it with `../MODULE` that way if you're looking at docs in `core` or `alloc` clicking at a link won't forward you to `std`.
parser: don't use `unreachable!()` in `fn unexpected`. Fixes rust-lang#66357 r? @estebank
Improve error message in make_tests We should use expect instead of unwrap. This commit is based on Manishearth/compiletest-rs#58. Thanks to @colin-kiegel.
…imulacrum compiletest: Obtain timestamps for common inputs only once Obtain timestamps for common inputs (e.g., libraries in run-lib path, or sources in `src/tool/compiletest/`) only once and reuse the result, instead of repeating the work for each test case.
Fix broken links in Ipv4Addr::is_benchmarking docs [The documentation for `Ipv4Addr::is_benchmarking`](https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_benchmarking) is correct — it has the right RFC number — but the Markdown links are broken. Looks like a copy-and-paste error and a typo. This PR fixes the links to make them clickable.
@bors r+ p=9 rollup=never |
📌 Commit d145d1e has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Nov 14, 2019
bors
added a commit
that referenced
this pull request
Nov 14, 2019
Rollup of 9 pull requests Successful merges: - #66253 (Improve errors after re rebalance coherence) - #66264 (fix an ICE in macro's diagnostic message) - #66349 (expand source_util macros with def-site context) - #66351 (Tweak non-char/numeric in range pattern diagnostic) - #66360 (Fix link to Exten in Vec::set_len) - #66361 (parser: don't use `unreachable!()` in `fn unexpected`.) - #66363 (Improve error message in make_tests) - #66369 (compiletest: Obtain timestamps for common inputs only once) - #66372 (Fix broken links in Ipv4Addr::is_benchmarking docs) Failed merges: r? @ghost
Merged
☀️ Test successful - checks-azure |
This was referenced Nov 14, 2019
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
merged-by-bors
This PR was explicitly merged by bors.
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
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.
Successful merges:
unreachable!()
infn unexpected
. #66361 (parser: don't useunreachable!()
infn unexpected
.)Failed merges:
r? @ghost