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

Cleanup (pretty) printing of ty::Const #59276

Merged
merged 27 commits into from
May 25, 2019
Merged

Cleanup (pretty) printing of ty::Const #59276

merged 27 commits into from
May 25, 2019

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 18, 2019

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 18, 2019
@oli-obk oli-obk changed the title Cleanups Cleanup (pretty) printing of ty::Const Mar 29, 2019
src/librustc/mir/mod.rs Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors commented Apr 3, 2019

☔ The latest upstream changes (presumably #59657) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk oli-obk force-pushed the cleanups branch 2 times, most recently from 82b8518 to 536e669 Compare April 3, 2019 17:04
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (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.
travis_time:end:03cc1cf0:start=1554311126937002861,finish=1554311129349319038,duration=2412316177
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
[00:57:41]    Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
[00:57:44] error[E0308]: mismatched types
[00:57:44]     --> src/librustdoc/clean/mod.rs:2765:51
[00:57:44]      |
[00:57:44] 2765 |                     Ok(length) => print_const(cx, length),
[00:57:44]      |                                                   |
[00:57:44]      |                                                   expected struct `rustc::ty::Const`, found reference
[00:57:44]      |                                                   expected struct `rustc::ty::Const`, found reference
[00:57:44]      |                                                   help: consider dereferencing the borrow: `*length`
[00:57:44]      = note: expected type `rustc::ty::Const<'_>`
[00:57:44]                 found type `&rustc::ty::Const<'_>`
[00:57:44] 
[00:57:44] error[E0308]: mismatched types
[00:57:44] error[E0308]: mismatched types
[00:57:44]     --> src/librustdoc/clean/mod.rs:2960:29
[00:57:44]      |
[00:57:44] 2960 |                         n = new_n;
[00:57:44]      |                             ^^^^^
[00:57:44]      |                             |
[00:57:44]      |                             expected struct `rustc::ty::Const`, found reference
[00:57:44]      |                             help: consider dereferencing the borrow: `*new_n`
[00:57:44]      = note: expected type `rustc::ty::Const<'_>`
[00:57:44]                 found type `&rustc::ty::Const<'_>`
[00:57:44] 
[00:57:44] error[E0599]: no method named `to_string` found for type `rustc::ty::Const<'_>` in the current scope
[00:57:44] error[E0599]: no method named `to_string` found for type `rustc::ty::Const<'_>` in the current scope
[00:57:44]     --> src/librustdoc/clean/mod.rs:4142:27
[00:57:44]      |
[00:57:44] 4142 |             let mut s = n.to_string();
[00:57:44]      |
[00:57:44]      = note: the method `to_string` exists but the following trait bounds were not satisfied:
[00:57:44]              `rustc::ty::Const<'_> : std::string::ToString`
[00:57:44] 
---
travis_time:end:17fb976e:start=1554314609057925204,finish=1554314609063103580,duration=5178376
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:2a0f13f2
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:03b7f4aa
$ cat ./obj/build/x86_64-unkn

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)

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 4, 2019

@bors try

@bors
Copy link
Contributor

bors commented Apr 4, 2019

⌛ Trying commit 3b4a86558fd9c1a61498a7aab208b37a18d8cfa2 with merge 311b39b143bf0b5cdfcb183aaeb0356b5eb29ae7...

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 4, 2019

@rust-timer build 311b39b143bf0b5cdfcb183aaeb0356b5eb29ae7

this might regress max-rss

@rust-timer
Copy link
Collaborator

Success: Queued 311b39b143bf0b5cdfcb183aaeb0356b5eb29ae7 with parent a5dfdc5, comparison URL.

@bors
Copy link
Contributor

bors commented Apr 4, 2019

☀️ Try build successful - checks-travis
Build commit: 311b39b143bf0b5cdfcb183aaeb0356b5eb29ae7

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 311b39b143bf0b5cdfcb183aaeb0356b5eb29ae7

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 4, 2019

Seems like max-rss regresses in some situations but is improved in others?

https://perf.rust-lang.org/compare.html?start=a5dfdc589a1b44f01cb640cd0244372dcbbd6f37&end=311b39b143bf0b5cdfcb183aaeb0356b5eb29ae7&stat=max-rss

Not sure how reliable some of those numbers are.

@oli-obk
Copy link
Contributor Author

oli-obk commented May 25, 2019

rebasing and fixing build now

@oli-obk
Copy link
Contributor Author

oli-obk commented May 25, 2019

@bors r=eddyb

@bors
Copy link
Contributor

bors commented May 25, 2019

📌 Commit 0b732aa has been approved by eddyb

@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 May 25, 2019
@bors
Copy link
Contributor

bors commented May 25, 2019

⌛ Testing commit 0b732aa with merge f492693...

@bors
Copy link
Contributor

bors commented May 25, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: eddyb
Pushing f492693 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 25, 2019
@bors bors merged commit 0b732aa into rust-lang:master May 25, 2019
Centril added a commit to Centril/rust that referenced this pull request May 29, 2019
… r=GuillaumeGomez

Print const generics properly in rustdoc

Now that rust-lang#59276 is merged, we can print consts properly in rustdoc.

Fixes rust-lang#60737.
Fixes rust-lang#61257.

r? @GuillaumeGomez
Centril added a commit to Centril/rust that referenced this pull request May 29, 2019
… r=GuillaumeGomez

Print const generics properly in rustdoc

Now that rust-lang#59276 is merged, we can print consts properly in rustdoc.

Fixes rust-lang#60737.
Fixes rust-lang#61257.

r? @GuillaumeGomez
oli-obk added a commit to oli-obk/rust that referenced this pull request May 29, 2019
… r=GuillaumeGomez

Print const generics properly in rustdoc

Now that rust-lang#59276 is merged, we can print consts properly in rustdoc.

Fixes rust-lang#60737.
Fixes rust-lang#61257.

r? @GuillaumeGomez
@oli-obk oli-obk deleted the cleanups branch March 16, 2021 12:13
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. 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.

10 participants