diff options
| author | bors <bors@rust-lang.org> | 2024-01-13 22:05:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-13 22:05:46 +0000 |
| commit | 3deb9bbf84f6431ebcbb7cbdbe3d89bc2636bc1b (patch) | |
| tree | a8e4fa55ce4186137a2ffb2ddcf816ae5ed91e99 /compiler/rustc_resolve/src/lib.rs | |
| parent | d78329b92e8d141d19505e7c1527181c4ab87ed4 (diff) | |
| parent | 847aad75ad7c3a5691a5f45fcf371cc729dbfd77 (diff) | |
| download | rust-3deb9bbf84f6431ebcbb7cbdbe3d89bc2636bc1b.tar.gz rust-3deb9bbf84f6431ebcbb7cbdbe3d89bc2636bc1b.zip | |
Auto merge of #119945 - matthiaskrgr:rollup-oy3e1j2, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #119189 (Move section "Installing from Source" to seperate file) - #119925 (store the segment name when resolution fails) - #119935 (Move personality implementation out of PAL) - #119937 (Improve UEFI target docs) - #119938 (Allow unauthorized users to user the has-merge-commits label) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_resolve/src/lib.rs')
| -rw-r--r-- | compiler/rustc_resolve/src/lib.rs | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/rustc_resolve/src/lib.rs b/compiler/rustc_resolve/src/lib.rs index 0adea65ee58..90aa7d79bf0 100644 --- a/compiler/rustc_resolve/src/lib.rs +++ b/compiler/rustc_resolve/src/lib.rs @@ -213,7 +213,7 @@ enum ResolutionError<'a> { SelfImportOnlyInImportListWithNonEmptyPrefix, /// Error E0433: failed to resolve. FailedToResolve { - last_segment: Option<Symbol>, + segment: Option<Symbol>, label: String, suggestion: Option<Suggestion>, module: Option<ModuleOrUniformRoot<'a>>, @@ -396,12 +396,14 @@ enum PathResult<'a> { suggestion: Option<Suggestion>, is_error_from_last_segment: bool, module: Option<ModuleOrUniformRoot<'a>>, + /// The segment name of target + segment_name: Symbol, }, } impl<'a> PathResult<'a> { fn failed( - span: Span, + ident: Ident, is_error_from_last_segment: bool, finalize: bool, module: Option<ModuleOrUniformRoot<'a>>, @@ -409,7 +411,14 @@ impl<'a> PathResult<'a> { ) -> PathResult<'a> { let (label, suggestion) = if finalize { label_and_suggestion() } else { (String::new(), None) }; - PathResult::Failed { span, label, suggestion, is_error_from_last_segment, module } + PathResult::Failed { + span: ident.span, + segment_name: ident.name, + label, + suggestion, + is_error_from_last_segment, + module, + } } } |
