Skip to content

Rollup of 9 pull requests - #33548

Closed
steveklabnik wants to merge 18 commits into
rust-lang:masterfrom
steveklabnik:rollup
Closed

Rollup of 9 pull requests#33548
steveklabnik wants to merge 18 commits into
rust-lang:masterfrom
steveklabnik:rollup

Conversation

birkenfeldand others added 18 commits May 2, 2016 16:48
This should fixrust-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 fixrust-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
…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
Copy Markdown
ContributorAuthor

@bors: r+ p=1

@bors

bors commented May 10, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit d0580a7 has been approved by steveklabnik

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

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

@bors

bors commented May 10, 2016

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d0580a7 with merge c832896...

@CentrilCentril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@steveklabnik@bors@rust-highfive@nikomatsakis@Centril@birkenfeld@mrmiywj@GuillaumeGomez@cramertj@briangreenery