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

extend stable hasher to support CanonicalTy #49091

Merged
merged 1 commit into from
Mar 19, 2018

Conversation

nikomatsakis
Copy link
Contributor

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2018
@nikomatsakis nikomatsakis force-pushed the issue-49043-ty-infer-hash branch from 51bb574 to f02dc74 Compare March 16, 2018 16:49
FloatVar(a),
FreshTy(a),
FreshIntTy(a),
FreshFloatTy(a),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Fresh* variants are valid to hash?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not confined to the local tcx:

match infer {
ty::FreshTy(_) |
ty::FreshIntTy(_) |
ty::FreshFloatTy(_) |
ty::CanonicalTy(_) => {
self.add_flags(TypeFlags::HAS_CANONICAL_VARS);
}
ty::TyVar(_) |
ty::IntVar(_) |
ty::FloatVar(_) => {
self.add_flags(TypeFlags::KEEP_IN_LOCAL_TCX)
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It just happens that we don't ever put them in query keys right now (and probably never will, but whatever).

Copy link
Contributor Author

@nikomatsakis nikomatsakis Mar 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(To be honest, even the TyVar and so forth would be ok to hash -- in the sense that they are "stable-ish" -- it's just that it truly ought to be impossible... it would indicate some other problem if we did see them that would be worth knowing about.)

Well, I take that back. It's a bit dubious given that their meaning depends on the surrounding infcx. Anyway, ought to be impossible. =)

@michaelwoerister
Copy link
Member

Thanks for the explanation!

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2018

📌 Commit f02dc74 has been approved by michaelwoerister

@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 Mar 16, 2018
@nikomatsakis
Copy link
Contributor Author

@bors p=1 -- important regression to button down

@bors
Copy link
Contributor

bors commented Mar 18, 2018

⌛ Testing commit f02dc74 with merge a5bc1141a0683804890d19bea6a08e3e6d9a0dfb...

@bors
Copy link
Contributor

bors commented Mar 18, 2018

💔 Test failed - status-travis

@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 Mar 18, 2018
@kennytm
Copy link
Member

kennytm commented Mar 18, 2018

@bors retry

x86_64-gnu-incremental 3-hour timeout, 39 minutes spent in compiling stage1-rustc.

make-prepare                	  72.13
stage0-tidy                 	  71.60
stage0-std                  	  13.79
stage0-rustc                	 989.30
llvm                        	 352.91
stage0-trans-llvm           	  79.50
stage1-std                  	 377.56
stage1-test                 	  29.36
stage1-rustc                	2331.73
stage1-trans-llvm           	 170.96
stage2-rustdoc              	 245.20
stage0-std                  	  58.85
stage0-rustbook             	 145.73
stage2-rustdoc              	 313.87
doc/compiler                	 148.92
stage2-error_index_generator	   6.30
stage0-std                  	  20.38
test/ui                     	 100.33
test/run-pass               	1255.39
test/compile-fail           	 276.29
test/parse-fail             	   6.46
test/run-fail               	  25.33
test/run-pass-valgrind      	   5.62
test/mir-opt                	  27.99
test/codegen                	   7.96
test/codegen-units          	   4.34
test/incremental            	  33.76
test/debuginfo              	  20.12
test/ui-fulldeps            	  32.87
test/run-pass-fulldeps      	 665.77
test/run-fail-fulldeps      	   7.78
test/compile-fail-fulldeps  	 145.30
test/incremental-fulldeps   	   5.47
stage2-rustdoc              	 322.52
test/run-make               	 126.27
...

@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 Mar 18, 2018
@bors
Copy link
Contributor

bors commented Mar 18, 2018

⌛ Testing commit f02dc74 with merge 86091adfe8e5752967963ee8417ce1aa8898cf1a...

@bors
Copy link
Contributor

bors commented Mar 18, 2018

💔 Test failed - status-travis

@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 Mar 18, 2018
@kennytm
Copy link
Member

kennytm commented Mar 18, 2018

@bors retry

@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 Mar 18, 2018
@kennytm kennytm mentioned this pull request Mar 19, 2018
@bors
Copy link
Contributor

bors commented Mar 19, 2018

⌛ Testing commit f02dc74 with merge 678f786e713c168cbfcd6f1324202514cec7ef45...

@bors
Copy link
Contributor

bors commented Mar 19, 2018

💔 Test failed - status-travis

@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 Mar 19, 2018
@kennytm
Copy link
Member

kennytm commented Mar 19, 2018

@bors retry

Somethings wrong with Travis.

@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 Mar 19, 2018
@bors
Copy link
Contributor

bors commented Mar 19, 2018

⌛ Testing commit f02dc74 with merge 15add36...

bors added a commit that referenced this pull request Mar 19, 2018
…aelwoerister

extend stable hasher to support `CanonicalTy`

Fixes #49043

r? @michaelwoerister
@bors
Copy link
Contributor

bors commented Mar 19, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: michaelwoerister
Pushing 15add36 to master...

@bors bors merged commit f02dc74 into rust-lang:master Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants