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 #64115

Closed
wants to merge 42 commits into from
Closed

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Sep 3, 2019

Successful merges:

Failed merges:

r? @ghost

fmckeogh and others added 30 commits August 21, 2019 09:13
An initial refactoring before working on rust-lang#61809.

This moves the whole block into a method so that it can be reused in the
annotate-snippet output. It's already used in the new emitter, but
there's no UI tests with suggestions included in this PR.

A first look at some UI tests with suggestions showed that there's some
more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the
new output is closer to the current one.
This avoids needlessly creating and threading the buffers through when
we only use them once.
This means that callers can pass in a closure like
`|buf| some_function(..., &mut buf)` and pass in arbitrary arguments to
that function without complicating the trait definition. We also keep
the impl for str and String, since it's useful to be able to just pass
in "" or format!("{}"...) results in some cases.

This changes Print's definition to take self, instead of &self, because
otherwise FnOnce cannot be called directly. We could instead take FnMut
or even Fn, but that seems like it'd merely complicate matters -- most
of the time, the FnOnce does not constrain us at all anyway. If it does,
a custom Print impl for &'_ SomeStruct is not all that painful.
Mark-Simulacrum and others added 12 commits September 2, 2019 10:32
…GuillaumeGomez

Rustdoc: formatting to buffers

This should be reviewed commit-by-commit.

I've not attempted to fully flesh out what the end state of this PR could look like yet as I wanted to get it up for some early feedback (I already think this has some wins, too, so we could land it as-is).

The primary idea with `Buffer` is that it internally tracks whether we're printing to HTML or text, and the goal is that eventually instead of branch on `fmt.alternate()` anywhere, we'd call a helper like `buf.nbsp()` which would either return ` ` or ` ` depending on the target we're printing to. Obviously, that's not included in this PR, in part because it was already getting quite big.
Emit a single error on if expr with expectation and no else clause

Fix rust-lang#60254.

r? @Centril
…ntril

Account for arbitrary self types in E0599

Fix rust-lang#62373
…bank

librustc_errors: Extract sugg/subst handling into method

An initial refactoring before working on rust-lang#61809.

This moves the whole block into a method so that it can be reused in the
annotate-snippet emitter. The method is already used in the new emitter, but
there's no UI tests with suggestions included in this PR.

A first look at some UI tests with suggestions showed that there's some
more work to do in [annotate-snippet-rs][annotate-snippet-rs] before the new output is closer to the
current one, so I opted to do that in a second step.

r? @estebank

[annotate-snippet-rs]: https://github.com/rust-lang/annotate-snippets-rs
use just one name when parameters and fields are the same
…ark-Simulacrum

Fix regex replacement in theme detection

Fixes rust-lang#64061.

This is sadly a lot of bad luck: after making the changes and re-build the docs, I just forgot to force reload the page. Hence having the old (working) version with two replacements instead of the failing regex. Sorry again about that...

cc @fenhl
r? @Mark-Simulacrum
…e, r=estebank

Emit error on intrinsic to fn ptr casts

I'm not sure if a type error is the best way of doing this but it seemed like a relatively correct place to do it, and I expect this is a pretty rare case to hit anyway.

Fixes rust-lang#15694
@Centril
Copy link
Contributor Author

Centril commented Sep 3, 2019

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Sep 3, 2019

📌 Commit 0de3668 has been approved by Centril

@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 Sep 3, 2019
@bors
Copy link
Contributor

bors commented Sep 3, 2019

⌛ Testing commit 0de3668 with merge 96d1481e3cc5ff24f1f7d92536dee15a6f0a305b...

@bors
Copy link
Contributor

bors commented Sep 3, 2019

💔 Test failed - checks-azure

@rust-highfive
Copy link
Collaborator

The job i686-apple of your PR failed (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.
2019-09-03T10:14:34.4700460Z test result: ok. 1 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out
2019-09-03T10:14:34.4700580Z 
2019-09-03T10:14:34.4713780Z  finished in 4.699
2019-09-03T10:14:34.4715670Z [TIMING] DocTest { compiler: Compiler { stage: 2, host: "i686-apple-darwin" }, path: "src/doc/rustc", name: "rustc", is_ext_doc: false } -- 4.699
2019-09-03T10:14:34.8841970Z tmp.js:1
2019-09-03T10:14:34.8842450Z (function (exports, require, module, __filename, __dirname) { var N=null,E="",T="t",U="u",searchIndex={{}};
2019-09-03T10:14:34.8843680Z 
2019-09-03T10:14:34.8843770Z SyntaxError: Unexpected token {
2019-09-03T10:14:34.8843770Z SyntaxError: Unexpected token {
2019-09-03T10:14:34.8843860Z     at createScript (vm.js:56:10)
2019-09-03T10:14:34.8844170Z     at Object.runInThisContext (vm.js:97:10)
2019-09-03T10:14:34.8844850Z     at Module._compile (module.js:549:28)
2019-09-03T10:14:34.8846200Z     at loadContent (/Users/vsts/agent/2.155.1/work/1/s/src/tools/rustdoc-js-std/tester.js:166:7)
2019-09-03T10:14:34.8847150Z     at main (/Users/vsts/agent/2.155.1/work/1/s/src/tools/rustdoc-js-std/tester.js:264:19)
2019-09-03T10:14:34.8848210Z     at Object.<anonymous> (/Users/vsts/agent/2.155.1/work/1/s/src/tools/rustdoc-js-std/tester.js:344:14)
2019-09-03T10:14:34.8848420Z     at Module._compile (module.js:577:32)
2019-09-03T10:14:34.8848580Z     at Object.Module._extensions..js (module.js:586:10)
2019-09-03T10:14:34.8848750Z     at Module.load (module.js:494:32)
2019-09-03T10:14:34.8848890Z     at tryModuleLoad (module.js:453:12)
2019-09-03T10:14:34.8864640Z 
2019-09-03T10:14:34.8864640Z 
2019-09-03T10:14:34.8865980Z command did not execute successfully: "/usr/local/bin/node" "src/tools/rustdoc-js-std/tester.js" "i686-apple-darwin"
2019-09-03T10:14:34.8866270Z 
2019-09-03T10:14:34.8866310Z 
2019-09-03T10:14:34.8876890Z failed to run: /Users/vsts/agent/2.155.1/work/1/s/build/bootstrap/debug/bootstrap test
2019-09-03T10:14:34.8877050Z Build completed unsuccessfully in 1:43:56
2019-09-03T10:14:34.8877050Z Build completed unsuccessfully in 1:43:56
2019-09-03T10:14:34.8947710Z == clock drift check ==
2019-09-03T10:14:34.9023720Z   local time: Tue Sep  3 10:14:34 UTC 2019
2019-09-03T10:14:35.0463700Z   network time: Tue, 03 Sep 2019 10:14:35 GMT
2019-09-03T10:14:35.0465840Z == end clock drift check ==
2019-09-03T10:14:35.0642600Z ##[error]Bash exited with code '1'.
2019-09-03T10:14:35.0687000Z ##[section]Starting: Upload CPU usage statistics
2019-09-03T10:14:35.0717600Z ==============================================================================
2019-09-03T10:14:35.0717700Z Task         : Bash
2019-09-03T10:14:35.0717780Z Description  : Run a Bash script on macOS, Linux, or Windows

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 @TimNN. (Feature Requests)

@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 Sep 3, 2019
@Centril Centril closed this Sep 3, 2019
@Centril Centril deleted the rollup-gcq52tt branch September 3, 2019 10:21
@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 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.

9 participants