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

Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed' #103928

Conversation

chenyukang
Copy link
Member

Part of #103874

@rustbot
Copy link
Collaborator

rustbot commented Nov 3, 2022

r? @oli-obk

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 3, 2022
@chenyukang
Copy link
Member Author

r? @lcnr

@rustbot rustbot assigned lcnr and unassigned oli-obk Nov 3, 2022
@chenyukang chenyukang force-pushed the yukang/fix-103874-add-ty_error_with_guaranteed branch 2 times, most recently from 677b50f to 5f7c045 Compare November 3, 2022 15:29
@rustbot
Copy link
Collaborator

rustbot commented Nov 3, 2022

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@chenyukang
Copy link
Member Author

emm,
need wait #103915, and rebase master.

@chenyukang chenyukang force-pushed the yukang/fix-103874-add-ty_error_with_guaranteed branch from 92b8da3 to 134dda6 Compare November 4, 2022 12:57
Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

r=me after nit + green perf

err.emit();
}
return self.tcx.ty_error();
err.emit()
Copy link
Contributor

Choose a reason for hiding this comment

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

err.emit_unless can be used here 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

change to

 let reported = err.emit_unless(lhs_ty.references_error() || rhs_ty.references_error());
 return self.tcx.ty_error_with_guaranteed(reported);

@lcnr
Copy link
Contributor

lcnr commented Nov 4, 2022

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 4, 2022
@bors
Copy link
Contributor

bors commented Nov 4, 2022

⌛ Trying commit 134dda69bdb238053a2f417ea3ae4eed15df41b9 with merge 622859bba9ca3cca1ca580f819ca26e4ac9253bb...

@lcnr

This comment was marked as outdated.

@rust-timer

This comment was marked as outdated.

@lcnr
Copy link
Contributor

lcnr commented Nov 7, 2022

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Nov 7, 2022

⌛ Trying commit 91ac1c33cc6e381a82d75ca80418f80f58657ad4 with merge 1d4e4a572b5249bf76ab7beff62d639bade9b9eb...

@bors
Copy link
Contributor

bors commented Nov 7, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 7, 2022
@rust-log-analyzer

This comment has been minimized.

@chenyukang
Copy link
Member Author

The job dist-x86_64-linux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

   Compiling rustc_builtin_macros v0.0.0 (/checkout/compiler/rustc_builtin_macros)
error[E0061]: this function takes 2 arguments but 1 argument was supplied
    --> compiler/rustc_middle/src/ty/context.rs:1313:14
     |
1313 |         self.mk_const(ty::ConstS { kind: ty::ConstKind::Error(reported), ty })
     |                      ||
     |                      ||
     |                      |expected enum `kind::ConstKind`, found struct `ConstS`
     |
note: associated function defined here
    --> compiler/rustc_middle/src/ty/context.rs:2589:12
     |
     |
2589 |     pub fn mk_const(self, kind: ty::ConstKind<'tcx>, ty: Ty<'tcx>) -> Const<'tcx> {
help: provide the argument
     |
     |
1313 |         self.mk_const(/* kind::ConstKind<'_> */, /* ty::Ty<'_> */)

[RUSTC-TIMING] rustc_ast_passes test:false 4.110
For more information about this error, try `rustc --explain E0061`.
[RUSTC-TIMING] rustc_middle test:false 7.533

@lcnr why this error didn't happen in CI, I also can not reproduce it in local.

@lcnr
Copy link
Contributor

lcnr commented Nov 8, 2022

probably you have to first pull the new changes on master to fix this:

git fetch origin
git rebase origin/master

(or however you're calling the rust-lang remote)

@chenyukang
Copy link
Member Author

Got it, rebased master, mk_const is changed in upstream.

@chenyukang chenyukang force-pushed the yukang/fix-103874-add-ty_error_with_guaranteed branch 2 times, most recently from b71c9d0 to 3320879 Compare November 8, 2022 10:53
@lcnr
Copy link
Contributor

lcnr commented Nov 8, 2022

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Nov 8, 2022

⌛ Trying commit 3320879 with merge 00d4742f8a01030d6091b53dfab0763567e88eda...

@bors
Copy link
Contributor

bors commented Nov 8, 2022

☀️ Try build successful - checks-actions
Build commit: 00d4742f8a01030d6091b53dfab0763567e88eda (00d4742f8a01030d6091b53dfab0763567e88eda)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (00d4742f8a01030d6091b53dfab0763567e88eda): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.7% [3.7%, 3.7%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 8, 2022
@lcnr
Copy link
Contributor

lcnr commented Nov 8, 2022

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 8, 2022

📌 Commit 3320879 has been approved by lcnr

It is now in the queue for this repository.

@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. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 8, 2022
Manishearth added a commit to Manishearth/rust that referenced this pull request Nov 8, 2022
…y_error_with_guaranteed, r=lcnr

Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed'

Part of rust-lang#103874
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 8, 2022
…llaumeGomez

Rollup of 12 pull requests

Successful merges:

 - rust-lang#103928 (Add 'ty_error_with_guaranteed' and 'const_error_with_guaranteed')
 - rust-lang#104027 (Place config.toml in current working directory if config not found)
 - rust-lang#104093 (disable btree size tests on Miri)
 - rust-lang#104097 (run alloc benchmarks in Miri and fix UB)
 - rust-lang#104104 (Add split-debuginfo print option)
 - rust-lang#104109 (rustdoc: Add mutable to the description)
 - rust-lang#104113 (Fix `const_fn_trait_ref_impl`, add test for it)
 - rust-lang#104114 (Fix invalid background-image file name)
 - rust-lang#104132 (fix: lint against lint functions)
 - rust-lang#104139 (Clarify licensing situation of MPSC and SPSC queue)
 - rust-lang#104147 (Remove an address comparison from the parser)
 - rust-lang#104165 (Add llvm-main to triagebot.toml)

Failed merges:

 - rust-lang#104115 (Migrate crate-search element to CSS variables)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3a78320 into rust-lang:master Nov 9, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 9, 2022
@chenyukang chenyukang deleted the yukang/fix-103874-add-ty_error_with_guaranteed branch November 9, 2022 02:34
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants