about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/lib.rs
diff options
context:
space:
mode:
authorPeter Todd <pete@petertodd.org>2025-02-18 04:56:03 +0000
committerPeter Todd <pete@petertodd.org>2025-02-18 04:56:03 +0000
commit4e4cb10b846c71f2993d2e4babbc026ff68bab3b (patch)
tree1126f77cba2c57f5f8b1117915c4ae4ea12095cc /compiler/rustc_codegen_llvm/src/lib.rs
parentde91711756133f11f7861dd099c001eaff0aafaa (diff)
downloadrust-4e4cb10b846c71f2993d2e4babbc026ff68bab3b.tar.gz
rust-4e4cb10b846c71f2993d2e4babbc026ff68bab3b.zip
Add #[track_caller] to Duration Div impl
Previously the location of the divide-by-zero error condition would be
attributed to the code in the rust standard library, eg:

	thread 'main' panicked at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/time.rs:1172:31:
	divide by zero error when dividing duration by scalar

With #[track_caller] the error is correctly attributed to the callee.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/lib.rs')
0 files changed, 0 insertions, 0 deletions