-
Notifications
You must be signed in to change notification settings - Fork 14.1k
NFC normalize lifetime identifiers #149192
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
base: main
Are you sure you want to change the base?
Conversation
|
This is a observable language change in that previously we didn't accept struct Foo<'a>(&'a ());
fn foo<'K>(_x: Foo<'K>, _y: Foo<'K>) {}
// ^- latin K ^- kelvin KSo when we do NFC-normalize the lifetimes, we are now accepting more code (but is consistent with the original RFC and regular identifiers). This needs a lang FCP, and probably an update to the reference on NFC-normalization. @rustbot label: +I-lang-nominated |
|
I think the reference is actually fine - I'm not sure if something changed since the original bug report or the original bug report was just a generous reading of the current reference as accepting the non-normalizing implementation. The lifetime syntax page is here, and simply references the lifetime identifiers as either |
|
We talked about this on the lang call today. We agreed that idents used for lifetimes should work in the same way here as idents in other positions. @rfcbot fcp merge lang |
|
Team member @traviscross has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns. |
|
@rfcbot reviewed |
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
I absolutely think we should always have lifetimes treated like tick-then-ident, so if we're doing NFC for idents then 100% agreed we should do the same for lifetimes. @rfcbot reviewed |
|
Possibly perf-sensitive, we're now calling @bors try @rust-timer queue Implementation looks fine, feel free to r=me when FCP and perf finishes. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
NFC normalize lifetime identifiers
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (94d5cd8): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.8%, secondary 4.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.0%, secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 467.027s -> 468.583s (0.33%) |
Fixes #126759