Skip to content

Conversation

@epage
Copy link
Contributor

@epage epage commented Dec 9, 2025

T-lang came back on the stabilization PR (#148051) asking for CR to be disallowed
with the intention of preventing confusing situations where a stray CR
looks like a line break.

If need arises for it, this could always be turned into a lint at a
later point.

Part of #136889

epage added 5 commits December 9, 2025 14:56
T-lang came back on the stabilization PR asking for CR to be disallowed
with the intention of preventing confusing situations where a stray CR
looks like a line break.

If need arises for it, this could always be turned into a lint at a
later point.
@epage epage added the F-frontmatter `#![feature(frontmatter)]` label Dec 9, 2025
@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 Dec 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 9, 2025

r? @lcnr

rustbot has assigned @lcnr.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@epage epage mentioned this pull request Dec 9, 2025
10 tasks
@traviscross traviscross added the I-lang-radar Items that are on lang's radar and will need eventual work or consideration. label Dec 10, 2025
@joshtriplett
Copy link
Member

joshtriplett commented Dec 10, 2025

Given that text-direction-codepoint-in-literal and text-direction-codepoint-in-comment are lints, I do think it makes sense for this and the similar error in raw strings to be a lint as well. I doubt that anyone is going to allow it, but I still think it makes sense to not be a hard error.

That said, I don't think switching this from a hard error to a lint should be a blocker. Let's go ahead with the simple version of this change to unblock stabilization.

@epage
Copy link
Contributor Author

epage commented Dec 10, 2025

@joshtriplett this only prevents the use of CR and not the text direction code points.

However, this is making me more against doing CR in the first place if CR as an error is just a "simple version" of what we actually want.

If these should be lints, they should be lints in the tool that owns processing the frontmatter. If we have them as lints in rustc, we then have both tools running those lints as they likely have a format outside of the frontmatter that should also lint and that would be generic code across the files. Having both lint can lead to a bad user experience including:

  • disagreeing on lint levels and the user having to manage that
  • potentially showing duplicate warnings

If we error on CR now and then remove it because tools should do it, that is a subtle change that could easily get lost in communicating back out to those tools.

@epage epage marked this pull request as draft December 10, 2025 17:40
@rustbot rustbot 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 Dec 10, 2025
@epage
Copy link
Contributor Author

epage commented Dec 10, 2025

I've moved this to a draft until this is sorted out so we don't accidentally merge this

@Kivooeo
Copy link
Member

Kivooeo commented Dec 10, 2025

r? me

@rustbot rustbot assigned Kivooeo and unassigned lcnr Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-frontmatter `#![feature(frontmatter)]` I-lang-radar Items that are on lang's radar and will need eventual work or consideration. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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