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 test for const-eval error in dead code during monomorphization #116444

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 5, 2023

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Oct 5, 2023

r? @davidtwco

(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 Oct 5, 2023
--> $DIR/unused-broken-const-late.rs:18:5
|
LL | no_codegen::<i32>();
| ^^^^^^^^^^^^^^^^^^^
Copy link
Member Author

Choose a reason for hiding this comment

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

@oli-obk ideally the error would point not only here, but also at line 14 where the constant syntactically appears. Any idea why it doesn't do that?

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm... good point ^^ probably an oversight in the mono time error handler

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@RalfJung
Copy link
Member Author

RalfJung commented Oct 7, 2023

In fact whether the span at no_codegen::<i32>(); is shown seems to depend on the optimization level?

@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented Oct 10, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Oct 10, 2023

📌 Commit 5e1b0cb has been approved by oli-obk

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. labels Oct 10, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 10, 2023
…i-obk

add test for const-eval error in dead code during monomorphization
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2023
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#109422 (rustdoc-search: add impl disambiguator to duplicate assoc items)
 - rust-lang#115948 (rustdoc: show crate name beside smaller logo)
 - rust-lang#116444 (add test for const-eval error in dead code during monomorphization)
 - rust-lang#116503 (Update docs for mips target tier demotion.)
 - rust-lang#116559 (Mark `new_in` as `const` for BTree collections)
 - rust-lang#116560 (In smir use `FxIndexMap` to store indexed ids)
 - rust-lang#116574 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2023
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#109422 (rustdoc-search: add impl disambiguator to duplicate assoc items)
 - rust-lang#116250 (On type error of closure call argument, point at earlier calls that affected inference)
 - rust-lang#116444 (add test for const-eval error in dead code during monomorphization)
 - rust-lang#116503 (Update docs for mips target tier demotion.)
 - rust-lang#116559 (Mark `new_in` as `const` for BTree collections)
 - rust-lang#116560 (In smir use `FxIndexMap` to store indexed ids)
 - rust-lang#116574 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bbaf6bd into rust-lang:master Oct 10, 2023
11 checks passed
@rustbot rustbot added this to the 1.75.0 milestone Oct 10, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 10, 2023
Rollup merge of rust-lang#116444 - RalfJung:broken-unused-const, r=oli-obk

add test for const-eval error in dead code during monomorphization
@RalfJung RalfJung deleted the broken-unused-const branch October 11, 2023 17:09
bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Oct 12, 2023
48: Pull upstream master 2023 10 12 r=tshepang a=Dajamante

* rust-lang/rust#113487
* rust-lang/rust#116506
* rust-lang/rust#116448
* rust-lang/rust#116640
  * rust-lang/rust#116627
  * rust-lang/rust#116597
  * rust-lang/rust#116436
  * rust-lang/rust#116315
  * rust-lang/rust#116219
* rust-lang/rust#113218
* rust-lang/rust#115937
* rust-lang/rust#116014
* rust-lang/rust#116623
* rust-lang/rust#112818
* rust-lang/rust#115948
* rust-lang/rust#116622
* rust-lang/rust#116621
  * rust-lang/rust#116612
  * rust-lang/rust#116611
  * rust-lang/rust#116530
  * rust-lang/rust#95967
* rust-lang/rust#116578
* rust-lang/rust#113915
* rust-lang/rust#116605
  * rust-lang/rust#116574
  * rust-lang/rust#116560
  * rust-lang/rust#116559
  * rust-lang/rust#116503
  * rust-lang/rust#116444
  * rust-lang/rust#116250
  * rust-lang/rust#109422
* rust-lang/rust#116598
  * rust-lang/rust#116596
  * rust-lang/rust#116595
  * rust-lang/rust#116589
  * rust-lang/rust#116586
* rust-lang/rust#116551
* rust-lang/rust#116409
* rust-lang/rust#116548
* rust-lang/rust#116366
* rust-lang/rust#109882
* rust-lang/rust#116497
* rust-lang/rust#116532
* rust-lang/rust#116569
  * rust-lang/rust#116561
  * rust-lang/rust#116556
  * rust-lang/rust#116549
  * rust-lang/rust#116543
  * rust-lang/rust#116537
  * rust-lang/rust#115882
* rust-lang/rust#116142
* rust-lang/rust#115238
* rust-lang/rust#116533
* rust-lang/rust#116096
* rust-lang/rust#116468
* rust-lang/rust#116515
* rust-lang/rust#116454
* rust-lang/rust#116183
* rust-lang/rust#116514
* rust-lang/rust#116509
* rust-lang/rust#116487
* rust-lang/rust#116486
* rust-lang/rust#116450
* rust-lang/rust#114623
* rust-lang/rust#116416
* rust-lang/rust#116437
* rust-lang/rust#100806
* rust-lang/rust#116330
* rust-lang/rust#116310
* rust-lang/rust#115583
* rust-lang/rust#116457
* rust-lang/rust#116508
* rust-lang/rust#109214
* rust-lang/rust#116318
* rust-lang/rust#116501
  * rust-lang/rust#116500
  * rust-lang/rust#116458
  * rust-lang/rust#116400
  * rust-lang/rust#116277
* rust-lang/rust#114709
* rust-lang/rust#116492
  * rust-lang/rust#116484
  * rust-lang/rust#116481
  * rust-lang/rust#116474
  * rust-lang/rust#116466
  * rust-lang/rust#116423
  * rust-lang/rust#116297
  * rust-lang/rust#114564
* rust-lang/rust#114811
* rust-lang/rust#116489
* rust-lang/rust#115304

Co-authored-by: Peter Hall <[email protected]>
Co-authored-by: Emanuele Vannacci <[email protected]>
Co-authored-by: Neven Villani <[email protected]>
Co-authored-by: Alex Macleod <[email protected]>
Co-authored-by: Tamir Duberstein <[email protected]>
Co-authored-by: Eduardo Sánchez Muñoz <[email protected]>
Co-authored-by: koka <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Philipp Krones <[email protected]>
Co-authored-by: Camille GILLOT <[email protected]>
Co-authored-by: Esteban Küber <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
bors-ferrocene bot added a commit to ferrocene/ferrocene that referenced this pull request Oct 13, 2023
48: Pull upstream master 2023 10 12 r=tshepang a=Dajamante

* rust-lang/rust#113487
* rust-lang/rust#116506
* rust-lang/rust#116448
* rust-lang/rust#116640
  * rust-lang/rust#116627
  * rust-lang/rust#116597
  * rust-lang/rust#116436
  * rust-lang/rust#116315
  * rust-lang/rust#116219
* rust-lang/rust#113218
* rust-lang/rust#115937
* rust-lang/rust#116014
* rust-lang/rust#116623
* rust-lang/rust#112818
* rust-lang/rust#115948
* rust-lang/rust#116622
* rust-lang/rust#116621
  * rust-lang/rust#116612
  * rust-lang/rust#116611
  * rust-lang/rust#116530
  * rust-lang/rust#95967
* rust-lang/rust#116578
* rust-lang/rust#113915
* rust-lang/rust#116605
  * rust-lang/rust#116574
  * rust-lang/rust#116560
  * rust-lang/rust#116559
  * rust-lang/rust#116503
  * rust-lang/rust#116444
  * rust-lang/rust#116250
  * rust-lang/rust#109422
* rust-lang/rust#116598
  * rust-lang/rust#116596
  * rust-lang/rust#116595
  * rust-lang/rust#116589
  * rust-lang/rust#116586
* rust-lang/rust#116551
* rust-lang/rust#116409
* rust-lang/rust#116548
* rust-lang/rust#116366
* rust-lang/rust#109882
* rust-lang/rust#116497
* rust-lang/rust#116532
* rust-lang/rust#116569
  * rust-lang/rust#116561
  * rust-lang/rust#116556
  * rust-lang/rust#116549
  * rust-lang/rust#116543
  * rust-lang/rust#116537
  * rust-lang/rust#115882
* rust-lang/rust#116142
* rust-lang/rust#115238
* rust-lang/rust#116533
* rust-lang/rust#116096
* rust-lang/rust#116468
* rust-lang/rust#116515
* rust-lang/rust#116454
* rust-lang/rust#116183
* rust-lang/rust#116514
* rust-lang/rust#116509
* rust-lang/rust#116487
* rust-lang/rust#116486
* rust-lang/rust#116450
* rust-lang/rust#114623
* rust-lang/rust#116416
* rust-lang/rust#116437
* rust-lang/rust#100806
* rust-lang/rust#116330
* rust-lang/rust#116310
* rust-lang/rust#115583
* rust-lang/rust#116457
* rust-lang/rust#116508
* rust-lang/rust#109214
* rust-lang/rust#116318
* rust-lang/rust#116501
  * rust-lang/rust#116500
  * rust-lang/rust#116458
  * rust-lang/rust#116400
  * rust-lang/rust#116277
* rust-lang/rust#114709
* rust-lang/rust#116492
  * rust-lang/rust#116484
  * rust-lang/rust#116481
  * rust-lang/rust#116474
  * rust-lang/rust#116466
  * rust-lang/rust#116423
  * rust-lang/rust#116297
  * rust-lang/rust#114564
* rust-lang/rust#114811
* rust-lang/rust#116489
* rust-lang/rust#115304

Co-authored-by: Emanuele Vannacci <[email protected]>
Co-authored-by: Neven Villani <[email protected]>
Co-authored-by: Alex Macleod <[email protected]>
Co-authored-by: Tamir Duberstein <[email protected]>
Co-authored-by: Eduardo Sánchez Muñoz <[email protected]>
Co-authored-by: koka <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Philipp Krones <[email protected]>
Co-authored-by: Camille GILLOT <[email protected]>
Co-authored-by: Esteban Küber <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
Co-authored-by: ShE3py <[email protected]>
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.

6 participants