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 9 pull requests #33548

Closed
wants to merge 18 commits into from
Closed

Conversation

birkenfeld and others added 18 commits May 2, 2016 16:48
This should fix rust-lang#31754 and follow-up rust-lang#25343.  Before the latter, the
closure was visited twice in the context of the enclosing fn, which
made even a single closure with a loop label emit a warning.

With this change, the closure is still visited within the context
of the main fn (which is intended, since it is not a separate item)
but resets the found loop labels while being visited.

Fixes: rust-lang#31754
fix too long column

fix typo of help on pattern guard

one nit

fix compile fail
Removed unnecessary use of threads from E0504

Cleaned up line ending on E0504

Added more examples for E0504

Changed to erroneous code wording

Switched Rc example to thread/Arc example

Added comments describing why errors no longer occur
Change `fast an loose` to `fast and loose`.
For example, `Vec::len` is both a field and a method, and usually
encountering `vec.len` just means that the parens were forgotten.

Fixes: rust-lang#26472
This was causing terrible error reports, because the algorithm was
incorrectly identifying the constraints.
typeck: if a private field exists, also check for a public method

For example, `Vec::len` is both a field and a method, and usually encountering `vec.len` just means that the parens were forgotten.

Fixes: rust-lang#26472

NOTE: I added the parameter `allow_private` to `method::exists` since I don't want to suggest inaccessible methods. For the second case, where only the method exists, I think it would make sense to set it to `false` as well, but I wanted to preserve compatibility for this case.
middle: reset loop labels while visiting closure

This should fix rust-lang#31754 and follow-up rust-lang#25343.  Before the latter, the closure was visited twice in the context of the enclosing fn, which made even a single closure with a loop label emit a warning.

With this change, the closure is still visited within the context of the main fn (which is intended, since it is not a separate item) but resets the found loop labels while being visited.

Fixes: rust-lang#31754

Note: I amended the test file from rust-lang#25343, but I don't know if the original or amended test are effective, since as far as I could see, compiletest's run-pass tests do not check for zero warnings emitted?

/cc @Manishearth
Add detailed error explanation for E0504

Part of rust-lang#32777
…d-loose, r=steveklabnik

doc: Fix tiny typo in vec-alloc.md

Change `fast an loose` to `fast and loose`.
fix DFS for region error reporting

This was causing terrible error reports, because the algorithm was incorrectly identifying the constraints.

r? @eddyb
@steveklabnik
Copy link
Member Author

@bors: r+ p=1

@bors
Copy link
Contributor

bors commented May 10, 2016

📌 Commit d0580a7 has been approved by steveklabnik

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Contributor

bors commented May 10, 2016

⌛ Testing commit d0580a7 with merge c832896...

@Centril Centril added the rollup A PR which is a rollup label Oct 24, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants