diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-18 22:21:37 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-12-24 08:05:28 +1100 |
| commit | 99472c7049783605444ab888a97059d0cce93a12 (patch) | |
| tree | 686e31682a9d9ae7601cf22722f1b43d3efea5db /compiler/rustc_expand/src/module.rs | |
| parent | d51db05d7ee1a12ee168f2d1ccc93ccc11b216c7 (diff) | |
| download | rust-99472c7049783605444ab888a97059d0cce93a12.tar.gz rust-99472c7049783605444ab888a97059d0cce93a12.zip | |
Remove `Session` methods that duplicate `DiagCtxt` methods.
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
Diffstat (limited to 'compiler/rustc_expand/src/module.rs')
| -rw-r--r-- | compiler/rustc_expand/src/module.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_expand/src/module.rs b/compiler/rustc_expand/src/module.rs index cd59ea9092c..60647c3350a 100644 --- a/compiler/rustc_expand/src/module.rs +++ b/compiler/rustc_expand/src/module.rs @@ -260,14 +260,14 @@ impl ModError<'_> { let modules = paths.join(" -> "); - sess.emit_err(ModuleCircular { span, modules }) + sess.dcx().emit_err(ModuleCircular { span, modules }) } - ModError::ModInBlock(ident) => sess.emit_err(ModuleInBlock { + ModError::ModInBlock(ident) => sess.dcx().emit_err(ModuleInBlock { span, name: ident.map(|name| ModuleInBlockName { span, name }), }), ModError::FileNotFound(name, default_path, secondary_path) => { - sess.emit_err(ModuleFileNotFound { + sess.dcx().emit_err(ModuleFileNotFound { span, name, default_path: default_path.display().to_string(), @@ -275,7 +275,7 @@ impl ModError<'_> { }) } ModError::MultipleCandidates(name, default_path, secondary_path) => { - sess.emit_err(ModuleMultipleCandidates { + sess.dcx().emit_err(ModuleMultipleCandidates { span, name, default_path: default_path.display().to_string(), |
