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 7 pull requests #71410

Merged
merged 22 commits into from
Apr 22, 2020
Merged

Rollup of 7 pull requests #71410

merged 22 commits into from
Apr 22, 2020

Conversation

JohnTitor
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

sinkuu and others added 22 commits April 20, 2020 17:59
…turn

During development, a function could have a return type set that is a
bare trait object by accident. We already suggest using either a boxed
trait object or `impl Trait` if the return paths will allow it. We now
do so too when there are *no* return paths or they all resolve to `!`.
We still don't handle cases where the trait object is *not* the entirety
of the return type gracefully.
When the return type is `!Sized` we look for all the returned
expressions in the body to fetch their types and provide a reasonable
suggestion. The tail expression of the body is normally evaluated after
checking whether the return type is `Sized`. Changing the order of the
evaluation produces undesirable knock down effects, so we detect the
specific case that newcomers are likely to encounter ,returning a single
bare trait object, and only in that case we evaluate the tail
expression's type so that the suggestion will be accurate.
…n, r=varkor

Suggest `-> impl Trait` and `-> Box<dyn Trait>` on fn that doesn't return

During development, a function could have a return type set that is a
bare trait object by accident. We already suggest using either a boxed
trait object or `impl Trait` if the return paths will allow it. We now
do so too when there are *no* return paths or they all resolve to `!`.
We still don't handle cases where the trait object is *not* the entirety
of the return type gracefully.

Closes rust-lang#38376.
Remove unused rustc_serialize::hex module

* Remove unused `rustc_serialize::hex` module
* Cleanup `Cargo.toml`
Use assoc int consts3

Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural.

Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants.

This is a continuation of rust-lang#70857

r? @dtolnay
…r=estebank

Fix #! (shebang) stripping account space issue

 rust-lang#70528
…imulacrum

Fix stage0.txt version number comment

r? @Mark-Simulacrum
@JohnTitor JohnTitor added the rollup A PR which is a rollup label Apr 22, 2020
@JohnTitor
Copy link
Member Author

@bors: r+ p=7 rollup=never

@bors
Copy link
Contributor

bors commented Apr 22, 2020

📌 Commit 66eaead has been approved by JohnTitor

@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 Apr 22, 2020
@bors
Copy link
Contributor

bors commented Apr 22, 2020

⌛ Testing commit 66eaead with merge 2dc5b60...

@bors
Copy link
Contributor

bors commented Apr 22, 2020

☀️ Test successful - checks-azure
Approved by: JohnTitor
Pushing 2dc5b60 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 22, 2020
@bors bors merged commit 2dc5b60 into rust-lang:master Apr 22, 2020
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants