mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-26 22:26:26 +03:00
Rollup merge of #110291 - WaffleLapkin:copy_location_detail, r=oli-obk
Implement `Copy` for `LocationDetail` micro-nano-little-change
This commit is contained in:
@@ -77,7 +77,7 @@ pub(crate) fn alloc_caller_location(
|
||||
line: u32,
|
||||
col: u32,
|
||||
) -> MPlaceTy<'tcx, M::Provenance> {
|
||||
let loc_details = &self.tcx.sess.opts.unstable_opts.location_detail;
|
||||
let loc_details = self.tcx.sess.opts.unstable_opts.location_detail;
|
||||
// This can fail if rustc runs out of memory right here. Trying to emit an error would be
|
||||
// pointless, since that would require allocating more memory than these short strings.
|
||||
let file = if loc_details.file {
|
||||
|
||||
@@ -222,7 +222,7 @@ pub fn enabled(&self) -> bool {
|
||||
}
|
||||
|
||||
/// The different settings that can be enabled via the `-Z location-detail` flag.
|
||||
#[derive(Clone, PartialEq, Hash, Debug)]
|
||||
#[derive(Copy, Clone, PartialEq, Hash, Debug)]
|
||||
pub struct LocationDetail {
|
||||
pub file: bool,
|
||||
pub line: bool,
|
||||
|
||||
Reference in New Issue
Block a user