Skip to content
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

Closed
wants to merge 55 commits into from
Closed

Rollup of 15 pull requests #78303

wants to merge 55 commits into from

Conversation

jonas-schievink
Copy link
Contributor

Successful merges:

Failed merges:

r? @ghost

francesca64 and others added 30 commits October 7, 2020 15:46
#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`
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
@jonas-schievink
Copy link
Contributor Author

@bors r+ rollup=never p=15

@rustbot modify labels: rollup

@rustbot rustbot added the rollup A PR which is a rollup label Oct 23, 2020
@bors
Copy link
Contributor

bors commented Oct 23, 2020

📌 Commit 9a132f5 has been approved by jonas-schievink

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Oct 23, 2020
@bors
Copy link
Contributor

bors commented Oct 23, 2020

⌛ Testing commit 9a132f5 with merge 761e771ec71e0b9bb273436121cc3628861ed42b...

@rust-log-analyzer
Copy link
Collaborator

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 @rust-lang/infra. (Feature Requests)

@bors
Copy link
Contributor

bors commented Oct 23, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 23, 2020
@jonas-schievink
Copy link
Contributor Author

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2020
@bors
Copy link
Contributor

bors commented Oct 23, 2020

⌛ Testing commit 9a132f5 with merge f78bfd0904b6d0b9ed8e4bd42feb1c71bd6ef1d8...

@bors
Copy link
Contributor

bors commented Oct 23, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 23, 2020
@m-ou-se
Copy link
Member

m-ou-se commented Oct 23, 2020

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/. :(

@jonas-schievink
Copy link
Contributor Author

@jonas-schievink jonas-schievink deleted the rollup-d4emvwm branch October 23, 2020 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.