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

Conversation

Projects
None yet
10 participants
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated

@oli-obk oli-obk force-pushed the oli-obk:cleanups branch from ab447b8 to 37dcaf4 Mar 29, 2019

@oli-obk oli-obk changed the title Cleanups Cleanup (pretty) printing of `ty::Const` Mar 29, 2019

Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/mir/mod.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
Show resolved Hide resolved src/librustc/ty/print/pretty.rs Outdated
@bors

This comment has been minimized.

Copy link
Contributor

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 oli-obk:cleanups branch 2 times, most recently from 82b8518 to 536e669 Apr 3, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 3, 2019

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 oli-obk force-pushed the oli-obk:cleanups branch from 536e669 to 3b4a865 Apr 3, 2019

@oli-obk

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

@bors try

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2019

⌛️ Trying commit 3b4a865 with merge 311b39b...

@oli-obk

This comment has been minimized.

Copy link
Contributor Author

commented Apr 4, 2019

@rust-timer build 311b39b

this might regress max-rss

@rust-timer

This comment has been minimized.

Copy link

commented Apr 4, 2019

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

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2019

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

@rust-timer

This comment has been minimized.

Copy link

commented Apr 4, 2019

Finished benchmarking try commit 311b39b

@oli-obk

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2019

rebasing and fixing build now

@oli-obk oli-obk force-pushed the oli-obk:cleanups branch from 90459d2 to 0b732aa May 25, 2019

@oli-obk

This comment has been minimized.

Copy link
Contributor Author

commented May 25, 2019

@bors r=eddyb

@bors

This comment has been minimized.

Copy link
Contributor

commented May 25, 2019

📌 Commit 0b732aa has been approved by eddyb

@bors

This comment has been minimized.

Copy link
Contributor

commented May 25, 2019

⌛️ Testing commit 0b732aa with merge f492693...

@bors

This comment has been minimized.

Copy link
Contributor

commented May 25, 2019

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

@bors bors added the merged-by-bors label May 25, 2019

@bors bors merged commit 0b732aa into rust-lang:master May 25, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
homu Test successful
Details

Centril added a commit to Centril/rust that referenced this pull request May 29, 2019

Rollup merge of rust-lang#61293 - varkor:rustdoc-print-const-generic,…
… 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

Rollup merge of rust-lang#61293 - varkor:rustdoc-print-const-generic,…
… 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

Rollup merge of rust-lang#61293 - varkor:rustdoc-print-const-generic,…
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.