From 387dcff796406eb55624c61e9f14a3b5c27ad5ff Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Sun, 4 Aug 2019 09:44:06 -0700 Subject: review comments: clean up --- src/librustc_codegen_llvm/context.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/librustc_codegen_llvm') diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index 18d82c27d8c..ee8f1843c1a 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -30,7 +30,7 @@ use std::iter; use std::str; use std::sync::Arc; use syntax::symbol::LocalInternedString; -use syntax::source_map::Span; +use syntax::source_map::{DUMMY_SP, Span}; use crate::abi::Abi; /// There is one `CodegenCx` per compilation unit. Each one has its own LLVM @@ -861,10 +861,10 @@ impl LayoutOf for CodegenCx<'ll, 'tcx> { type TyLayout = TyLayout<'tcx>; fn layout_of(&self, ty: Ty<'tcx>) -> Self::TyLayout { - self.spanned_layout_of(ty, None) + self.spanned_layout_of(ty, DUMMY_SP) } - fn spanned_layout_of(&self, ty: Ty<'tcx>, span: Option) -> Self::TyLayout { + fn spanned_layout_of(&self, ty: Ty<'tcx>, span: Span) -> Self::TyLayout { self.tcx.layout_of(ty::ParamEnv::reveal_all().and(ty)) .unwrap_or_else(|e| if let LayoutError::SizeOverflow(_) = e { match span { -- cgit 1.4.1-3-g733a5