-
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 17 pull requests #73486
Merged
Merged
Rollup of 17 pull requests #73486
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
When parsing `let x: i8 += 1` the compiler interprets `i8` as a trait which makes it more complicated to do error recovery. More advanced error recovery is not implemented in this commit.
Do not suggest new type param when encountering a missing type in an ADT field with generic parameters. Fix rust-lang#72640.
- Suggest borrowing expression if it would allow cast to work. - Suggest using `<Type>::from(<expr>)` when appropriate. - Minor tweak to `;` typo suggestion. Partily address rust-lang#47136.
…epmaster Add tests for 'impl Default for [T; N]' Related: rust-lang#71690. This pull request adds two tests: - Even it T::default() panics, no leaks occur. - [T; 0] is Default even if T is not. I believe at some moment `Default` impl for arrays will be rewritten to use const generics instead of macros, and these tests will help to prevent behavior changes.
…, r=nikomatsakis Further tweak lifetime errors involving `dyn Trait` and `impl Trait` in return position * Suggest substituting `'static` lifetime in impl/dyn `Trait + 'static` instead of `Trait + 'static + '_` * When `'static` is explicit, also suggest constraining argument with it * Reduce verbosity of suggestion message and mention lifetime in label * Tweak output for overlapping required/captured spans * Give these errors an error code Follow up to rust-lang#72543. r? @nikomatsakis
…i-obk remove visit_terminator_kind from MIR visitor For some reason, we had both `visit_terminator` and `visit_terminator_kind`. In contrast, for `Statement` we just have `visit_statement`. So this cleans things up by removing `visit_terminator_kind` and porting its users to `visit_terminator`.
…ies, r=shepmaster Complete the std::time documentation to warn about the inconsistencies between OS Fixes rust-lang#48980. I put the new documentation in `src/libstd/time.rs` at the module-level because it affects all types, even the one that are not directly system dependents if they are used with affected types, but there may be a better place for it.
…llaumeGomez Only highlight doc search results via mouseover if mouse has moved ## What happens - Go to https://doc.rust-lang.org/stable/std/index.html - Put your mouse cursor somewhere in the middle where search results will appear and then don't move the mouse - Press 's' to focus the search box - Type a query that brings up enough search results to go under where your mouse cursor is - Press the down arrow - The search result that is one below where your mouse cursor is will be highlighted. ## What I expected When not currently using the mouse, I expect doing a search and then pressing the down arrow to always highlight the first search result immediately below the search box. ## The fix This feels a bit hacky to me; I'm open to other solutions. This introduces a global JS var that keeps track of whether the person searching has moved their mouse after doing a search or not, and only uses the mouse position to highlight search results if the person HAS moved the mouse AFTER doing a search.
…matthewjasper Export `#[inline]` fns with extern indicators In ancient history (rust-lang#36280) we stopped `#[inline]` fns being codegened if they weren't used. However, - rust-lang#72944 - rust-lang#72463 observe that when writing something like ```rust #![crate_type = "cdylib"] #[no_mangle] #[inline] pub extern "C" fn foo() { // ... } ``` we really _do_ want `foo` to be codegened. This change makes this the case. Resolves rust-lang#72944, resolves rust-lang#72463 (and maybe some more)
…, r=kinnison Clean up some weird command strings r? @kinnison
…vidtwco Make new type param suggestion more targetted Do not suggest new type param when encountering a missing type in an ADT field with generic parameters. Fix rust-lang#72640.
…dtwco Tweak "non-primitive cast" error - Suggest borrowing expression if it would allow cast to work. - Suggest using `<Type>::from(<expr>)` when appropriate. - Minor tweak to `;` typo suggestion. Partily address rust-lang#47136.
…ers, r=dtolnay Mention functions pointers in the documentation Fixes rust-lang#51615. This mentions function pointers in the documentation for `core::mem::zeroed`, adding them to the list of types that are **always** wrong when zeroed, with `&T` and `&mut T`. @rustbot modify labels: T-doc, C-enhancement, T-libs
Fix typo in librustc_ast docs Fixed sentence by removing a word.
…=dtolnay Improve document for `Result::as_deref(_mut)` methods cc rust-lang#50264
…GuillaumeGomez Added tooltip for should_panic code examples This change adds a tooltip to the documentation for `should_panic` examples. It currently displays identically to `compile_fail` examples, save for the changed text. It may be helpful to change the color that this displays in to make it visually more clear what is going on, but I'm unsure if additional colors wouldn't just be distracting. I brought this [up on internals](https://internals.rust-lang.org/t/indicating-that-an-example-is-should-panic-in-docs/12544) a few days ago, and there seemed to be a mild positive response to it.
@bors r+ p=1 rollup=never |
📌 Commit 6c53a0c 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
Jun 18, 2020
☀️ Test successful - checks-azure |
This was referenced Jun 19, 2020
Merged
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.
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:
let x += 1
#71976 (Improve diagnostics forlet x += 1
)dyn Trait
andimpl Trait
in return position #72804 (Further tweak lifetime errors involvingdyn Trait
andimpl Trait
in return position)#[inline]
fns with extern indicators #73034 (Export#[inline]
fns with extern indicators)Result::as_deref(_mut)
methods #73447 (Improve document forResult::as_deref(_mut)
methods)Failed merges:
r? @ghost