-
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 15 pull requests #78303
Rollup of 15 pull requests #78303
Conversation
This reverts commit 56e115a.
#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the behavior of StaticMutex, we move part of the mutex implementation into libstd.
the commit avoid an alignement issue in Mutex implementation
When a range has finished iteration, `is_empty` returns true, so it should also be the case that `contains` returns false.
This removes a cause of `unwrap` and code complexity. This allows replacing ``` option_value = Some(build()); option_value.as_mut().unwrap() ``` with ``` option_value.insert(build()) ``` or ``` option_value.insert_with(build) ``` It's also useful in contexts not requiring the mutability of the reference. Here's a typical cache example: ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => { cache = Some(compute_cache_entry()); // unwrap is OK because we just filled the option &cache.as_ref().unwrap().content } }; ``` It can be changed into ``` let checked_cache = cache.as_ref().filter(|e| e.is_valid()); let content = match checked_cache { Some(e) => &e.content, None => &cache.insert_with(compute_cache_entry).content, }; ```
Simplify assert terminator only if condition evaluates to expected value
improve const infer error For type inference we probably have to be careful about subtyping and stuff but considering that subtyping shouldn't be relevant for constants I don't really see a reason why we may not want to reuse the const origin here. r? `@varkor`
Document inline-const Part of #76001. r? @spastorino
Add regression test for issue-77475 Closes #77475
Do not try to report on closures to avoid ICE Fixes #78262
Update description of Empty Enum for accuracy An empty enum is similar to the never type `!`, rather than the unit type `()`.
move `visit_predicate` into `TypeVisitor` Seems easier than dealing with `PredicateVisitor` for me which I needed for object safety checks for `PredicateAtom::ConstEvaluatable`. Is there a reason I am missing for this split? r? @matthewjasper
Always store Rustdoc theme when it's changed `switchTheme` (too) lazily updated the value of `rustdoc-theme` in `localStorage`, leading to an incorrect stored value when the system theme is the same as the default (`light`) theme. Fixes #78273
📌 Commit 9a132f5 has been approved by |
⌛ Testing commit 9a132f5 with merge 761e771ec71e0b9bb273436121cc3628861ed42b... |
Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
💔 Test failed - checks-actions |
@bors retry |
⌛ Testing commit 9a132f5 with merge f78bfd0904b6d0b9ed8e4bd42feb1c71bd6ef1d8... |
💔 Test failed - checks-actions |
Looks like this isn't spurious: ubuntu-base-16.04-core-armhf.tar.gz is gone from http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/. :( |
Successful merges:
#[deny(unsafe_op_in_unsafe_fn)]
in sys/cloudabi #75115 (#[deny(unsafe_op_in_unsafe_fn)]
in sys/cloudabi)insert
toOption
#77392 (addinsert
toOption
)visit_predicate
intoTypeVisitor
#78278 (movevisit_predicate
intoTypeVisitor
)Failed merges:
r? @ghost