Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
ea5ba76d
R
Rust
项目概览
int
/
Rust
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
ea5ba76d
编写于
3月 22, 2021
作者:
D
Dylan DPC
提交者:
GitHub
3月 22, 2021
浏览文件
操作
浏览文件
下载
差异文件
Rollup merge of #83336 - camelid:tool-mod-ice, r=petrochenkov
Fix ICE with `use clippy::a::b;` Fixes #83317.
上级
85f16fb4
bfae41d7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
2 deletion
+37
-2
compiler/rustc_resolve/src/imports.rs
compiler/rustc_resolve/src/imports.rs
+2
-2
src/test/ui/imports/tool-mod-child.rs
src/test/ui/imports/tool-mod-child.rs
+7
-0
src/test/ui/imports/tool-mod-child.stderr
src/test/ui/imports/tool-mod-child.stderr
+28
-0
未找到文件。
compiler/rustc_resolve/src/imports.rs
浏览文件 @
ea5ba76d
...
...
@@ -955,14 +955,14 @@ fn finalize_import(&mut self, import: &'b Import<'b>) -> Option<UnresolvedImport
}
return
None
;
}
PathResult
::
NonModule
(
path_res
)
if
path_res
.base_res
()
==
Res
::
Err
=>
{
PathResult
::
NonModule
(
_
)
=>
{
if
no_ambiguity
{
assert
!
(
import
.imported_module
.get
()
.is_none
());
}
// The error was already reported earlier.
return
None
;
}
PathResult
::
Indeterminate
|
PathResult
::
NonModule
(
..
)
=>
unreachable!
(),
PathResult
::
Indeterminate
=>
unreachable!
(),
};
let
(
ident
,
target
,
source_bindings
,
target_bindings
,
type_ns_only
)
=
match
import
.kind
{
...
...
src/test/ui/imports/tool-mod-child.rs
0 → 100644
浏览文件 @
ea5ba76d
use
clippy
::
a
;
//~ ERROR unresolved import `clippy`
use
clippy
::
a
::
b
;
//~ ERROR failed to resolve: maybe a missing crate `clippy`?
use
rustdoc
::
a
;
//~ ERROR unresolved import `rustdoc`
use
rustdoc
::
a
::
b
;
//~ ERROR failed to resolve: maybe a missing crate `rustdoc`?
fn
main
()
{}
src/test/ui/imports/tool-mod-child.stderr
0 → 100644
浏览文件 @
ea5ba76d
error[E0433]: failed to resolve: maybe a missing crate `clippy`?
--> $DIR/tool-mod-child.rs:2:5
|
LL | use clippy::a::b;
| ^^^^^^ maybe a missing crate `clippy`?
error[E0432]: unresolved import `clippy`
--> $DIR/tool-mod-child.rs:1:5
|
LL | use clippy::a;
| ^^^^^^ maybe a missing crate `clippy`?
error[E0433]: failed to resolve: maybe a missing crate `rustdoc`?
--> $DIR/tool-mod-child.rs:5:5
|
LL | use rustdoc::a::b;
| ^^^^^^^ maybe a missing crate `rustdoc`?
error[E0432]: unresolved import `rustdoc`
--> $DIR/tool-mod-child.rs:4:5
|
LL | use rustdoc::a;
| ^^^^^^^ maybe a missing crate `rustdoc`?
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录