diff options
| author | George-lewis <george-lewis@user.noreply.github.com> | 2024-01-10 00:37:30 -0500 |
|---|---|---|
| committer | George-lewis <george-lewis@user.noreply.github.com> | 2024-01-13 12:11:13 -0500 |
| commit | 36a69e9d39b3dd49fefa2f84b2787a50230e0a32 (patch) | |
| tree | bf367cb5d5cd412e5c8a5602bdadc1a1d9b3185c /compiler/rustc_passes/src | |
| parent | b55faad3149ecf196a498ea1c0cf6195f22c9d89 (diff) | |
| download | rust-36a69e9d39b3dd49fefa2f84b2787a50230e0a32.tar.gz rust-36a69e9d39b3dd49fefa2f84b2787a50230e0a32.zip | |
Add check for ui_testing via promoting parameters from `ParseSess` to `Session`
Diffstat (limited to 'compiler/rustc_passes/src')
| -rw-r--r-- | compiler/rustc_passes/src/check_attr.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/check_const.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/debugger_visualizer.rs | 15 | ||||
| -rw-r--r-- | compiler/rustc_passes/src/entry.rs | 2 |
4 files changed, 11 insertions, 12 deletions
diff --git a/compiler/rustc_passes/src/check_attr.rs b/compiler/rustc_passes/src/check_attr.rs index e4bbc9eeaf7..20ed2573e3a 100644 --- a/compiler/rustc_passes/src/check_attr.rs +++ b/compiler/rustc_passes/src/check_attr.rs @@ -1170,7 +1170,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { sym::rust_logo => { if !self.tcx.features().rustdoc_internals { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::rustdoc_internals, meta.span(), "the `#[doc(rust_logo)]` attribute is used for Rust branding", @@ -1815,7 +1815,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> { (target, self.tcx.features().fn_align) { feature_err( - &self.tcx.sess.parse_sess, + &self.tcx.sess, sym::fn_align, hint.span(), "`repr(align)` attributes on functions are unstable", diff --git a/compiler/rustc_passes/src/check_const.rs b/compiler/rustc_passes/src/check_const.rs index 3e3f2771f5f..3676eb92a3f 100644 --- a/compiler/rustc_passes/src/check_const.rs +++ b/compiler/rustc_passes/src/check_const.rs @@ -147,7 +147,7 @@ impl<'tcx> CheckConstVisitor<'tcx> { [missing_primary, ref missing_secondary @ ..] => { let msg = format!("{} is not allowed in a `{}`", expr.name(), const_kind.keyword_name()); - let mut err = feature_err(&tcx.sess.parse_sess, *missing_primary, span, msg); + let mut err = feature_err(&tcx.sess, *missing_primary, span, msg); // If multiple feature gates would be required to enable this expression, include // them as help messages. Don't emit a separate error for each missing feature gate. diff --git a/compiler/rustc_passes/src/debugger_visualizer.rs b/compiler/rustc_passes/src/debugger_visualizer.rs index 42e929bde2c..4bfe6be5493 100644 --- a/compiler/rustc_passes/src/debugger_visualizer.rs +++ b/compiler/rustc_passes/src/debugger_visualizer.rs @@ -45,14 +45,13 @@ impl DebuggerVisualizerCollector<'_> { } }; - let file = - match resolve_path(&self.sess.parse_sess, visualizer_path.as_str(), attr.span) { - Ok(file) => file, - Err(err) => { - err.emit(); - return; - } - }; + let file = match resolve_path(&self.sess, visualizer_path.as_str(), attr.span) { + Ok(file) => file, + Err(err) => { + err.emit(); + return; + } + }; match std::fs::read(&file) { Ok(contents) => { diff --git a/compiler/rustc_passes/src/entry.rs b/compiler/rustc_passes/src/entry.rs index ed26b45a936..a9d0e0d2dd3 100644 --- a/compiler/rustc_passes/src/entry.rs +++ b/compiler/rustc_passes/src/entry.rs @@ -135,7 +135,7 @@ fn configure_main(tcx: TyCtxt<'_>, visitor: &EntryContext<'_>) -> Option<(DefId, if main_def.is_import && !tcx.features().imported_main { let span = main_def.span; feature_err( - &tcx.sess.parse_sess, + &tcx.sess, sym::imported_main, span, "using an imported function as entry point `main` is experimental", |
