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 12 pull requests #48476

Merged
merged 35 commits into from
Feb 24, 2018
Merged

Rollup of 12 pull requests #48476

merged 35 commits into from
Feb 24, 2018

Conversation

cramertj and others added 30 commits February 8, 2018 08:13
The fallible version of for_each and the stateless version of try_fold.
Instead of creating inference variables for those argument types, use
the trait error-reporting code to give a nicer error.
…enums

This dates back to at least rust-lang#26583. At the time, usize and isize were considered ffi-unsafe to nudge people away from them, but this changed in the aforementioned PR, making it inconsistent to complain about it in enum discriminants. In fact, repr(usize) is probably the best way to interface with `enum Foo : size_t { ... }`.
- Always name the non-FFI-safe
- Explain *why* the type is not FFI-safe
- Stop vaguely gesturing at structs/enums/unions if the non-FFI-safe types occured in a field.

The last part is arguably a regression, but it's minor now that the non-FFI-safe type is actually named. Removing it avoids some code duplication.
The suggestion is unconditional, so following it could lead to further errors. This is already the case for the repr(C) suggestion, which makes this acceptable, though not *good*. Checking up-front whether the suggestion can help would be great but applies more broadly (and would require some refactoring to avoid duplicating the checks).
…objects

It's unhelpful since raw pointers to trait objects are also FFI-unsafe and casting to a thin raw pointer loses the vtable. There are working solutions that _involve_ raw pointers but they're too complex to explain in one line and have serious trade offs.
reduces the time to emit dep-info and metadata.
Point to the new tracing issue for nll
The docs currently say, "If the closure returns false, it will try
again, and call the closure on the next element."  But this happens
regardless of whether the closure returns true or false.
Do not run the default panic hook inside procedural macros.

Fixes rust-lang#47812

r? @nikomatsakis
…d_access_hygiene, r=petrochenkov

Improve tuple struct field access hygiene

Fixes rust-lang#47312 by fixing a span bug.
r? @nrc
…um-args, r=estebank

detect wrong number of args when type-checking a closure

Instead of creating inference variables for those argument types, use
the trait error-reporting code to give a nicer error. This also
improves some other spans for existing tests.

Fixes rust-lang#47244

r? @estebank
Add Iterator::try_for_each

The fallible version of `for_each` aka the stateless version of `try_fold`.  Inspired by @cuviper's comment in rust-lang#45379 (comment) as a more direct and obvious solution than `.map(f).collect::<Result<(), _>>()`.

Like `for_each`, no need for an `r` version thanks to overrides in `Rev`.

`iterator_try_fold` tracking issue: rust-lang#45594
…erister

lookup exported symbols only when needed.

reduces the time to compile small file with no optimization by half.
…bank

Overhaul improper_ctypes output

This snowballed into a rather big set of improvements to the diagnostics of the improper_ctypes lint. See commits for details, including effects of each change on the `compile-fail/improper-ctypes.rs` test (now a UI test), which is pretty gnarly and hopefully not representative of real code, but covers a lot of different error cases.

Fixes rust-lang#42050
@bors
Copy link
Contributor

bors commented Feb 23, 2018

💔 Test failed - status-appveyor

@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 Feb 23, 2018
@Manishearth
Copy link
Member Author

Manishearth commented Feb 23, 2018

@bors retry

permissions intermittent?

(check-aux passed last time)

@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 Feb 23, 2018
@Manishearth
Copy link
Member Author

[01:56:22] 	running `C:\projects\rust\build\x86_64-pc-windows-msvc\stage2-tools\x86_64-pc-windows-msvc\release\cargo.exe build`
[01:56:22] running `C:\projects\rust\build\x86_64-pc-windows-msvc\stage2-tools\x86_64-pc-windows-msvc\release\cargo.exe run`
[01:56:22] thread 'rename_with_link_search_path' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }', libcore\result.rs:945:5
[01:56:22] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[01:56:22] 
[01:56:22] 
[01:56:22] failures:
[01:56:22]     rename_with_link_search_path
[01:56:22] 
[01:56:22] test result: FAILED. 63 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
[01:56:22] 

@bors
Copy link
Contributor

bors commented Feb 24, 2018

⌛ Testing commit b26442a with merge 9dfe47b606ba17ed948ae455bcce4dd723e606c7...

@Mark-Simulacrum
Copy link
Member

@bors treeclosed-

@Manishearth
Copy link
Member Author

@bors treeclosed=100

(I'm around again)

@bors
Copy link
Contributor

bors commented Feb 24, 2018

💥 Test timed out

@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 Feb 24, 2018
@Manishearth
Copy link
Member 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 Feb 24, 2018
@bors
Copy link
Contributor

bors commented Feb 24, 2018

⌛ Testing commit b26442a with merge 6070d3e...

@Manishearth
Copy link
Member Author

bors added a commit that referenced this pull request Feb 24, 2018
Rollup of 12 pull requests

- Successful merges: #47933, #48072, #48083, #48123, #48157, #48219, #48221, #48245, #48429, #48436, #48438, #48472
- Failed merges:
@Manishearth
Copy link
Member Author

@bors treeclosed-

I will not be awake when this is supposed to land

@bors
Copy link
Contributor

bors commented Feb 24, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: Manishearth
Pushing 6070d3e to master...

@bors bors merged commit b26442a into rust-lang:master Feb 24, 2018
kennytm-githubbot added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Feb 24, 2018
Tested on commit rust-lang/rust@6070d3e.

🎉 clippy-driver on windows: build-fail → test-pass.
🎉 clippy-driver on linux: build-fail → test-pass.
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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-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.

None yet