Skip to content

Rollup of 9 pull requests #140520

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

Merged
merged 34 commits into from
Apr 30, 2025
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
cc791eb
Don't allow flattened format_args in const.
m-ou-se Apr 10, 2025
14491b0
Use START_BLOCK in codegen_naked_asm
bjorn3 Dec 12, 2024
03f4e88
Handle protected visibility in codegen_naked_asm
bjorn3 Dec 12, 2024
ffdc292
Don't begin defining a function when codegening a naked function
bjorn3 Dec 12, 2024
1988de5
Only require a CodegenCx for codegen_naked_asm
bjorn3 Dec 12, 2024
764d3a5
Make codegen_naked_asm retrieve the MIR Body itself
bjorn3 Dec 12, 2024
a73eba9
Move codegen_naked_asm call up into MonoItem::define
bjorn3 Dec 12, 2024
e2e96fa
Pass MonoItemData to MonoItem::define
bjorn3 Dec 12, 2024
94e95f3
Make codegen_naked_asm public
bjorn3 Dec 12, 2024
421f22e
Pass &mut self to codegen_global_asm
bjorn3 Dec 12, 2024
f5c93fa
Use cg_ssa's version of codegen_naked_asm in cg_clif
bjorn3 Dec 12, 2024
3066da8
Share part of the global_asm!() implementation between cg_ssa and cg_…
bjorn3 Dec 13, 2024
8307f97
Check bare function idents for non snake-case name
Urgau Apr 20, 2025
88a8679
transmutability: uninit transition matches unit byte only
tmiasko Apr 27, 2025
bd2c653
Rename lookup_method_in_trait and consolidate a Ident::with_dummy_spa…
compiler-errors Apr 30, 2025
e650c1d
Move the error handling out of confirm_builtin_call
compiler-errors Apr 30, 2025
6aa3dd1
Inline check_method_argument_types to get rid of TupleArgumentsFlag arg
compiler-errors Apr 30, 2025
f986d12
Inline check_method_argument_types and remove error_reported special …
compiler-errors Apr 30, 2025
6668d13
ast: Remove token visiting from AST visitor
petrochenkov Apr 29, 2025
0138df1
transmutability: ensure_sufficient_stack when answering query
tmiasko Apr 30, 2025
0cb6f51
unstable-book: fix capitalization
tshepang Apr 30, 2025
56426db
Add test for format_args!("{}", 0) in const.
m-ou-se Apr 30, 2025
07c7e5f
error when using no_mangle on language items
alexandruradovici Apr 30, 2025
3e174d4
Fix naked asm symbol name for cg_clif on macOS
bjorn3 Apr 30, 2025
ea7af18
Use less rustc_type_ir in the compiler codebase
rperier Apr 30, 2025
555df30
Rollup merge of #134232 - bjorn3:naked_asm_improvements, r=wesleywiser
matthiaskrgr Apr 30, 2025
bc99a04
Rollup merge of #139624 - m-ou-se:unconst-format-args, r=jhpratt
matthiaskrgr Apr 30, 2025
230215f
Rollup merge of #140090 - Urgau:snake_case-fn-var, r=petrochenkov
matthiaskrgr Apr 30, 2025
1a64f2c
Rollup merge of #140203 - Wyliodrin:error_for_no_mangle_weak_language…
matthiaskrgr Apr 30, 2025
ce9fc4a
Rollup merge of #140450 - petrochenkov:vistok, r=nnethercote
matthiaskrgr Apr 30, 2025
21df9db
Rollup merge of #140498 - compiler-errors:check-fn-tweaks, r=oli-obk
matthiaskrgr Apr 30, 2025
62a48cd
Rollup merge of #140504 - tmiasko:answer-ensure-stack, r=jswrenn
matthiaskrgr Apr 30, 2025
dab33f9
Rollup merge of #140506 - tshepang:patch-1, r=jieyouxu
matthiaskrgr Apr 30, 2025
1e440ae
Rollup merge of #140516 - rperier:type-ir-to-type-middle, r=lcnr
matthiaskrgr Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't allow flattened format_args in const.
  • Loading branch information
m-ou-se committed Apr 10, 2025
commit cc791ebe60f936355ffa62a53789cc69bcfde7e6
9 changes: 8 additions & 1 deletion library/core/src/fmt/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,15 @@ impl Argument<'_> {
/// let f = format_args!("{}", "a");
/// println!("{f}");
/// ```
///
/// This function should _not_ be const, to make sure we don't accept
/// format_args!() and panic!() with arguments in const, even when not evaluated:
///
/// ```compile_fail,E0015
/// const _: () = if false { panic!("a {}", "a") };
/// ```
#[inline]
pub const fn none() -> [Self; 0] {
pub fn none() -> [Self; 0] {
[]
}
}
Expand Down
Loading