Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
e271383c
R
Rust
项目概览
int
/
Rust
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
e271383c
编写于
3月 06, 2021
作者:
M
Matthew Jasper
提交者:
Rémy Rakic
8月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify BoundUniversalRegionError
上级
4421dd17
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+8
-8
compiler/rustc_mir/src/borrow_check/diagnostics/region_errors.rs
...r/rustc_mir/src/borrow_check/diagnostics/region_errors.rs
+6
-6
compiler/rustc_mir/src/borrow_check/region_infer/mod.rs
compiler/rustc_mir/src/borrow_check/region_infer/mod.rs
+1
-1
compiler/rustc_mir/src/borrow_check/region_infer/values.rs
compiler/rustc_mir/src/borrow_check/region_infer/values.rs
+1
-1
未找到文件。
compiler/rustc_mir/src/borrow_check/diagnostics/region_errors.rs
浏览文件 @
e271383c
...
...
@@ -75,8 +75,8 @@ fn description(&self) -> &'static str {
longer_fr
:
RegionVid
,
/// The region element that erroneously must be outlived by `longer_fr`.
error_element
:
RegionElement
,
/// The
origin of the
placeholder region.
fr_origin
:
NllRegionVariableOrigi
n
,
/// The placeholder region.
placeholder
:
ty
::
PlaceholderRegio
n
,
},
/// Any other lifetime error.
...
...
@@ -210,17 +210,17 @@ pub(in crate::borrow_check) fn report_region_errors(&mut self, nll_errors: Regio
RegionErrorKind
::
BoundUniversalRegionError
{
longer_fr
,
fr_origin
,
placeholder
,
error_element
,
}
=>
{
let
error_
region
=
self
.regioncx
.region_from_element
(
longer_fr
,
error_element
);
let
error_
vid
=
self
.regioncx
.region_from_element
(
longer_fr
,
error_element
);
// Find the code to blame for the fact that `longer_fr` outlives `error_fr`.
let
(
_
,
span
)
=
self
.regioncx
.find_outlives_blame_span
(
&
self
.body
,
longer_fr
,
fr_origin
,
error_
region
,
NllRegionVariableOrigin
::
Placeholder
(
placeholder
)
,
error_
vid
,
);
// FIXME: improve this error message
...
...
compiler/rustc_mir/src/borrow_check/region_infer/mod.rs
浏览文件 @
e271383c
...
...
@@ -1632,7 +1632,7 @@ fn check_bound_universal_region(
errors_buffer
.push
(
RegionErrorKind
::
BoundUniversalRegionError
{
longer_fr
,
error_element
,
fr_origin
:
NllRegionVariableOrigin
::
Placeholder
(
placeholder
)
,
placeholder
,
});
}
...
...
compiler/rustc_mir/src/borrow_check/region_infer/values.rs
浏览文件 @
e271383c
...
...
@@ -114,7 +114,7 @@ pub struct PlaceholderIndex { DEBUG_FORMAT = "PlaceholderIndex({})" }
/// An individual element in a region value -- the value of a
/// particular region variable consists of a set of these elements.
#[derive(Debug,
Clone)]
#[derive(Debug,
C
opy,
C
lone)]
crate
enum
RegionElement
{
/// A point in the control-flow graph.
Location
(
Location
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录