Skip to content

Conversation

ShoyuVanilla
Copy link
Member

@ShoyuVanilla ShoyuVanilla commented Jun 23, 2025

I thought that this was because we don't have super let but it was definitely my mistake in #20056 😅

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 23, 2025
r#"//- minicore: todo, unimplemented, fmt_before_1_89_0
fn f() { let a: u128 = 1; let b: u128 = todo$0!("asd") }"#,
r#"//- minicore: todo, unimplemented
fn f() { let a: u128 = 1; let b: u128 = unimplemented$0!("asd") }"#,
Copy link
Member Author

@ShoyuVanilla ShoyuVanilla Jun 23, 2025

Choose a reason for hiding this comment

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

This tests was identical with the above one and I think this is the original intention

r#"//- minicore: todo, unimplemented, fmt_before_1_89_0
fn f() { let a: u128 = 1; let b: u128 = todo$0!("asd") }"#,
r#"//- minicore: todo, unimplemented
fn f() { let a: u128 = 1; let b: u128 = unimplemented$0!() }"#,
Copy link
Member Author

@ShoyuVanilla ShoyuVanilla Jun 23, 2025

Choose a reason for hiding this comment

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

Same as the above

@ShoyuVanilla ShoyuVanilla changed the title fix: Record ident usages inside new format_args! expansion fix: Record local usages inside new format_args! expansion Jun 23, 2025
@ChayimFriedman2
Copy link
Contributor

I think I prefer to just allocate the binding with HygieneId::ROOT (there won't be collisions anyway), but if you prefer it this way then LGTM.

@ShoyuVanilla
Copy link
Member Author

I think I prefer to just allocate the binding with HygieneId::ROOT (there won't be collisions anyway), but if you prefer it this way then LGTM.

Oh, that would be much simpler and plausible as everything is inside a block 😄

@ShoyuVanilla ShoyuVanilla force-pushed the fix-fmt-args-hygiene branch from cc6b4ac to 254c6ec Compare June 23, 2025 16:11
@ShoyuVanilla ShoyuVanilla changed the title fix: Record local usages inside new format_args! expansion fix: Use ROOT hygiene for args inside new format_args! expansion Jun 23, 2025
@ChayimFriedman2 ChayimFriedman2 added this pull request to the merge queue Jun 23, 2025
Merged via the queue into rust-lang:master with commit 64338f2 Jun 23, 2025
14 checks passed
@ShoyuVanilla ShoyuVanilla deleted the fix-fmt-args-hygiene branch June 23, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants