]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_lowering/src/path.rs
Rollup merge of #99692 - RalfJung:too-far, r=oli-obk
[rust.git] / compiler / rustc_ast_lowering / src / path.rs
index 52ba5daf01410046555852aa3eb8ce2f5327c1d7..393be3b454c3787c7630750abb2c1d79369dc1f4 100644 (file)
@@ -133,7 +133,7 @@ pub(crate) fn lower_qpath(
 
         // We should've returned in the for loop above.
 
-        self.sess.diagnostic().span_bug(
+        self.diagnostic().span_bug(
             p.span,
             &format!(
                 "lower_qpath: no final extension segment in {}..{}",
@@ -193,7 +193,7 @@ pub(crate) fn lower_path_segment(
                 GenericArgs::Parenthesized(ref data) => match parenthesized_generic_args {
                     ParenthesizedGenericArgs::Ok => self.lower_parenthesized_parameter_data(data),
                     ParenthesizedGenericArgs::Err => {
-                        let mut err = struct_span_err!(self.sess, data.span, E0214, "{}", msg);
+                        let mut err = struct_span_err!(self.tcx.sess, data.span, E0214, "{}", msg);
                         err.span_label(data.span, "only `Fn` traits may use parentheses");
                         // Suggest replacing parentheses with angle brackets `Trait(params...)` to `Trait<params...>`
                         if !data.inputs.is_empty() {