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

Constify Location methods #101030

Merged
merged 7 commits into from
Oct 14, 2022
Merged

Constify Location methods #101030

merged 7 commits into from
Oct 14, 2022

Conversation

lilasta
Copy link
Contributor

@lilasta lilasta commented Aug 26, 2022

@rustbot rustbot added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Aug 26, 2022
@rust-highfive
Copy link
Collaborator

r? @scottmcm

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 26, 2022
@scottmcm scottmcm added the I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. label Sep 24, 2022
@scottmcm
Copy link
Member

Hi lang! Nominating to see whether we have any concerns about what it means to give access to this kind of stuff in const -- it feels like it could mean functions that give monomorphization-time errors if called from functions in the wrong file, since they could assert! the .file() or something.

@dtolnay dtolnay added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Sep 27, 2022
@joshtriplett
Copy link
Member

ping @rust-lang/wg-const-eval, any potential issue with constifying this?

@RalfJung
Copy link
Member

Seems fine to me, but the PR should add some tests.

@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2022

Hey! It looks like you've submitted a new PR for the library teams!

If this PR contains changes to any rust-lang/rust public library APIs then please comment with @rustbot label +T-libs-api -T-libs to tag it appropriately. If this PR contains changes to any unstable APIs please edit the PR description to add a link to the relevant API Change Proposal or create one if you haven't already. If you're unsure where your change falls no worries, just leave it as is and the reviewer will take a look and make a decision to forward on if necessary.

Examples of T-libs-api changes:

  • Stabilizing library features
  • Introducing insta-stable changes such as new implementations of existing stable traits on existing stable types
  • Introducing new or changing existing unstable library APIs (excluding permanently unstable features / features without a tracking issue)
  • Changing public documentation in ways that create new stability guarantees
  • Changing observable runtime behavior of library APIs

@lilasta
Copy link
Contributor Author

lilasta commented Sep 27, 2022

Added.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

library/core/tests/panic.rs Outdated Show resolved Hide resolved
@scottmcm scottmcm removed the I-lang-nominated The issue / PR has been nominated for discussion during a lang team meeting. label Oct 4, 2022
@scottmcm
Copy link
Member

scottmcm commented Oct 4, 2022

We discussed this in the lang meeting last week. The core conclusion we ended up at is that the horrible things you could potentially do at compile-time with this aren't any that much worse than the horrible things you can do with this at runtime today (like aborting if called from line 666). So there's no need to block this from nightly.

@scottmcm
Copy link
Member

scottmcm commented Oct 4, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Oct 4, 2022

📌 Commit 7b99388 has been approved by scottmcm

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 4, 2022
@bors
Copy link
Contributor

bors commented Oct 4, 2022

⌛ Testing commit 7b99388 with merge 601b5281fdcbad5156eec5a8410a7c2fb9a1fada...

@bors
Copy link
Contributor

bors commented Oct 4, 2022

💔 Test failed - checks-actions

@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 Oct 4, 2022
@scottmcm
Copy link
Member

scottmcm commented Oct 4, 2022

@bors r-

Looks like the tests need to be fixed for windows:

 ---- panic::location::location_const_file stdout ----
thread 'panic::location::location_const_file' panicked at 'assertion failed: `(left == right)`
  left: `"library\\core\\tests\\panic\\location.rs"`,
 right: `"library/core/tests/panic/location.rs"`', library\core\tests\panic\location.rs:16:5

@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 Oct 4, 2022
@rust-log-analyzer

This comment has been minimized.

@lilasta
Copy link
Contributor Author

lilasta commented Oct 11, 2022

Fixed.

@pnkfelix
Copy link
Member

@bors r=scottmcm

@bors
Copy link
Contributor

bors commented Oct 14, 2022

📌 Commit a53e3ac has been approved by scottmcm

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 14, 2022
@bors
Copy link
Contributor

bors commented Oct 14, 2022

⌛ Testing commit a53e3ac with merge bf15a9e...

@bors
Copy link
Contributor

bors commented Oct 14, 2022

☀️ Test successful - checks-actions
Approved by: scottmcm
Pushing bf15a9e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 14, 2022
@bors bors merged commit bf15a9e into rust-lang:master Oct 14, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 14, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bf15a9e): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -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.

mean1 range count2
Regressions ❌
(primary)
7.0% [7.0%, 7.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.9% [-3.3%, -2.3%] 3
Improvements ✅
(secondary)
-2.6% [-3.6%, -1.3%] 25
All ❌✅ (primary) -0.4% [-3.3%, 7.0%] 4

Cycles

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.

mean1 range count2
Regressions ❌
(primary)
3.1% [2.2%, 3.7%] 4
Regressions ❌
(secondary)
2.9% [2.8%, 2.9%] 2
Improvements ✅
(primary)
-3.3% [-4.4%, -2.1%] 2
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) 1.0% [-4.4%, 3.7%] 6

Footnotes

  1. the arithmetic mean of the percent change 2

  2. number of relevant changes 2

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. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet