Skip to content

Commit 46c6301

Browse files
authored
Rollup merge of #110291 - WaffleLapkin:copy_location_detail, r=oli-obk
Implement `Copy` for `LocationDetail` micro-nano-little-change
2 parents c140e25 + 09a8791 commit 46c6301

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_const_eval/src/interpret/intrinsics/caller_location.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
7777
line: u32,
7878
col: u32,
7979
) -> MPlaceTy<'tcx, M::Provenance> {
80-
let loc_details = &self.tcx.sess.opts.unstable_opts.location_detail;
80+
let loc_details = self.tcx.sess.opts.unstable_opts.location_detail;
8181
// This can fail if rustc runs out of memory right here. Trying to emit an error would be
8282
// pointless, since that would require allocating more memory than these short strings.
8383
let file = if loc_details.file {

compiler/rustc_session/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ impl LinkerPluginLto {
222222
}
223223

224224
/// The different settings that can be enabled via the `-Z location-detail` flag.
225-
#[derive(Clone, PartialEq, Hash, Debug)]
225+
#[derive(Copy, Clone, PartialEq, Hash, Debug)]
226226
pub struct LocationDetail {
227227
pub file: bool,
228228
pub line: bool,

0 commit comments

Comments
 (0)